@@ -2944,6 +2944,10 @@ Checks the primality of the `candidate`.
29442944added: v0.1.94
29452945deprecated: v10.0.0
29462946changes:
2947+ - version: REPLACEME
2948+ pr-url: https://github.com/nodejs/node/pull/42427
2949+ description: The `authTagLength` option is now optional when using the
2950+ `chacha20-poly1305` cipher and defaults to 16 bytes.
29472951 - version: v15.0.0
29482952 pr-url: https://github.com/nodejs/node/pull/35093
29492953 description: The password argument can be an ArrayBuffer and is limited to
@@ -2968,12 +2972,12 @@ Creates and returns a `Cipher` object that uses the given `algorithm` and
29682972` password ` .
29692973
29702974The ` options ` argument controls stream behavior and is optional except when a
2971- cipher in CCM or OCB mode (e.g. ` 'aes-128-ccm' ` ) or ` chacha20-poly1305 ` is used.
2972- In that case, the
2975+ cipher in CCM or OCB mode (e.g. ` 'aes-128-ccm' ` ) is used. In that case, the
29732976` authTagLength ` option is required and specifies the length of the
29742977authentication tag in bytes, see [ CCM mode] [ ] . In GCM mode, the ` authTagLength `
29752978option is not required but can be used to set the length of the authentication
29762979tag that will be returned by ` getAuthTag() ` and defaults to 16 bytes.
2980+ For ` chacha20-poly1305 ` , the ` authTagLength ` option defaults to 16 bytes.
29772981
29782982The ` algorithm ` is dependent on OpenSSL, examples are ` 'aes192' ` , etc. On
29792983recent OpenSSL releases, ` openssl list -cipher-algorithms ` will
@@ -3004,6 +3008,10 @@ Adversaries][] for details.
30043008<!-- YAML
30053009added: v0.1.94
30063010changes:
3011+ - version: REPLACEME
3012+ pr-url: https://github.com/nodejs/node/pull/42427
3013+ description: The `authTagLength` option is now optional when using the
3014+ `chacha20-poly1305` cipher and defaults to 16 bytes.
30073015 - version: v15.0.0
30083016 pr-url: https://github.com/nodejs/node/pull/35093
30093017 description: The password and iv arguments can be an ArrayBuffer and are
@@ -3040,12 +3048,12 @@ Creates and returns a `Cipher` object, with the given `algorithm`, `key` and
30403048initialization vector (` iv ` ).
30413049
30423050The ` options ` argument controls stream behavior and is optional except when a
3043- cipher in CCM or OCB mode (e.g. ` 'aes-128-ccm' ` ) or ` chacha20-poly1305 ` is used.
3044- In that case, the
3051+ cipher in CCM or OCB mode (e.g. ` 'aes-128-ccm' ` ) is used. In that case, the
30453052` authTagLength ` option is required and specifies the length of the
30463053authentication tag in bytes, see [ CCM mode] [ ] . In GCM mode, the ` authTagLength `
30473054option is not required but can be used to set the length of the authentication
30483055tag that will be returned by ` getAuthTag() ` and defaults to 16 bytes.
3056+ For ` chacha20-poly1305 ` , the ` authTagLength ` option defaults to 16 bytes.
30493057
30503058The ` algorithm ` is dependent on OpenSSL, examples are ` 'aes192' ` , etc. On
30513059recent OpenSSL releases, ` openssl list -cipher-algorithms ` will
@@ -3073,6 +3081,10 @@ given IV will be.
30733081added: v0.1.94
30743082deprecated: v10.0.0
30753083changes:
3084+ - version: REPLACEME
3085+ pr-url: https://github.com/nodejs/node/pull/42427
3086+ description: The `authTagLength` option is now optional when using the
3087+ `chacha20-poly1305` cipher and defaults to 16 bytes.
30763088 - version: v10.10.0
30773089 pr-url: https://github.com/nodejs/node/pull/21447
30783090 description: Ciphers in OCB mode are now supported.
@@ -3089,10 +3101,10 @@ Creates and returns a `Decipher` object that uses the given `algorithm` and
30893101` password ` (key).
30903102
30913103The ` options ` argument controls stream behavior and is optional except when a
3092- cipher in CCM or OCB mode (e.g. ` 'aes-128-ccm' ` ) or ` chacha20-poly1305 ` is used.
3093- In that case, the
3104+ cipher in CCM or OCB mode (e.g. ` 'aes-128-ccm' ` ) is used. In that case, the
30943105` authTagLength ` option is required and specifies the length of the
30953106authentication tag in bytes, see [ CCM mode] [ ] .
3107+ For ` chacha20-poly1305 ` , the ` authTagLength ` option defaults to 16 bytes.
30963108
30973109The implementation of ` crypto.createDecipher() ` derives keys using the OpenSSL
30983110function [ ` EVP_BytesToKey ` ] [ ] with the digest algorithm set to MD5, one
@@ -3111,6 +3123,10 @@ to create the `Decipher` object.
31113123<!-- YAML
31123124added: v0.1.94
31133125changes:
3126+ - version: REPLACEME
3127+ pr-url: https://github.com/nodejs/node/pull/42427
3128+ description: The `authTagLength` option is now optional when using the
3129+ `chacha20-poly1305` cipher and defaults to 16 bytes.
31143130 - version: v11.6.0
31153131 pr-url: https://github.com/nodejs/node/pull/24234
31163132 description: The `key` argument can now be a `KeyObject`.
@@ -3143,12 +3159,12 @@ Creates and returns a `Decipher` object that uses the given `algorithm`, `key`
31433159and initialization vector (` iv ` ).
31443160
31453161The ` options ` argument controls stream behavior and is optional except when a
3146- cipher in CCM or OCB mode (e.g. ` 'aes-128-ccm' ` ) or ` chacha20-poly1305 ` is used.
3147- In that case, the
3162+ cipher in CCM or OCB mode (e.g. ` 'aes-128-ccm' ` ) is used. In that case, the
31483163` authTagLength ` option is required and specifies the length of the
31493164authentication tag in bytes, see [ CCM mode] [ ] . In GCM mode, the ` authTagLength `
31503165option is not required but can be used to restrict accepted authentication tags
31513166to those with the specified length.
3167+ For ` chacha20-poly1305 ` , the ` authTagLength ` option defaults to 16 bytes.
31523168
31533169The ` algorithm ` is dependent on OpenSSL, examples are ` 'aes192' ` , etc. On
31543170recent OpenSSL releases, ` openssl list -cipher-algorithms ` will
0 commit comments