ChainSafe / ChainSafe/bls

BLS secret key validation is missing

Open
#96 3 comments 0 reactions 0 assignees View on GitHub
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.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.