facebook / opaque-ke

An implementation of the OPAQUE password-authenticated key exchange protocol
Apache License 2.0
291 stars 41 forks source link

Update keypair generation to use derive_auth_keypair #326

Closed kevinlewi closed 1 year ago

kevinlewi commented 1 year ago

In https://github.com/cfrg/draft-irtf-cfrg-opaque/pull/411, the test vectors were updated to ensure that keypair generation was done using the specified derivation method (using DeriveDiffieHellmanKeyPair). The test vectors also were updated to include the seed used to generate the keypair, as opposed to the private key itself. The constant string "OPAQUE-DeriveAuthKeyPair" was also updated to now be "OPAQUE-DeriveDiffieHellmanKeyPair"

Previously, this implementation just generated the private key randomly and derived the corresponding public key in a way that matched the test vectors. Now that the test vectors have become more strict, it revealed that we were not generating them according to specification.

This PR fixes that, and also pulls in the new test vectors to make sure they match.

kevinlewi commented 1 year ago

cc: @daxpedda