Skip to content

Node HSM signer fails with @noble/curves@^1.9.2 #865

@bestbeforetoday

Description

@bestbeforetoday

The Node HSM signer fails with the following error when install resolves version 1.9.2 - 1.9.4 of the @noble/curves dependency:

RangeError [ERR_INVALID_ARG_VALUE]: The argument 'size' is invalid. Received NaN

These versions introduce several new APIs, deprecate some existing APIs, and also introduce a regression where the length in octets of the base point order n (previously available from p256.CURVE.nByteLength) is undefined. The buffer allocated for the signature returned by the HSM is calculated as nByteLength * 2. With versions of @noble/curves including this regression, the result is NaN, which causes the error above.

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions