@@ -2926,6 +2926,10 @@ Checks the primality of the `candidate`.
29262926added: v0.1.94
29272927deprecated: v10.0.0
29282928changes:
2929+ - version: REPLACEME
2930+ pr-url: https://github.com/nodejs/node/pull/42427
2931+ description: The `authTagLength` option is now optional when using the
2932+ `chacha20-poly1305` cipher and defaults to 16 bytes.
29292933 - version: v15.0.0
29302934 pr-url: https://github.com/nodejs/node/pull/35093
29312935 description: The password argument can be an ArrayBuffer and is limited to
@@ -2950,12 +2954,12 @@ Creates and returns a `Cipher` object that uses the given `algorithm` and
29502954` password ` .
29512955
29522956The ` options ` argument controls stream behavior and is optional except when a
2953- cipher in CCM or OCB mode (e.g. ` 'aes-128-ccm' ` ) or ` chacha20-poly1305 ` is used.
2954- In that case, the
2957+ cipher in CCM or OCB mode (e.g. ` 'aes-128-ccm' ` ) is used. In that case, the
29552958` authTagLength ` option is required and specifies the length of the
29562959authentication tag in bytes, see [ CCM mode] [ ] . In GCM mode, the ` authTagLength `
29572960option is not required but can be used to set the length of the authentication
29582961tag that will be returned by ` getAuthTag() ` and defaults to 16 bytes.
2962+ For ` chacha20-poly1305 ` , the ` authTagLength ` option defaults to 16 bytes.
29592963
29602964The ` algorithm ` is dependent on OpenSSL, examples are ` 'aes192' ` , etc. On
29612965recent OpenSSL releases, ` openssl list -cipher-algorithms ` will
@@ -2986,6 +2990,10 @@ Adversaries][] for details.
29862990<!-- YAML
29872991added: v0.1.94
29882992changes:
2993+ - version: REPLACEME
2994+ pr-url: https://github.com/nodejs/node/pull/42427
2995+ description: The `authTagLength` option is now optional when using the
2996+ `chacha20-poly1305` cipher and defaults to 16 bytes.
29892997 - version: v15.0.0
29902998 pr-url: https://github.com/nodejs/node/pull/35093
29912999 description: The password and iv arguments can be an ArrayBuffer and are
@@ -3022,12 +3030,12 @@ Creates and returns a `Cipher` object, with the given `algorithm`, `key` and
30223030initialization vector (` iv ` ).
30233031
30243032The ` options ` argument controls stream behavior and is optional except when a
3025- cipher in CCM or OCB mode (e.g. ` 'aes-128-ccm' ` ) or ` chacha20-poly1305 ` is used.
3026- In that case, the
3033+ cipher in CCM or OCB mode (e.g. ` 'aes-128-ccm' ` ) is used. In that case, the
30273034` authTagLength ` option is required and specifies the length of the
30283035authentication tag in bytes, see [ CCM mode] [ ] . In GCM mode, the ` authTagLength `
30293036option is not required but can be used to set the length of the authentication
30303037tag that will be returned by ` getAuthTag() ` and defaults to 16 bytes.
3038+ For ` chacha20-poly1305 ` , the ` authTagLength ` option defaults to 16 bytes.
30313039
30323040The ` algorithm ` is dependent on OpenSSL, examples are ` 'aes192' ` , etc. On
30333041recent OpenSSL releases, ` openssl list -cipher-algorithms ` will
@@ -3055,6 +3063,10 @@ given IV will be.
30553063added: v0.1.94
30563064deprecated: v10.0.0
30573065changes:
3066+ - version: REPLACEME
3067+ pr-url: https://github.com/nodejs/node/pull/42427
3068+ description: The `authTagLength` option is now optional when using the
3069+ `chacha20-poly1305` cipher and defaults to 16 bytes.
30583070 - version: v10.10.0
30593071 pr-url: https://github.com/nodejs/node/pull/21447
30603072 description: Ciphers in OCB mode are now supported.
@@ -3071,10 +3083,10 @@ Creates and returns a `Decipher` object that uses the given `algorithm` and
30713083` password ` (key).
30723084
30733085The ` options ` argument controls stream behavior and is optional except when a
3074- cipher in CCM or OCB mode (e.g. ` 'aes-128-ccm' ` ) or ` chacha20-poly1305 ` is used.
3075- In that case, the
3086+ cipher in CCM or OCB mode (e.g. ` 'aes-128-ccm' ` ) is used. In that case, the
30763087` authTagLength ` option is required and specifies the length of the
30773088authentication tag in bytes, see [ CCM mode] [ ] .
3089+ For ` chacha20-poly1305 ` , the ` authTagLength ` option defaults to 16 bytes.
30783090
30793091The implementation of ` crypto.createDecipher() ` derives keys using the OpenSSL
30803092function [ ` EVP_BytesToKey ` ] [ ] with the digest algorithm set to MD5, one
@@ -3093,6 +3105,10 @@ to create the `Decipher` object.
30933105<!-- YAML
30943106added: v0.1.94
30953107changes:
3108+ - version: REPLACEME
3109+ pr-url: https://github.com/nodejs/node/pull/42427
3110+ description: The `authTagLength` option is now optional when using the
3111+ `chacha20-poly1305` cipher and defaults to 16 bytes.
30963112 - version: v11.6.0
30973113 pr-url: https://github.com/nodejs/node/pull/24234
30983114 description: The `key` argument can now be a `KeyObject`.
@@ -3125,12 +3141,12 @@ Creates and returns a `Decipher` object that uses the given `algorithm`, `key`
31253141and initialization vector (` iv ` ).
31263142
31273143The ` options ` argument controls stream behavior and is optional except when a
3128- cipher in CCM or OCB mode (e.g. ` 'aes-128-ccm' ` ) or ` chacha20-poly1305 ` is used.
3129- In that case, the
3144+ cipher in CCM or OCB mode (e.g. ` 'aes-128-ccm' ` ) is used. In that case, the
31303145` authTagLength ` option is required and specifies the length of the
31313146authentication tag in bytes, see [ CCM mode] [ ] . In GCM mode, the ` authTagLength `
31323147option is not required but can be used to restrict accepted authentication tags
31333148to those with the specified length.
3149+ For ` chacha20-poly1305 ` , the ` authTagLength ` option defaults to 16 bytes.
31343150
31353151The ` algorithm ` is dependent on OpenSSL, examples are ` 'aes192' ` , etc. On
31363152recent OpenSSL releases, ` openssl list -cipher-algorithms ` will
0 commit comments