Add proptest around pubkey generation

This commit is contained in:
Deirdre Connolly 2020-05-08 01:38:25 -04:00 committed by Deirdre Connolly
parent 0e49e2d4fe
commit 8cb2444511
1 changed files with 12 additions and 0 deletions

View File

@ -315,5 +315,17 @@ mod tests {
);
}
#[test]
fn scalar_mul_different_paths(
secret in any::<EphemeralSecret>(),
) {
let other_public = PublicKey(constants::RISTRETTO_BASEPOINT_POINT * secret.0);
prop_assert_eq!(
other_public,
PublicKey::from(&secret)
);
}
}
}