@@ -2948,6 +2948,10 @@ Checks the primality of the `candidate`.
29482948added: v0.1.94
29492949deprecated: v10.0.0
29502950changes:
2951+ - version: REPLACEME
2952+ pr-url: https://github.com/nodejs/node/pull/42427
2953+ description: The `authTagLength` option is now optional when using the
2954+ `chacha20-poly1305` cipher and defaults to 16 bytes.
29512955 - version: v15.0.0
29522956 pr-url: https://github.com/nodejs/node/pull/35093
29532957 description: The password argument can be an ArrayBuffer and is limited to
@@ -2972,12 +2976,12 @@ Creates and returns a `Cipher` object that uses the given `algorithm` and
29722976` password ` .
29732977
29742978The ` options ` argument controls stream behavior and is optional except when a
2975- cipher in CCM or OCB mode (e.g. ` 'aes-128-ccm' ` ) or ` chacha20-poly1305 ` is used.
2976- In that case, the
2979+ cipher in CCM or OCB mode (e.g. ` 'aes-128-ccm' ` ) is used. In that case, the
29772980` authTagLength ` option is required and specifies the length of the
29782981authentication tag in bytes, see [ CCM mode] [ ] . In GCM mode, the ` authTagLength `
29792982option is not required but can be used to set the length of the authentication
29802983tag that will be returned by ` getAuthTag() ` and defaults to 16 bytes.
2984+ For ` chacha20-poly1305 ` , the ` authTagLength ` option defaults to 16 bytes.
29812985
29822986The ` algorithm ` is dependent on OpenSSL, examples are ` 'aes192' ` , etc. On
29832987recent OpenSSL releases, ` openssl list -cipher-algorithms ` will
@@ -3008,6 +3012,10 @@ Adversaries][] for details.
30083012<!-- YAML
30093013added: v0.1.94
30103014changes:
3015+ - version: REPLACEME
3016+ pr-url: https://github.com/nodejs/node/pull/42427
3017+ description: The `authTagLength` option is now optional when using the
3018+ `chacha20-poly1305` cipher and defaults to 16 bytes.
30113019 - version: v15.0.0
30123020 pr-url: https://github.com/nodejs/node/pull/35093
30133021 description: The password and iv arguments can be an ArrayBuffer and are
@@ -3044,12 +3052,12 @@ Creates and returns a `Cipher` object, with the given `algorithm`, `key` and
30443052initialization vector (` iv ` ).
30453053
30463054The ` options ` argument controls stream behavior and is optional except when a
3047- cipher in CCM or OCB mode (e.g. ` 'aes-128-ccm' ` ) or ` chacha20-poly1305 ` is used.
3048- In that case, the
3055+ cipher in CCM or OCB mode (e.g. ` 'aes-128-ccm' ` ) is used. In that case, the
30493056` authTagLength ` option is required and specifies the length of the
30503057authentication tag in bytes, see [ CCM mode] [ ] . In GCM mode, the ` authTagLength `
30513058option is not required but can be used to set the length of the authentication
30523059tag that will be returned by ` getAuthTag() ` and defaults to 16 bytes.
3060+ For ` chacha20-poly1305 ` , the ` authTagLength ` option defaults to 16 bytes.
30533061
30543062The ` algorithm ` is dependent on OpenSSL, examples are ` 'aes192' ` , etc. On
30553063recent OpenSSL releases, ` openssl list -cipher-algorithms ` will
@@ -3077,6 +3085,10 @@ given IV will be.
30773085added: v0.1.94
30783086deprecated: v10.0.0
30793087changes:
3088+ - version: REPLACEME
3089+ pr-url: https://github.com/nodejs/node/pull/42427
3090+ description: The `authTagLength` option is now optional when using the
3091+ `chacha20-poly1305` cipher and defaults to 16 bytes.
30803092 - version: v10.10.0
30813093 pr-url: https://github.com/nodejs/node/pull/21447
30823094 description: Ciphers in OCB mode are now supported.
@@ -3093,10 +3105,10 @@ Creates and returns a `Decipher` object that uses the given `algorithm` and
30933105` password ` (key).
30943106
30953107The ` options ` argument controls stream behavior and is optional except when a
3096- cipher in CCM or OCB mode (e.g. ` 'aes-128-ccm' ` ) or ` chacha20-poly1305 ` is used.
3097- In that case, the
3108+ cipher in CCM or OCB mode (e.g. ` 'aes-128-ccm' ` ) is used. In that case, the
30983109` authTagLength ` option is required and specifies the length of the
30993110authentication tag in bytes, see [ CCM mode] [ ] .
3111+ For ` chacha20-poly1305 ` , the ` authTagLength ` option defaults to 16 bytes.
31003112
31013113The implementation of ` crypto.createDecipher() ` derives keys using the OpenSSL
31023114function [ ` EVP_BytesToKey ` ] [ ] with the digest algorithm set to MD5, one
@@ -3115,6 +3127,10 @@ to create the `Decipher` object.
31153127<!-- YAML
31163128added: v0.1.94
31173129changes:
3130+ - version: REPLACEME
3131+ pr-url: https://github.com/nodejs/node/pull/42427
3132+ description: The `authTagLength` option is now optional when using the
3133+ `chacha20-poly1305` cipher and defaults to 16 bytes.
31183134 - version: v11.6.0
31193135 pr-url: https://github.com/nodejs/node/pull/24234
31203136 description: The `key` argument can now be a `KeyObject`.
@@ -3147,12 +3163,12 @@ Creates and returns a `Decipher` object that uses the given `algorithm`, `key`
31473163and initialization vector (` iv ` ).
31483164
31493165The ` options ` argument controls stream behavior and is optional except when a
3150- cipher in CCM or OCB mode (e.g. ` 'aes-128-ccm' ` ) or ` chacha20-poly1305 ` is used.
3151- In that case, the
3166+ cipher in CCM or OCB mode (e.g. ` 'aes-128-ccm' ` ) is used. In that case, the
31523167` authTagLength ` option is required and specifies the length of the
31533168authentication tag in bytes, see [ CCM mode] [ ] . In GCM mode, the ` authTagLength `
31543169option is not required but can be used to restrict accepted authentication tags
31553170to those with the specified length.
3171+ For ` chacha20-poly1305 ` , the ` authTagLength ` option defaults to 16 bytes.
31563172
31573173The ` algorithm ` is dependent on OpenSSL, examples are ` 'aes192' ` , etc. On
31583174recent OpenSSL releases, ` openssl list -cipher-algorithms ` will
0 commit comments