go-schnorrkel icon indicating copy to clipboard operation
go-schnorrkel copied to clipboard

Merlin transcript RNG

Open noot opened this issue 6 years ago • 2 comments

Right now, sign and verify won't interoperate with don't fully match the implementation in rust library, since in rust schnorrkel uses the transcript RNG to generate randomness when signing. The Go merlin library we're using doesn't have that yet: see https://github.com/gtank/merlin/issues/2

See: https://github.com/w3f/schnorrkel/blob/798ab3e0813aa478b520c5cf6dc6e02fd4e07f0a/src/sign.rs#L161 https://github.com/w3f/schnorrkel/blob/798ab3e0813aa478b520c5cf6dc6e02fd4e07f0a/src/context.rs#L153 for the relevant code in schnorrkel.

noot avatar Oct 28 '19 19:10 noot

Note that transcript-assisted RNG is not required for interoperability. Verifiers will never know how the signers generate nonces. Using transcript-based RNG is only a matter of securing the prover against weak RNGs or rowhammer attacks.

oleganza avatar Nov 10 '19 16:11 oleganza

@oleganza that is true, I should specify that it would be needed for a complete/equivalent implementation.

noot avatar Nov 11 '19 17:11 noot