-
Notifications
You must be signed in to change notification settings - Fork 3
Description
For the protocol tutorial, I wrote the following code:
//Set up group and generate key
var group = new LazyGroup(new Secp256k1()); //TODO can we make this easier somehow? Like maybe a GroupSuite or something? Like BilinearGroup has everything in one place.
var H1 = new HashIntoLazyGroup(new Secp256k1.HashIntoSecp256k1(), group);Can we make it easier to instantiate the Secp256k1 group (or - more generally - groups without pairings) ?
For BilinearGroup, you call one constructor and everything is immediately wrapped in the right (Lazy)Group and you have getters for the hash into the group.
Can we have something similar for non-bilinear groups? Like a GroupSuite that's basically a BilinearGroup for a single non-pairing group? Or maybe we make Secp256k1 a Singleton and have the getInstance() method return the (lazy-)wrapped GroupImpl by default. And/or maybe the Group interface gets a getHashIntoGroup(), i.e. the Group shall instantiate/know a proper hash function.
Looking for good ideas how to make sense of my rough ideas above and how to go about this the best way to make (non-pairing) groups and hashes easier to use in our library.