Closed afjoseph closed 2 years ago
There's another way to proceed without exposing the field.
GenerateKey
or DeriveKey
. This will return a PrivateKey object.NewServer
or NewVerifiableServer
.Let me know if this fulfills your use case.
Hey @armfazh. Thank you for your reply. Your solution suffices and works perfect. Closing this ticket :)
Hey. Thanks for the fantastic repo!
This change is minimal and there might be an API I missed that does exactly this, so please let me know if I missed it.
This change allows protocols like OPAQUE to serialize and save the private key of a server, so an
oprf.Server
instance can be recreated easily at a later step.More concretely in OPAQUE, the password registration step requires a new
kU
parameter - which is theoprf.Server
's private key, created here in oprf.NewServer() - to be saved in the last step of the password registration procedure, and later retrieved during password authentication. This can be done after this PR by using the same saved private key insideoprf.NewServer
.Cheers and many thanks. Lemme know if a more graceful solution is required (i.e., exposing an
oprf.Server.[De]SerializeKey
function)