-
Notifications
You must be signed in to change notification settings - Fork 10
Description
#73 introduced KSF parameters, modified and expanded in #100. This shows that parameterization can be necessary but also highlights there's not an obvious approach to it.
In this issue, I'd like to explore what makes most sense and what can be done to make the API user-friendly and enables dependants, rather than block them.
Core configuration
The core opaque.Configuration
structure is meant to represent the minimal necessary definition of an OPAQUE instance, as defined in the current state of the draft.
3.1 Setup states:
client and server agree on a configuration that fully specifies the cryptographic algorithm dependencies necessary to run the protocol.
To me, it makes sense to keep it like so.
Optional parameters
Currently, every protocol step method for both a client and server supports injecting optional values to override default values or using newly randomly generated ones. This holds mostly for the client, as the server only accepts overrides for KE2.
But this leads to API complexity, duplication of some structures (e.g. ClientRegistrationFinalizeOptions
and GenerateKE3Options
, handling and parsing multiple structures, and ad-hoc adaptions for callers.
Also, for values that need to be reused or persisted, it shifts that responsibility to the caller. That's something I considered ok when designing the first versions of the API. But maybe better support can make the API and usage more robust.
Going further
I'm not sure, yet, what the best approach would be, though I have some ideas. One approach could be to have one structure for the client to hold all these values relative to the client, with an effort to make their usage phase obvious (registration vs. login vs. all-the-time). Their serialization could take an argument to not include secret values (e.g. blind, nonces, keys), but I'm not even sure their serialization is a desirable feature. The essence of OPAQUE is that the client doesn't need any other secret or key than its password, otherwise one might just use mTLS if persistent key material is possible.
@DJAndries and @claucece, since you've had recent experience with that, do you have an opinion on this you'd like to discuss?