@@ -2930,6 +2930,10 @@ Checks the primality of the `candidate`.
29302930added: v0.1.94
29312931deprecated: v10.0.0
29322932changes:
2933+ - version: REPLACEME
2934+ pr-url: https://github.com/nodejs/node/pull/42427
2935+ description: The `authTagLength` option is now optional when using the
2936+ `chacha20-poly1305` cipher and defaults to 16 bytes.
29332937 - version: v15.0.0
29342938 pr-url: https://github.com/nodejs/node/pull/35093
29352939 description: The password argument can be an ArrayBuffer and is limited to
@@ -2954,12 +2958,12 @@ Creates and returns a `Cipher` object that uses the given `algorithm` and
29542958` password ` .
29552959
29562960The ` options ` argument controls stream behavior and is optional except when a
2957- cipher in CCM or OCB mode (e.g. ` 'aes-128-ccm' ` ) or ` chacha20-poly1305 ` is used.
2958- In that case, the
2961+ cipher in CCM or OCB mode (e.g. ` 'aes-128-ccm' ` ) is used. In that case, the
29592962` authTagLength ` option is required and specifies the length of the
29602963authentication tag in bytes, see [ CCM mode] [ ] . In GCM mode, the ` authTagLength `
29612964option is not required but can be used to set the length of the authentication
29622965tag that will be returned by ` getAuthTag() ` and defaults to 16 bytes.
2966+ For ` chacha20-poly1305 ` , the ` authTagLength ` option defaults to 16 bytes.
29632967
29642968The ` algorithm ` is dependent on OpenSSL, examples are ` 'aes192' ` , etc. On
29652969recent OpenSSL releases, ` openssl list -cipher-algorithms ` will
@@ -2990,6 +2994,10 @@ Adversaries][] for details.
29902994<!-- YAML
29912995added: v0.1.94
29922996changes:
2997+ - version: REPLACEME
2998+ pr-url: https://github.com/nodejs/node/pull/42427
2999+ description: The `authTagLength` option is now optional when using the
3000+ `chacha20-poly1305` cipher and defaults to 16 bytes.
29933001 - version: v15.0.0
29943002 pr-url: https://github.com/nodejs/node/pull/35093
29953003 description: The password and iv arguments can be an ArrayBuffer and are
@@ -3026,12 +3034,12 @@ Creates and returns a `Cipher` object, with the given `algorithm`, `key` and
30263034initialization vector (` iv ` ).
30273035
30283036The ` options ` argument controls stream behavior and is optional except when a
3029- cipher in CCM or OCB mode (e.g. ` 'aes-128-ccm' ` ) or ` chacha20-poly1305 ` is used.
3030- In that case, the
3037+ cipher in CCM or OCB mode (e.g. ` 'aes-128-ccm' ` ) is used. In that case, the
30313038` authTagLength ` option is required and specifies the length of the
30323039authentication tag in bytes, see [ CCM mode] [ ] . In GCM mode, the ` authTagLength `
30333040option is not required but can be used to set the length of the authentication
30343041tag that will be returned by ` getAuthTag() ` and defaults to 16 bytes.
3042+ For ` chacha20-poly1305 ` , the ` authTagLength ` option defaults to 16 bytes.
30353043
30363044The ` algorithm ` is dependent on OpenSSL, examples are ` 'aes192' ` , etc. On
30373045recent OpenSSL releases, ` openssl list -cipher-algorithms ` will
@@ -3059,6 +3067,10 @@ given IV will be.
30593067added: v0.1.94
30603068deprecated: v10.0.0
30613069changes:
3070+ - version: REPLACEME
3071+ pr-url: https://github.com/nodejs/node/pull/42427
3072+ description: The `authTagLength` option is now optional when using the
3073+ `chacha20-poly1305` cipher and defaults to 16 bytes.
30623074 - version: v10.10.0
30633075 pr-url: https://github.com/nodejs/node/pull/21447
30643076 description: Ciphers in OCB mode are now supported.
@@ -3075,10 +3087,10 @@ Creates and returns a `Decipher` object that uses the given `algorithm` and
30753087` password ` (key).
30763088
30773089The ` options ` argument controls stream behavior and is optional except when a
3078- cipher in CCM or OCB mode (e.g. ` 'aes-128-ccm' ` ) or ` chacha20-poly1305 ` is used.
3079- In that case, the
3090+ cipher in CCM or OCB mode (e.g. ` 'aes-128-ccm' ` ) is used. In that case, the
30803091` authTagLength ` option is required and specifies the length of the
30813092authentication tag in bytes, see [ CCM mode] [ ] .
3093+ For ` chacha20-poly1305 ` , the ` authTagLength ` option defaults to 16 bytes.
30823094
30833095The implementation of ` crypto.createDecipher() ` derives keys using the OpenSSL
30843096function [ ` EVP_BytesToKey ` ] [ ] with the digest algorithm set to MD5, one
@@ -3097,6 +3109,10 @@ to create the `Decipher` object.
30973109<!-- YAML
30983110added: v0.1.94
30993111changes:
3112+ - version: REPLACEME
3113+ pr-url: https://github.com/nodejs/node/pull/42427
3114+ description: The `authTagLength` option is now optional when using the
3115+ `chacha20-poly1305` cipher and defaults to 16 bytes.
31003116 - version: v11.6.0
31013117 pr-url: https://github.com/nodejs/node/pull/24234
31023118 description: The `key` argument can now be a `KeyObject`.
@@ -3129,12 +3145,12 @@ Creates and returns a `Decipher` object that uses the given `algorithm`, `key`
31293145and initialization vector (` iv ` ).
31303146
31313147The ` options ` argument controls stream behavior and is optional except when a
3132- cipher in CCM or OCB mode (e.g. ` 'aes-128-ccm' ` ) or ` chacha20-poly1305 ` is used.
3133- In that case, the
3148+ cipher in CCM or OCB mode (e.g. ` 'aes-128-ccm' ` ) is used. In that case, the
31343149` authTagLength ` option is required and specifies the length of the
31353150authentication tag in bytes, see [ CCM mode] [ ] . In GCM mode, the ` authTagLength `
31363151option is not required but can be used to restrict accepted authentication tags
31373152to those with the specified length.
3153+ For ` chacha20-poly1305 ` , the ` authTagLength ` option defaults to 16 bytes.
31383154
31393155The ` algorithm ` is dependent on OpenSSL, examples are ` 'aes192' ` , etc. On
31403156recent OpenSSL releases, ` openssl list -cipher-algorithms ` will
0 commit comments