You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm just annoyed with constantly importing PrimeFieldBits and writing PrimeFieldBits + PrimeGroup. I believe this would be resolvable with a few lines on my end everywhere I use the two, via:
trait PrimeGroupBits {}
impl<G: PrimeGroup> PrimeGroupBits for G where G::Scalar PrimeFieldBits {}
Yet then I need to add those lines to multiple libraries, so I'd appreciate this being introduced upstream. That may actually be the exact patch I'm proposing for here (+pub), as it means downstream libs wouldn't have to apply it themselves (which they may miss via an oversight). While PrimeGroup cannot be automatically applied as such (the Prime part of PrimeGroup, no such conveyance is made here.
I fully understand this a minor triviality and you're more than welcome to say it doesn't fit for group/doesn't have enough of a larger use case yet, but I'd appreciate it. Anything performing multiexp requires the former, if using ff properly to do so, and then PrimeGroup offers security (lack of torsion) and GroupEncoding (as frequently required by apps), hence the request for PrimeGroupBits instead of GroupBits.
Alternatively, if #25 has the preference of being over Group instead of over PrimeGroup, I believe a GroupBits for multiexp with PrimeGroupBits impl<G: GroupBits + PrimeGroup> PrimeGroupBits for G {} would be optimal.
The text was updated successfully, but these errors were encountered:
I'm just annoyed with constantly importing PrimeFieldBits and writing PrimeFieldBits + PrimeGroup. I believe this would be resolvable with a few lines on my end everywhere I use the two, via:
Yet then I need to add those lines to multiple libraries, so I'd appreciate this being introduced upstream. That may actually be the exact patch I'm proposing for here (+pub), as it means downstream libs wouldn't have to apply it themselves (which they may miss via an oversight). While PrimeGroup cannot be automatically applied as such (the
Prime
part ofPrimeGroup
, no such conveyance is made here.I fully understand this a minor triviality and you're more than welcome to say it doesn't fit for group/doesn't have enough of a larger use case yet, but I'd appreciate it. Anything performing multiexp requires the former, if using ff properly to do so, and then PrimeGroup offers security (lack of torsion) and GroupEncoding (as frequently required by apps), hence the request for PrimeGroupBits instead of GroupBits.
Alternatively, if #25 has the preference of being over Group instead of over PrimeGroup, I believe a GroupBits for multiexp with PrimeGroupBits
impl<G: GroupBits + PrimeGroup> PrimeGroupBits for G {}
would be optimal.The text was updated successfully, but these errors were encountered: