voprf-poc
voprf-poc copied to clipboard
Fixing redundancy on ciphersuite specification
trafficstars
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)
I was thinking just the same. I'll propose a refactoring for this.