Adding identity element checks and ensuring non-zero scalar selection

This commit is contained in:
Kevin Lewi
2021-06-15 18:39:33 -07:00
committed by Kevin Lewi
parent 210e0e99df
commit 98f1821897
8 changed files with 148 additions and 24 deletions
+1 -1
View File
@@ -383,7 +383,7 @@ impl<CS: CipherSuite> ServerRegistration<CS> {
server_s_pk: &PublicKey,
) -> Result<ServerRegistrationStartResult<CS>, ProtocolError> {
// RFC: generate oprf_key (salt) and v_u = g^oprf_key
let oprf_key = CS::Group::random_scalar(rng);
let oprf_key = CS::Group::random_nonzero_scalar(rng);
// Compute beta = alpha^oprf_key
let beta = oprf::evaluate::<CS::Group>(message.alpha, &oprf_key);