status-im / nim-blscurve

Nim implementation of BLS signature scheme (Boneh-Lynn-Shacham) over Barreto-Lynn-Scott (BLS) curve BLS12-381
Apache License 2.0
26 stars 11 forks source link

Add KeyValidate + Sanity checks #42

Closed mratsim closed 3 years ago

mratsim commented 4 years ago

The BLS standard has a KeyValidate procedure.

Internally this is unnecessary because if the public key is parsed successfuly it is valid.

Additionally some sanity checks to ensure the range of secret keys woul be helpful to avoid a regression after #40 / #41.