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
{{ message }}
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.
The SecretKey.fromBytes method performs some validation on the input, such as ensuring the secret key is non-zero and of correct length. However, the check against the secret key is not done modulo the order of the elliptic curve. Therefore, it is possible for a secret key equivalent to zero to be used if the value of the secret key is a multiple of this elliptic curve order.
Add checks to all functions making use of the SecretKey.fromBytes function to ensure that the secret key being used for signing and other operations is non-zero modulo the order of the elliptic curve.
Description
The SecretKey.fromBytes method performs some validation on the input, such as ensuring the secret key is non-zero and of correct length. However, the check against the secret key is not done modulo the order of the elliptic curve. Therefore, it is possible for a secret key equivalent to zero to be used if the value of the secret key is a multiple of this elliptic curve order.
https://github.com/ChainSafe/blst-ts/blob/ad0af59d9d01d45ea144b8306f44e45426c5888b/src/lib.ts#L63-L73
Acceptance Criteria
Add checks to all functions making use of the SecretKey.fromBytes function to ensure that the secret key being used for signing and other operations is non-zero modulo the order of the elliptic curve.
Additional Information
Reference: ChainSafe/bls#96
The text was updated successfully, but these errors were encountered: