cfrg / draft-irtf-cfrg-voprf

Oblivious Pseudorandom Functions (OPRFs) using Prime-Order Groups
https://cfrg.github.io/draft-irtf-cfrg-voprf/#go.draft-irtf-cfrg-voprf.html
Other
39 stars 15 forks source link

Multiple functions with the same names #385

Open jyasskin opened 1 year ago

jyasskin commented 1 year ago

The current draft has def BlindEvaluate in https://www.ietf.org/archive/id/draft-irtf-cfrg-voprf-21.html#name-oprf-protocol, https://www.ietf.org/archive/id/draft-irtf-cfrg-voprf-21.html#name-voprf-protocol, and https://www.ietf.org/archive/id/draft-irtf-cfrg-voprf-21.html#name-poprf-protocol. def Blind is in https://www.ietf.org/archive/id/draft-irtf-cfrg-voprf-21.html#name-oprf-protocol and https://www.ietf.org/archive/id/draft-irtf-cfrg-voprf-21.html#name-poprf-protocol. def Evaluate is in https://www.ietf.org/archive/id/draft-irtf-cfrg-voprf-21.html#name-oprf-protocol and https://www.ietf.org/archive/id/draft-irtf-cfrg-voprf-21.html#name-poprf-protocol.

When writing a specification that depends on one of this draft's protocols (as I'm currently reviewing in https://github.com/WICG/trust-token-api/pull/257), the specification needs to call the appropriate function. While it's possible to link to a specific section or name the active protocol so that a careful reader will implement the right function, it would be better if we didn't have to be so careful.

Would it be possible to give every distinct function in this spec a distinct name?

armfazh commented 1 year ago

The name of the primitives are generic, similar to Encrypt/Decrypt or Sign/Verify. All the variants follow this abstraction, so for the sake of clarity, specifications should announce which variant (OPRF/VOPRF/POPRF) is used. Additionally, the draft provides test vectors and reference implementations so people can verify their implementation as an additional measure.