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

@@ -80,7 +80,10 @@ fn preprocess<R: RngCore + CryptoRng, C: Curve, A: Algorithm<C>>(
rng: &mut R,
params: &mut Params<C, A>,
) -> PreprocessPackage<C> {
let nonces = [C::F::random(&mut *rng), C::F::random(&mut *rng)];
let nonces = [
C::random_nonce(params.view().secret_share(), &mut *rng),
C::random_nonce(params.view().secret_share(), &mut *rng)
];
let commitments = [C::generator_table() * nonces[0], C::generator_table() * nonces[1]];
let mut serialized = C::G_to_bytes(&commitments[0]);
serialized.extend(&C::G_to_bytes(&commitments[1]));