alxdavids / voprf-poc

Proof-of-concept implementation of the (V)OPRF protocol in https://datatracker.ietf.org/doc/draft-irtf-cfrg-voprf/
23 stars 8 forks source link

Fixing redundancy on ciphersuite specification #37

Open tomrist opened 4 years ago

tomrist commented 4 years ago

The Ciphersuite FromString method (groups/group.go:49) takes both ciphersuite string and PrimeOrderGroup element. This strikes me as redundant as the string should anyway specify what group to instantiate. Looking at the code the switch on ciphersuite has enough information to replace calling new on passed-in value pog with fresh pog instance of appropriate type (e.g., ecgroup.GroupCurve)

claucece commented 3 years ago

I was thinking just the same. I'll propose a refactoring for this.