Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v6.x backport] crypto: warn if counter mode used in createCipher #16583

Closed

Commits on Oct 29, 2017

  1. crypto: warn if counter mode used in createCipher

    `crypto.createCipher()` sets the fixed IV derived from password and it
    leads to a security risk of nonce reuse when counter mode is used.
    A warning is emitted when CTR, GCM or CCM is used in
    `crypto.createCipher()` to notify users to avoid nonce reuse.
    
    Fixes: nodejs#13801
    PR-URL: nodejs#13821
    Reviewed-By: Ben Noordhuis <[email protected]>
    Reviewed-By: Fedor Indutny <[email protected]>
    Reviewed-By: James M Snell <[email protected]>
    Reviewed-By: Tobias Nießen <[email protected]>
    shigeki authored and bnoordhuis committed Oct 29, 2017
    Configuration menu
    Copy the full SHA
    16c08c5 View commit details
    Browse the repository at this point in the history
  2. test: add regression test for counter mode warning

    The previous commit is a back-port of pull request nodejs#13821 to v6.x.
    Its regression test does not apply to the v6.x branch (depends on
    semver-major pull request nodejs#9405) so this commit adds a new test.
    
    Refs: nodejs#13821
    Refs: nodejs#9405
    bnoordhuis committed Oct 29, 2017
    Configuration menu
    Copy the full SHA
    0be25bb View commit details
    Browse the repository at this point in the history