BLS secret key validation is missing
Open
good first issue
help wanted
- Dominant language
- TypeScript
- Stars
- 106
- Forks
- 24
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the bug**
The BLS spec [requires](https://datatracker.ietf.org/doc/html/draft-irtf-cfrg-bls-signature-04#section-2.3) that the secret key (SK) must be a uniformly random integer such that 1 <= SK < r.
Where r is the order curve.
The last check is missing:
- [fromBytes](https://github.com/ChainSafe/bls/blob/master/src/blst/secretKey.ts#L15)
- [fromBytes](https://github.com/ChainSafe/blst-ts/blob/master/src/lib.ts#L57)
**Expected behavior**
Check that the provided SK < r.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.