Finish implementing FROST v5

Identity check for P256 and H4 was all that was needed.
This commit is contained in:
Luke Parker
2022-06-03 02:00:38 -04:00
parent e4fc469e58
commit b4cd29f49a
4 changed files with 26 additions and 7 deletions

View File

@@ -11,7 +11,7 @@ use curve25519_dalek::{
edwards::EdwardsPoint as DPoint
};
use ff::PrimeField;
use ff::{Field, PrimeField};
use group::Group;
use transcript::{Transcript as TranscriptTrait, DigestTranscript};
@@ -59,6 +59,10 @@ impl Curve for Ed25519 {
true
}
fn random_nonce<R: RngCore + CryptoRng>(_secret: Self::F, rng: &mut R) -> Self::F {
dfg::Scalar::random(rng)
}
// This will already be a keccak256 hash in the case of CLSAG signing, making it fine to simply
// return as-is, yet this ensures it's fixed size (a security requirement) and unique regardless
// of how it's called/what it's called with