Unify the cross-group DLEq challenges

This does reduce the strength of the challenges to that of the weaker 
field, yet that doesn't have any impact on whether or not this is ZK due 
to the key being shared across fields.

Saves ~8kb.
This commit is contained in:
Luke Parker
2022-06-30 11:23:13 -04:00
parent 7890827a48
commit 4eafbe2a09
3 changed files with 16 additions and 18 deletions

View File

@@ -28,7 +28,7 @@ impl<G: PrimeGroup> SchnorrPoK<G> {
transcript.append_message(b"generator", generator.to_bytes().as_ref());
transcript.append_message(b"nonce", R.to_bytes().as_ref());
transcript.append_message(b"public_key", A.to_bytes().as_ref());
challenge(transcript, b"challenge")
challenge(transcript)
}
pub(crate) fn prove<R: RngCore + CryptoRng, T: Transcript>(