◐ Shell
clean mode source ↗

crypto: add support for Ed25519 context parameter · nodejs/node@7597d20

@@ -6039,6 +6039,9 @@ Throws an error if FIPS mode is not available.

60396039

<!-- YAML

60406040

added: v12.0.0

60416041

changes:

6042+

- version: REPLACEME

6043+

pr-url: https://github.com/nodejs/node/pull/62474

6044+

description: Add support for Ed25519 context parameter.

60426045

- version: v24.8.0

60436046

pr-url: https://github.com/nodejs/node/pull/59570

60446047

description: Add support for ML-DSA, Ed448, and SLH-DSA context parameter.

@@ -6102,9 +6105,10 @@ additional properties can be passed:

61026105

`crypto.constants.RSA_PSS_SALTLEN_DIGEST` sets the salt length to the digest

61036106

size, `crypto.constants.RSA_PSS_SALTLEN_MAX_SIGN` (default) sets it to the

61046107

maximum permissible value.

6105-

* `context` {ArrayBuffer|Buffer|TypedArray|DataView} For Ed448, ML-DSA, and SLH-DSA,

6106-

this option specifies the optional context to differentiate signatures generated

6107-

for different purposes with the same key.

6108+

* `context` {ArrayBuffer|Buffer|TypedArray|DataView} For Ed25519[^openssl32]

6109+

(using Ed25519ctx from [RFC 8032][]), Ed448, ML-DSA, and SLH-DSA,

6110+

this option specifies the optional context to differentiate signatures

6111+

generated for different purposes with the same key.

6108611261096113

If the `callback` function is provided this function uses libuv's threadpool.

61106114

@@ -6164,6 +6168,9 @@ not introduce timing vulnerabilities.

61646168

<!-- YAML

61656169

added: v12.0.0

61666170

changes:

6171+

- version: REPLACEME

6172+

pr-url: https://github.com/nodejs/node/pull/62474

6173+

description: Add support for Ed25519 context parameter.

61676174

- version: v24.8.0

61686175

pr-url: https://github.com/nodejs/node/pull/59570

61696176

description: Add support for ML-DSA, Ed448, and SLH-DSA context parameter.

@@ -6233,9 +6240,10 @@ additional properties can be passed:

62336240

`crypto.constants.RSA_PSS_SALTLEN_DIGEST` sets the salt length to the digest

62346241

size, `crypto.constants.RSA_PSS_SALTLEN_MAX_SIGN` (default) sets it to the

62356242

maximum permissible value.

6236-

* `context` {ArrayBuffer|Buffer|TypedArray|DataView} For Ed448, ML-DSA, and SLH-DSA,

6237-

this option specifies the optional context to differentiate signatures generated

6238-

for different purposes with the same key.

6243+

* `context` {ArrayBuffer|Buffer|TypedArray|DataView} For Ed25519[^openssl32]

6244+

(using Ed25519ctx from [RFC 8032][]), Ed448, ML-DSA, and SLH-DSA,

6245+

this option specifies the optional context to differentiate signatures

6246+

generated for different purposes with the same key.

6239624762406248

The `signature` argument is the previously calculated signature for the `data`.

62416249

@@ -6835,6 +6843,7 @@ See the [list of SSL OP Flags][] for details.

68356843

[RFC 5208]: https://www.rfc-editor.org/rfc/rfc5208.txt

68366844

[RFC 5280]: https://www.rfc-editor.org/rfc/rfc5280.txt

68376845

[RFC 7517]: https://www.rfc-editor.org/rfc/rfc7517.txt

6846+

[RFC 8032]: https://www.rfc-editor.org/rfc/rfc8032.txt

68386847

[Web Crypto API documentation]: webcrypto.md

68396848

[`BN_is_prime_ex`]: https://www.openssl.org/docs/man1.1.1/man3/BN_is_prime_ex.html

68406849

[`Buffer`]: buffer.md