Skip to content

crypto: add support for SHA3 #1315

Description

@bricss

It would be great to add support for SHA3 (Keccak) algorithm to crypto.createHash, cause NIST has approved it in back October 2012 and we need to install third-party extensions in our days to use it.

Activity

  1. added
    cryptoIssues and PRs related to the crypto subsystem.
    on Apr 1, 2015
  2. mscdex commented on Apr 1, 2015

    @mscdex
    Contributor

    Is SHA-3 even standardized yet? I don't think OpenSSL supports it yet either...

  3. bricss commented on Apr 1, 2015

    @bricss
    ContributorAuthor

    Nope, it's not...

  4. Fishrock123 commented on Apr 1, 2015

    @Fishrock123
    Contributor

    I don't think we support anything in core that isn't in OpenSSL.

    We'll be upgrading to OpenSSL 1.0.2 soon, if that helps. (#589)

  5. bricss commented on Apr 1, 2015

    @bricss
    ContributorAuthor

    Yes, I agree, I should to first check OpenSSL for SHA3 support.

  6. passcod commented on Sep 20, 2017

    @passcod

    Just wanted to mention that Keccak support is in OpenSSL (but unreleased as of yet): openssl/openssl#439 so SHA3 will presumably get supported once the next OpenSSL gets out and Node upgrades to it.

  7. ppKrauss commented on Jan 31, 2019

    @ppKrauss

    Please reopen, please see https://www.openssl.org/blog/blog/2018/09/11/release111/

    OpenSSL 1.1.1 Is Released
    ...
    Support for various new cryptographic algorithms including:
    SHA3
    ....

  8. sam-github commented on Jan 31, 2019

    @sam-github
    Contributor

    @ppKrauss have you tried node 11.9.0? crypto.getHashes() suggests 'sha3' is supported.

  9. ppKrauss commented on Jan 31, 2019

    @ppKrauss

    Thanks @sam-github , seems the problem... How to check my crypto-module version?

    https://stackoverflow.com/q/54469183/287948

  10. ppKrauss commented on Jan 31, 2019

    @ppKrauss

    Sorry @sam-github , now is working!

    UBUNTU apt is ugly and confuse never updated NodeJS (!), but sudo n latest upgraded from "v8.8.1" to "v11.9.0"... Now is working fine (RSA-SHA3-256) !


    Any clues about this question, "how to check crypto module version?"

  11. sam-github commented on Feb 1, 2019

    @sam-github
    Contributor

    node -p process.versions.openssl

  12. RSginer commented on May 22, 2019

    @RSginer

    It's in mind to implement that on previous LTS versions?

    I am in 8.12.0
    > crypto.getHashes()
    >[ 'DSA', 'DSA-SHA', 'DSA-SHA1', 'DSA-SHA1-old', 'RSA-MD4', 'RSA-MD5', 'RSA-MDC2', 'RSA-RIPEMD160', 'RSA-SHA', 'RSA-SHA1', 'RSA-SHA1-2', 'RSA-SHA224', 'RSA-SHA256', 'RSA-SHA384', 'RSA-SHA512', 'dsaEncryption', 'dsaWithSHA', 'dsaWithSHA1', 'dss1', 'ecdsa-with-SHA1', 'md4', 'md4WithRSAEncryption', 'md5', 'md5WithRSAEncryption', 'mdc2', 'mdc2WithRSA', 'ripemd', 'ripemd160', 'ripemd160WithRSA', 'rmd160', 'sha', 'sha1', 'sha1WithRSAEncryption', 'sha224', 'sha224WithRSAEncryption', 'sha256', 'sha256WithRSAEncryption', 'sha384', 'sha384WithRSAEncryption', 'sha512', 'sha512WithRSAEncryption', 'shaWithRSAEncryption', 'ssl2-md5', 'ssl3-md5', 'ssl3-sha1', 'whirlpool' ]

  13. mscdex commented on May 22, 2019

    @mscdex
    Contributor

    @RSginer OpenSSL 1.1.1 has already been backported to v10.x and will be in the next v10.x release. v8.x still only has OpenSSL 1.0.2 and there is no PR to backport OpenSSL 1.1.1 to that branch yet. It's unlikely v8.x will get it as it's been in maintenance mode since the beginning of this year and will EOL in December.

  14. RSginer commented on May 22, 2019

    @RSginer

    @mscdex great! Thanks a lot

  15. troppoli commented on Jul 16, 2019

    @troppoli

    @RSginer OpenSSL 1.1.1 has already been backported to v10.x and will be in the next v10.x release. v8.x still only has OpenSSL 1.0.2 and there is no PR to backport OpenSSL 1.1.1 to that branch yet. It's unlikely v8.x will get it as it's been in maintenance mode since the beginning of this year and will EOL in December.

    I'm not sure that this made it in. I updated to 10.15.3 and there's no sha-3

    C:\foo>node -v
    v10.15.3
    C:\foo>node -p process.versions.openssl
    1.1.0j
    C:\foo>node
    > require('crypto').getHashes()
    [ 'RSA-MD4',
      'RSA-MD5',
      'RSA-MDC2',
      'RSA-RIPEMD160',
      'RSA-SHA1',
      'RSA-SHA1-2',
      'RSA-SHA224',
      'RSA-SHA256',
      'RSA-SHA384',
      'RSA-SHA512',
      'blake2b512',
      'blake2s256',
      'md4',
      'md4WithRSAEncryption',
      'md5',
      'md5-sha1',
      'md5WithRSAEncryption',
      'mdc2',
      'mdc2WithRSA',
      'ripemd',
      'ripemd160',
      'ripemd160WithRSA',
      'rmd160',
      'sha1',
      'sha1WithRSAEncryption',
      'sha224',
      'sha224WithRSAEncryption',
      'sha256',
      'sha256WithRSAEncryption',
      'sha384',
      'sha384WithRSAEncryption',
      'sha512',
      'sha512WithRSAEncryption',
      'ssl3-md5',
      'ssl3-sha1',
      'whirlpool' ]
    >
    
  16. bricss commented on Jul 16, 2019

    @bricss
    ContributorAuthor

    @troppoli You will find it in Node.js >= 12

  17. troppoli commented on Jul 16, 2019

    @troppoli

    @bricss @RSginer Sorry for the fire drill, my update to latest didn't get me the latest in LTS 10.16.0, and that does have sha-3

    C:\foo>node -v
    v10.16.0
    
    C:\foo>node
    > require('crypto').getHashes()
    [ 'RSA-MD4',
      'RSA-MD5',
      'RSA-MDC2',
      'RSA-RIPEMD160',
      'RSA-SHA1',
      'RSA-SHA1-2',
      'RSA-SHA224',
      'RSA-SHA256',
      'RSA-SHA3-224',
      'RSA-SHA3-256',
      'RSA-SHA3-384',
      'RSA-SHA3-512',
      'RSA-SHA384',
      'RSA-SHA512',
      'RSA-SHA512/224',
      'RSA-SHA512/256',
      'RSA-SM3',
      'blake2b512',
      'blake2s256',
      'id-rsassa-pkcs1-v1_5-with-sha3-224',
      'id-rsassa-pkcs1-v1_5-with-sha3-256',
      'id-rsassa-pkcs1-v1_5-with-sha3-384',
      'id-rsassa-pkcs1-v1_5-with-sha3-512',
      'md4',
      'md4WithRSAEncryption',
      'md5',
      'md5-sha1',
      'md5WithRSAEncryption',
      'mdc2',
      'mdc2WithRSA',
      'ripemd',
      'ripemd160',
      'ripemd160WithRSA',
      'rmd160',
      'sha1',
      'sha1WithRSAEncryption',
      'sha224',
      'sha224WithRSAEncryption',
      'sha256',
      'sha256WithRSAEncryption',
      'sha3-224',
      'sha3-256',
      'sha3-384',
      'sha3-512',
      'sha384',
      'sha384WithRSAEncryption',
      'sha512',
      'sha512-224',
      'sha512-224WithRSAEncryption',
      'sha512-256',
      'sha512-256WithRSAEncryption',
      'sha512WithRSAEncryption',
      'shake128',
      'shake256',
      'sm3',
      'sm3WithRSAEncryption',
      'ssl3-md5',
      'ssl3-sha1',
      'whirlpool' ]
    >
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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