privToPub and secretToPublic out of place proc have been changed to publicFromSecret so that a boolean can be returned and catch invalid secret keys == 0.
The aggregate API now returns a boolean to indicate aggregating an empty openarray[Signature] instead of asserting.
This addresses: https://github.com/status-im/nim-blscurve/issues/76
Note that we used to have 3 aggregate overloads for the following cases:
combine a valid signature with another valid signature
combine a valid signature with an array of valid signatures
combine an array of valid signatures.
https://github.com/status-im/nim-blscurve/issues/76 revealed that it wasn't clear that in the first 2 cases
the aggregation precondition of having a non-empty aggregation was always true.
This is now mentioned as a comment and the last overload has also been renamed aggregateAll and now has an in-place API + boolean.
Notable changes
A zero secret-key or public key is checked at deserialization (see https://github.com/supranational/blst/issues/11) for discussion.
This slightly differ from KeyValidate in the spec which includes zero-key and subgroup check. (related #42)
The spec does mention that KeyValidate MAY be cached (see #90)
This upgrades the repo to support the full BLS v04 signatures:
Specs
Public API changes
privToPub
andsecretToPublic
out of place proc have been changed topublicFromSecret
so that a boolean can be returned and catch invalid secret keys == 0.aggregate
overloads for the following cases:aggregateAll
and now has an in-place API + boolean.Notable changes
A zero secret-key or public key is checked at deserialization (see https://github.com/supranational/blst/issues/11) for discussion. This slightly differ from KeyValidate in the spec which includes zero-key and subgroup check. (related #42) The spec does mention that KeyValidate MAY be cached (see #90)