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
We unfortunately need one of those default init RFC in Nim nim-lang/RFCs#252.
The portable patterns are
# Low-levelvar P {.noInit.}: ECP2_BLS12381
P.setInf
# High-levelvar p {.noInit.}: Aggregate
p.init(firstElem)
If we need really empty aggregate within BLScurve (instead of just handling the special case at serialization/deserialization) we could add the following function with caveats for Miracl backend:
funcinitEmpty*(agg: varAggregate) {.inline.} =## Initialize an empty aggregate signature or public key.## This is a delicate procedure to use.## ## ⚠ Empty public-key or signatures created by this procedure## are infinity points to allow further aggregation.## - Some protocols might serialize an empty aggregate differently## from an infinity point, for example Ethereum:## Empty aggregate: 0x0000...0000## Infinity point ("zero"): 0xc000...0000## - Some protocols, like BLS signatures, might not allow raw empty aggregates of certain kind.
agg.point.inf()
BLST has no public API to create infinity points (though default init is by chance the infinity point).
#120 (comment)
The text was updated successfully, but these errors were encountered: