@@ -3751,8 +3751,8 @@ defaults to 16 bytes. `SIV` and `GCM-SIV` only support 16-byte authentication |
3751 | 3751 | tags. |
3752 | 3752 |
|
3753 | 3753 | The `ctsMode` and `xtsStandard` options configure parameters exposed by OpenSSL |
3754 | | -providers. They are available only with OpenSSL 3.0 or later and a provider |
3755 | | -that supports the corresponding parameter. `ctsMode` applies only to CBC-CTS |
| 3754 | +providers. They are not available with BoringSSL and require a provider that |
| 3755 | +supports the corresponding parameter. `ctsMode` applies only to CBC-CTS |
3756 | 3756 | ciphers, and `xtsStandard` applies only to `sm4-xts`. Supplying either option |
3757 | 3757 | for an available cipher implementation that does not support it throws an |
3758 | 3758 | `ERR_CRYPTO_UNSUPPORTED_OPERATION` error. See [CBC-CTS mode][] and [XTS mode][] |
@@ -3860,8 +3860,8 @@ set if a different length is used. For `SIV` and `GCM-SIV`, the `authTagLength` |
3860 | 3860 | option defaults to 16 bytes and only 16-byte authentication tags are supported. |
3861 | 3861 |
|
3862 | 3862 | The `ctsMode` and `xtsStandard` options configure parameters exposed by OpenSSL |
3863 | | -providers. They are available only with OpenSSL 3.0 or later and a provider |
3864 | | -that supports the corresponding parameter. `ctsMode` applies only to CBC-CTS |
| 3863 | +providers. They are not available with BoringSSL and require a provider that |
| 3864 | +supports the corresponding parameter. `ctsMode` applies only to CBC-CTS |
3865 | 3865 | ciphers, and `xtsStandard` applies only to `sm4-xts`. Supplying either option |
3866 | 3866 | for an available cipher implementation that does not support it throws an |
3867 | 3867 | `ERR_CRYPTO_UNSUPPORTED_OPERATION` error. See [CBC-CTS mode][] and [XTS mode][] |
@@ -4508,7 +4508,7 @@ Key decapsulation using a KEM algorithm with a private key. |
4508 | 4508 |
|
4509 | 4509 | Supported key types and their KEM algorithms are: |
4510 | 4510 |
|
4511 | | -* `'rsa'`[^openssl30] RSA Secret Value Encapsulation |
| 4511 | +* `'rsa'`[^noboringssl] RSA Secret Value Encapsulation |
4512 | 4512 | * `'ec'`[^openssl32] DHKEM(P-256, HKDF-SHA256), DHKEM(P-384, HKDF-SHA256), DHKEM(P-521, HKDF-SHA256) |
4513 | 4513 | * `'x25519'`[^openssl32] DHKEM(X25519, HKDF-SHA256) |
4514 | 4514 | * `'x448'`[^openssl32] DHKEM(X448, HKDF-SHA512) |
@@ -4580,7 +4580,7 @@ Key encapsulation using a KEM algorithm with a public key. |
4580 | 4580 |
|
4581 | 4581 | Supported key types and their KEM algorithms are: |
4582 | 4582 |
|
4583 | | -* `'rsa'`[^openssl30] RSA Secret Value Encapsulation |
| 4583 | +* `'rsa'`[^noboringssl] RSA Secret Value Encapsulation |
4584 | 4584 | * `'ec'`[^openssl32] DHKEM(P-256, HKDF-SHA256), DHKEM(P-384, HKDF-SHA256), DHKEM(P-521, HKDF-SHA256) |
4585 | 4585 | * `'x25519'`[^openssl32] DHKEM(X25519, HKDF-SHA256) |
4586 | 4586 | * `'x448'`[^openssl32] DHKEM(X448, HKDF-SHA512) |
@@ -5207,11 +5207,10 @@ added: v10.0.0 |
5207 | 5207 | * Returns: {number} `1` if FIPS mode is enabled, `0` otherwise. A future |
5208 | 5208 | semver-major release may change the return type of this API to a {boolean}. |
5209 | 5209 |
|
5210 | | -With OpenSSL 3, this reports whether the default property query includes |
5211 | | -`fips=yes`. It does not establish that a FIPS provider is loaded or validated. |
5212 | | -It can return `1` even when a requested cryptographic implementation cannot be |
5213 | | -fetched because no loaded provider supplies a match for `fips=yes`. See [FIPS |
5214 | | -mode][]. |
| 5210 | +This reports whether the default property query includes `fips=yes`. It does not |
| 5211 | +establish that a FIPS provider is loaded or validated. It can return `1` even |
| 5212 | +when a requested cryptographic implementation cannot be fetched because no |
| 5213 | +loaded provider supplies a match for `fips=yes`. See [FIPS mode][]. |
5215 | 5214 |
|
5216 | 5215 | ### `crypto.getHashes()` |
5217 | 5216 |
|
@@ -5231,10 +5230,9 @@ changes: |
5231 | 5230 |
|
5232 | 5231 | This is the authoritative Node.js list of hash algorithms available to |
5233 | 5232 | [`crypto.createHash()`][] and [`crypto.hash()`][] in the current process. With |
5234 | | -OpenSSL 3 or later, the list depends on the loaded providers and the default |
5235 | | -property query in effect when the list is first generated. Some listed |
5236 | | -algorithms can require API-specific options, such as `outputLength` for XOF |
5237 | | -hash functions. |
| 5233 | +OpenSSL, the list depends on the loaded providers and the default property query |
| 5234 | +in effect when the list is first generated. Some listed algorithms can require |
| 5235 | +API-specific options, such as `outputLength` for XOF hash functions. |
5238 | 5236 |
|
5239 | 5237 | A listed hash algorithm is not necessarily supported by APIs that combine a |
5240 | 5238 | digest with another cryptographic operation, such as HMAC, key derivation, or |
@@ -6665,11 +6663,10 @@ added: v10.0.0 |
6665 | 6663 |
|
6666 | 6664 | * `bool` {boolean} `true` to enable FIPS mode, `false` to disable it. |
6667 | 6665 |
|
6668 | | -Changes [FIPS mode][]. With OpenSSL 3, this only adds or removes `fips=yes` in |
6669 | | -the default property query. It does not install, load, initialize, or validate |
6670 | | -a FIPS provider. For a usable FIPS configuration, install the provider and |
6671 | | -configure OpenSSL to load it when Node.js starts, as described in [FIPS |
6672 | | -mode][]. |
| 6666 | +Changes [FIPS mode][]. This only adds or removes `fips=yes` in the default |
| 6667 | +property query. It does not install, load, initialize, or validate a FIPS |
| 6668 | +provider. For a usable FIPS configuration, install the provider and configure |
| 6669 | +OpenSSL to load it when Node.js starts, as described in [FIPS mode][]. |
6673 | 6670 |
|
6674 | 6671 | If no loaded provider supplies a requested cryptographic implementation |
6675 | 6672 | matching `fips=yes`, the call can still succeed and `crypto.getFips()` can still |
@@ -6688,8 +6685,7 @@ flags additionally require a configured provider named `fips` to initialize and |
6688 | 6685 | pass its self-test; Node.js fails to start otherwise. |
6689 | 6686 |
|
6690 | 6687 | Throws an error if OpenSSL cannot change the state. FIPS mode cannot be |
6691 | | -disabled when Node.js was started with `--force-fips`. With OpenSSL 1.1.1, |
6692 | | -enabling FIPS mode requires a FIPS-capable OpenSSL build. |
| 6688 | +disabled when Node.js was started with `--force-fips`. |
6693 | 6689 |
|
6694 | 6690 | ### `crypto.sign(algorithm, data, key[, callback])` |
6695 | 6691 |
|
@@ -7156,7 +7152,7 @@ variant: |
7156 | 7152 | input. |
7157 | 7153 |
|
7158 | 7154 | Encryption and decryption must use the same variant. The option is available |
7159 | | -only with CBC-CTS provider ciphers on OpenSSL 3.0 or later. |
| 7155 | +only with CBC-CTS provider ciphers and is not available with BoringSSL. |
7160 | 7156 |
|
7161 | 7157 | Applications which use this mode must adhere to these restrictions: |
7162 | 7158 |
|
@@ -7192,8 +7188,8 @@ For `sm4-xts`, the `xtsStandard` option to [`crypto.createCipheriv()`][] or |
7192 | 7188 | [`crypto.createDecipheriv()`][] selects either the default `'GB'` variant from |
7193 | 7189 | GB/T 17964-2021 or the `'IEEE'` variant from IEEE Std 1619-2007. Encryption and |
7194 | 7190 | decryption must use the same variant. The option is available only for |
7195 | | -`sm4-xts`; it does not apply to AES-XTS ciphers. OpenSSL's default provider |
7196 | | -supports `sm4-xts` in OpenSSL 3.2 or later. |
| 7191 | +`sm4-xts`; it does not apply to AES-XTS ciphers. `sm4-xts` requires OpenSSL 3.2 |
| 7192 | +or later and availability from the default provider. |
7197 | 7193 |
|
7198 | 7194 | ### AES key wrap modes |
7199 | 7195 |
|
@@ -7215,7 +7211,7 @@ restrictions: |
7215 | 7211 |
|
7216 | 7212 | ### SIV and GCM-SIV modes |
7217 | 7213 |
|
7218 | | -`SIV`[^openssl30] and `GCM-SIV`[^openssl32] are supported [AEAD algorithms][] |
| 7214 | +`SIV`[^noboringssl] and `GCM-SIV`[^openssl32] are supported [AEAD algorithms][] |
7219 | 7215 | when supported by OpenSSL. Applications which use these modes must adhere to |
7220 | 7216 | certain restrictions when using the cipher API: |
7221 | 7217 |
|
@@ -7252,13 +7248,11 @@ provider and only applies when it is deployed according to its security policy. |
7252 | 7248 | Vendor-provided Node.js or OpenSSL builds can require a different configuration; |
7253 | 7249 | follow the vendor's documentation for those builds. |
7254 | 7250 |
|
7255 | | -With OpenSSL 1.1.1, Node.js must be built against a FIPS-capable OpenSSL library. |
| 7251 | +FIPS support uses the provider model described in the [OpenSSL FIPS module |
| 7252 | +guide][]. Using FIPS-approved implementations requires: |
7256 | 7253 |
|
7257 | | -With OpenSSL 3, FIPS support uses the provider model described in the |
7258 | | -[OpenSSL FIPS module guide][]. Using FIPS-approved implementations requires: |
7259 | | - |
7260 | | -* A correctly installed OpenSSL 3 FIPS provider. |
7261 | | -* An OpenSSL 3 [FIPS module configuration file][]. |
| 7254 | +* A correctly installed OpenSSL FIPS provider. |
| 7255 | +* An OpenSSL [FIPS module configuration file][]. |
7262 | 7256 | * The FIPS provider to be loaded into the OpenSSL library context used by |
7263 | 7257 | Node.js, normally by activating it in an OpenSSL configuration file when |
7264 | 7258 | Node.js starts. |
@@ -7267,7 +7261,7 @@ With OpenSSL 3, FIPS support uses the provider model described in the |
7267 | 7261 | OpenSSL configuration, [`--enable-fips`][], or [`--force-fips`][], or for |
7268 | 7262 | subsequent fetches by `crypto.setFips(true)`. |
7269 | 7263 |
|
7270 | | -An example OpenSSL 3 configuration file looks like this: |
| 7264 | +An example OpenSSL configuration file looks like this: |
7271 | 7265 |
|
7272 | 7266 | ```text |
7273 | 7267 | nodejs_conf = nodejs_init |
@@ -7332,31 +7326,28 @@ By default, Node.js reads the `nodejs_conf` section instead of OpenSSL's usual |
7332 | 7326 | or build Node.js with `./configure --openssl-conf-name=<name>` to change the |
7333 | 7327 | default section name. |
7334 | 7328 |
|
7335 | | -On OpenSSL 3, the configuration above enables the `fips=yes` property query at |
7336 | | -startup. The following controls are also available: |
| 7329 | +The configuration above enables the `fips=yes` property query at startup. The |
| 7330 | +following controls are also available: |
7337 | 7331 |
|
7338 | 7332 | * [`--enable-fips`][] and [`--force-fips`][] enable the property query and |
7339 | 7333 | additionally require the configured provider named `fips` to initialize and |
7340 | 7334 | pass its self-test. Node.js exits if that check fails. `--force-fips` also |
7341 | 7335 | prevents FIPS mode from being disabled from script code. With |
7342 | 7336 | `--force-fips=strict`, Node.js also rejects non-approved operations reported |
7343 | 7337 | through the OpenSSL FIPS indicator callback. |
7344 | | -* [`crypto.setFips()`][] changes the FIPS/property-query state. On OpenSSL 3, it |
7345 | | - does not install, load, initialize, or validate a provider. Implementations |
7346 | | - fetched before the call are not changed. |
7347 | | -* [`crypto.getFips()`][] reports the FIPS/property-query state. On OpenSSL 3, a |
7348 | | - return value of `1` does not prove that a FIPS provider is loaded or validated. |
| 7338 | +* [`crypto.setFips()`][] changes the FIPS/property-query state. It does not |
| 7339 | + install, load, initialize, or validate a provider. Implementations fetched |
| 7340 | + before the call are not changed. |
| 7341 | +* [`crypto.getFips()`][] reports the FIPS/property-query state. A return value of |
| 7342 | + `1` does not prove that a FIPS provider is loaded or validated. |
7349 | 7343 | * With [`--enable-fips-indicator-events`][], the |
7350 | 7344 | [`'crypto.fips.indicator'`][] diagnostics channel reports non-approved |
7351 | | - operations permitted by an OpenSSL 3.4 or later FIPS provider configured for |
| 7345 | + operations permitted by an OpenSSL FIPS provider configured for |
7352 | 7346 | backwards compatibility. |
7353 | 7347 |
|
7354 | | -With OpenSSL 1.1.1, these controls use the library's FIPS mode support and |
7355 | | -require a FIPS-capable OpenSSL build. |
7356 | | - |
7357 | | -Only algorithms available under the active FIPS settings can be used. With |
7358 | | -OpenSSL 3, if no loaded provider supplies a requested cryptographic |
7359 | | -implementation matching `fips=yes`, fetching it fails, typically with |
| 7348 | +Only algorithms available under the active FIPS settings can be used. If no |
| 7349 | +loaded provider supplies a requested cryptographic implementation matching |
| 7350 | +`fips=yes`, fetching it fails, typically with |
7360 | 7351 | `ERR_OSSL_EVP_UNSUPPORTED`. The same error can occur for algorithms that |
7361 | 7352 | Node.js supports when FIPS mode is disabled but that are unavailable under the |
7362 | 7353 | active FIPS settings. |
@@ -7637,7 +7628,7 @@ See the [list of SSL OP Flags][] for details. |
7637 | 7628 | </tr> |
7638 | 7629 | </table> |
7639 | 7630 |
|
7640 | | -[^openssl30]: Requires OpenSSL >= 3.0 |
| 7631 | +[^noboringssl]: Not available when Node.js is built against BoringSSL |
7641 | 7632 |
|
7642 | 7633 | [^openssl32]: Requires OpenSSL >= 3.2 |
7643 | 7634 |
|
@@ -7684,7 +7675,7 @@ See the [list of SSL OP Flags][] for details. |
7684 | 7675 | [`--force-fips`]: cli.md#--force-fips |
7685 | 7676 | [`--openssl-config`]: cli.md#--openssl-configfile |
7686 | 7677 | [`--openssl-shared-config`]: cli.md#--openssl-shared-config |
7687 | | -[`BN_is_prime_ex`]: https://www.openssl.org/docs/man1.1.1/man3/BN_is_prime_ex.html |
| 7678 | +[`BN_is_prime_ex`]: https://www.openssl.org/docs/man3.0/man3/BN_is_prime_ex.html |
7688 | 7679 | [`Buffer`]: buffer.md |
7689 | 7680 | [`DH_generate_key()`]: https://www.openssl.org/docs/man3.0/man3/DH_generate_key.html |
7690 | 7681 | [`DiffieHellmanGroup`]: #class-diffiehellmangroup |
|