@@ -249,11 +249,11 @@ added: v1.0.0
249
249
- ` plaintextLength ` {number}
250
250
* Returns: {Cipher} for method chaining.
251
251
252
- When using an authenticated encryption mode (only ` GCM ` and ` CCM ` are currently
253
- supported), the ` cipher.setAAD() ` method sets the value used for the
252
+ When using an authenticated encryption mode (` GCM ` , ` CCM ` and ` OCB ` are
253
+ currently supported), the ` cipher.setAAD() ` method sets the value used for the
254
254
_ additional authenticated data_ (AAD) input parameter.
255
255
256
- The ` options ` argument is optional for ` GCM ` . When using ` CCM ` , the
256
+ The ` options ` argument is optional for ` GCM ` and ` OCB ` . When using ` CCM ` , the
257
257
` plaintextLength ` option must be specified and its value must match the length
258
258
of the plaintext in bytes. See [ CCM mode] [ ] .
259
259
@@ -263,8 +263,8 @@ The `cipher.setAAD()` method must be called before [`cipher.update()`][].
263
263
<!-- YAML
264
264
added: v1.0.0
265
265
-->
266
- * Returns: {Buffer} When using an authenticated encryption mode (only ` GCM ` and
267
- ` CCM ` are currently supported), the ` cipher.getAuthTag() ` method returns a
266
+ * Returns: {Buffer} When using an authenticated encryption mode (` GCM ` , ` CCM `
267
+ and ` OCB ` are currently supported), the ` cipher.getAuthTag() ` method returns a
268
268
[ ` Buffer ` ] [ ] containing the _ authentication tag_ that has been computed from
269
269
the given data.
270
270
@@ -412,8 +412,8 @@ changes:
412
412
- ` plaintextLength ` {number}
413
413
* Returns: {Decipher} for method chaining.
414
414
415
- When using an authenticated encryption mode (only ` GCM ` and ` CCM ` are currently
416
- supported), the ` decipher.setAAD() ` method sets the value used for the
415
+ When using an authenticated encryption mode (` GCM ` , ` CCM ` and ` OCB ` are
416
+ currently supported), the ` decipher.setAAD() ` method sets the value used for the
417
417
_ additional authenticated data_ (AAD) input parameter.
418
418
419
419
The ` options ` argument is optional for ` GCM ` . When using ` CCM ` , the
@@ -436,8 +436,8 @@ changes:
436
436
* ` buffer ` {Buffer | TypedArray | DataView}
437
437
* Returns: {Decipher} for method chaining.
438
438
439
- When using an authenticated encryption mode (only ` GCM ` and ` CCM ` are currently
440
- supported), the ` decipher.setAuthTag() ` method is used to pass in the
439
+ When using an authenticated encryption mode (` GCM ` , ` CCM ` and ` OCB ` are
440
+ currently supported), the ` decipher.setAuthTag() ` method is used to pass in the
441
441
received _ authentication tag_ . If no tag is provided, or if the cipher text
442
442
has been tampered with, [ ` decipher.final() ` ] [ ] will throw, indicating that the
443
443
cipher text should be discarded due to failed authentication. If the tag length
@@ -1321,6 +1321,9 @@ This property is deprecated. Please use `crypto.setFips()` and
1321
1321
added: v0.1.94
1322
1322
deprecated: v10.0.0
1323
1323
changes:
1324
+ - version: REPLACEME
1325
+ pr-url: https://github.com/nodejs/node/pull/21447
1326
+ description: Ciphers in OCB mode are now supported.
1324
1327
- version: v10.2.0
1325
1328
pr-url: https://github.com/nodejs/node/pull/20235
1326
1329
description: The `authTagLength` option can now be used to produce shorter
@@ -1338,7 +1341,7 @@ Creates and returns a `Cipher` object that uses the given `algorithm` and
1338
1341
` password ` .
1339
1342
1340
1343
The ` options ` argument controls stream behavior and is optional except when a
1341
- cipher in CCM mode is used (e.g. ` 'aes-128-ccm' ` ). In that case, the
1344
+ cipher in CCM or OCB mode is used (e.g. ` 'aes-128-ccm' ` ). In that case, the
1342
1345
` authTagLength ` option is required and specifies the length of the
1343
1346
authentication tag in bytes, see [ CCM mode] [ ] . In GCM mode, the ` authTagLength `
1344
1347
option is not required but can be used to set the length of the authentication
@@ -1373,6 +1376,9 @@ Adversaries][] for details.
1373
1376
<!-- YAML
1374
1377
added: v0.1.94
1375
1378
changes:
1379
+ - version: REPLACEME
1380
+ pr-url: https://github.com/nodejs/node/pull/21447
1381
+ description: Ciphers in OCB mode are now supported.
1376
1382
- version: v10.2.0
1377
1383
pr-url: https://github.com/nodejs/node/pull/20235
1378
1384
description: The `authTagLength` option can now be used to produce shorter
@@ -1392,7 +1398,7 @@ Creates and returns a `Cipher` object, with the given `algorithm`, `key` and
1392
1398
initialization vector (` iv ` ).
1393
1399
1394
1400
The ` options ` argument controls stream behavior and is optional except when a
1395
- cipher in CCM mode is used (e.g. ` 'aes-128-ccm' ` ). In that case, the
1401
+ cipher in CCM or OCB mode is used (e.g. ` 'aes-128-ccm' ` ). In that case, the
1396
1402
` authTagLength ` option is required and specifies the length of the
1397
1403
authentication tag in bytes, see [ CCM mode] [ ] . In GCM mode, the ` authTagLength `
1398
1404
option is not required but can be used to set the length of the authentication
@@ -1419,6 +1425,10 @@ of time what a given IV will be.
1419
1425
<!-- YAML
1420
1426
added: v0.1.94
1421
1427
deprecated: v10.0.0
1428
+ changes:
1429
+ - version: REPLACEME
1430
+ pr-url: https://github.com/nodejs/node/pull/21447
1431
+ description: Ciphers in OCB mode are now supported.
1422
1432
-->
1423
1433
1424
1434
> Stability: 0 - Deprecated: Use [ ` crypto.createDecipheriv() ` ] [ ] instead.
@@ -1432,7 +1442,7 @@ Creates and returns a `Decipher` object that uses the given `algorithm` and
1432
1442
` password ` (key).
1433
1443
1434
1444
The ` options ` argument controls stream behavior and is optional except when a
1435
- cipher in CCM mode is used (e.g. ` 'aes-128-ccm' ` ). In that case, the
1445
+ cipher in CCM or OCB mode is used (e.g. ` 'aes-128-ccm' ` ). In that case, the
1436
1446
` authTagLength ` option is required and specifies the length of the
1437
1447
authentication tag in bytes, see [ CCM mode] [ ] .
1438
1448
@@ -1452,6 +1462,9 @@ to create the `Decipher` object.
1452
1462
<!-- YAML
1453
1463
added: v0.1.94
1454
1464
changes:
1465
+ - version: REPLACEME
1466
+ pr-url: https://github.com/nodejs/node/pull/21447
1467
+ description: Ciphers in OCB mode are now supported.
1455
1468
- version: v10.2.0
1456
1469
pr-url: https://github.com/nodejs/node/pull/20039
1457
1470
description: The `authTagLength` option can now be used to restrict accepted
@@ -1471,7 +1484,7 @@ Creates and returns a `Decipher` object that uses the given `algorithm`, `key`
1471
1484
and initialization vector (` iv ` ).
1472
1485
1473
1486
The ` options ` argument controls stream behavior and is optional except when a
1474
- cipher in CCM mode is used (e.g. ` 'aes-128-ccm' ` ). In that case, the
1487
+ cipher in CCM or OCB mode is used (e.g. ` 'aes-128-ccm' ` ). In that case, the
1475
1488
` authTagLength ` option is required and specifies the length of the
1476
1489
authentication tag in bytes, see [ CCM mode] [ ] . In GCM mode, the ` authTagLength `
1477
1490
option is not required but can be used to restrict accepted authentication tags
@@ -2321,7 +2334,7 @@ See the reference for other recommendations and details.
2321
2334
2322
2335
### CCM mode
2323
2336
2324
- CCM is one of the two supported [ AEAD algorithms] [ ] . Applications which use this
2337
+ CCM is one of the supported [ AEAD algorithms] [ ] . Applications which use this
2325
2338
mode must adhere to certain restrictions when using the cipher API:
2326
2339
2327
2340
- The authentication tag length must be specified during cipher creation by
0 commit comments