Skip to content

Commit 2a7047d

Browse files
tniessenrichardlau
authored andcommitted
doc,crypto: further clarify RSA_PKCS1_PADDING support
PR-URL: #51799 Reviewed-By: Filip Skokan <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Michael Dawson <[email protected]>
1 parent 31c4ba4 commit 2a7047d

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

doc/api/crypto.md

+7-4
Original file line numberDiff line numberDiff line change
@@ -4512,8 +4512,9 @@ changes:
45124512
- v21.6.2
45134513
- v20.11.1
45144514
- v18.19.1
4515-
pr-url: https://github.com/nodejs-private/node-private/pull/525
4516-
description: The `RSA_PKCS1_PADDING` padding was disabled.
4515+
pr-url: https://github.com/nodejs-private/node-private/pull/515
4516+
description: The `RSA_PKCS1_PADDING` padding was disabled unless the
4517+
OpenSSL build supports implicit rejection.
45174518
- version: v15.0.0
45184519
pr-url: https://github.com/nodejs/node/pull/35093
45194520
description: Added string, ArrayBuffer, and CryptoKey as allowable key
@@ -4555,8 +4556,10 @@ If `privateKey` is not a [`KeyObject`][], this function behaves as if
45554556
object, the `padding` property can be passed. Otherwise, this function uses
45564557
`RSA_PKCS1_OAEP_PADDING`.
45574558

4558-
The `crypto.constants.RSA_PKCS1_PADDING` padding is disabled in
4559-
[`crypto.privateDecrypt()`][] since the February 2024 security releases. <span class="deprecated-inline"></span>
4559+
Using `crypto.constants.RSA_PKCS1_PADDING` in [`crypto.privateDecrypt()`][]
4560+
requires OpenSSL to support implicit rejection (`rsa_pkcs1_implicit_rejection`).
4561+
If the version of OpenSSL used by Node.js does not support this feature,
4562+
attempting to use `RSA_PKCS1_PADDING` will fail.
45604563

45614564
### `crypto.privateEncrypt(privateKey, buffer)`
45624565

0 commit comments

Comments
 (0)