| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -371,6 +371,14 @@ received _authentication tag_. If no tag is provided, or if the cipher text | |||
| 371 | 371 | has been tampered with, [`decipher.final()`][] will throw, indicating that the | |
| 372 | 372 | cipher text should be discarded due to failed authentication. | |
| 373 | 373 | ||
| 374 | + Note that this Node.js version does not verify the length of GCM authentication | ||
| 375 | + tags. Such a check *must* be implemented by applications and is crucial to the | ||
| 376 | + authenticity of the encrypted data, otherwise, an attacker can use an | ||
| 377 | + arbitrarily short authentication tag to increase the chances of successfully | ||
| 378 | + passing authentication (up to 0.39%). It is highly recommended to associate one | ||
| 379 | + of the values 16, 15, 14, 13, 12, 8 or 4 bytes with each key, and to only permit | ||
| 380 | + authentication tags of that length, see [NIST SP 800-38D][]. | ||
| 381 | + | ||
| 374 | 382 | The `decipher.setAuthTag()` method must be called before | |
| 375 | 383 | [`decipher.final()`][]. | |
| 376 | 384 | ||
@@ -2288,6 +2296,7 @@ the `crypto`, `tls`, and `https` modules and are generally specific to OpenSSL. | |||
| 2288 | 2296 | [HTML5's `keygen` element]: https://www.w3.org/TR/html5/forms.html#the-keygen-element | |
| 2289 | 2297 | [NIST SP 800-131A]: http://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-131Ar1.pdf | |
| 2290 | 2298 | [NIST SP 800-132]: http://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-132.pdf | |
| 2299 | + [NIST SP 800-38D]: http://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-38d.pdf | ||
| 2291 | 2300 | [Nonce-Disrespecting Adversaries]: https://github.com/nonce-disrespect/nonce-disrespect | |
| 2292 | 2301 | [OpenSSL's SPKAC implementation]: https://www.openssl.org/docs/man1.0.2/apps/spkac.html | |
| 2293 | 2302 | [RFC 2412]: https://www.rfc-editor.org/rfc/rfc2412.txt | |
| Back | FazBrowse Home | New Git URL |
0 commit comments