Skip to content

crypto.createCipher should not work with AES-CTR #13801

Description

@iangcarroll

Node should not allow calls to crypto.createCipher to succeed when the AES mode selected is CTR. AES-CTR is fundamentally broken when an initialization vector is used twice, and crypto.createCipher will always generate the same initialization vector for the same key, so crypto.createCipheriv needs to be used.

In the short term, there should probably be a warning about this in the function's documentation.

Posted because of HainaLi/horcrux_password_manager#1.

Metadata

Metadata

Assignees

No one assigned

    Labels

    cryptoIssues and PRs related to the crypto subsystem.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions