voprf-poc icon indicating copy to clipboard operation
voprf-poc copied to clipboard

Fixing redundancy on ciphersuite specification

Open tomrist opened this issue 5 years ago • 1 comments
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)

tomrist avatar Sep 15 '20 15:09 tomrist

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

claucece avatar Sep 28 '20 00:09 claucece