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

createHash after createECDH with Oakley curves #4686

Closed
deian opened this issue Jan 14, 2016 · 3 comments
Closed

createHash after createECDH with Oakley curves #4686

deian opened this issue Jan 14, 2016 · 3 comments
Labels
crypto Issues and PRs related to the crypto subsystem.

Comments

@deian
Copy link
Member

deian commented Jan 14, 2016

version: 4.2.4

example failure:

const crypto = require('crypto');
crypto.createECDH('Oakley-EC2N-3'); // ok with 'secp256k1', also fails with Oakley-EC2N-4
crypto.createHash('sha256'); // also fails with 'md5', 'sha1'

unexpected output:

crypto.js:50
  this._handle = new binding.Hash(algorithm);
                 ^

Error: error:0306E06C:bignum routines:BN_mod_inverse:no inverse
    at Error (native)
    at new Hash (crypto.js:50:18)
    at Object.Hash (crypto.js:49:12)
    at Object.<anonymous> (example-fail.js:3:8)
    at Module._compile (module.js:435:26)
    at Object.Module._extensions..js (module.js:442:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:313:12)
    at Function.Module.runMain (module.js:467:10)
    at startup (node.js:136:18)

@mscdex mscdex added crypto Issues and PRs related to the crypto subsystem. v4.x labels Jan 14, 2016
@jasnell
Copy link
Member

jasnell commented Jan 14, 2016

@nodejs/crypto

@indutny
Copy link
Member

indutny commented Jan 14, 2016

Hell yes! Another cleanup error. I wonder if we should consider cleaning errors before doing any cryptography? Does it make sense @nodejs/crypto ?

indutny added a commit to indutny/io.js that referenced this issue Jan 14, 2016
Clean up OpenSSL error stack in `ECDH::Initialize`, some curves have
faulty implementations that are leaving dangling errors after
initializing the curve.

Fix: nodejs#4686
@indutny
Copy link
Member

indutny commented Jan 14, 2016

Should be fixed by #4689

evanlucas pushed a commit that referenced this issue Jan 18, 2016
Clean up OpenSSL error stack in `ECDH::Initialize`, some curves have
faulty implementations that are leaving dangling errors after
initializing the curve.

Fix: #4686
PR-URL: #4689
Reviewed-By: Sakthipriyan Vairamani <[email protected]>
Reviewed-By: Shigeki Ohtsu <[email protected]>
MylesBorins pushed a commit that referenced this issue Jan 28, 2016
Clean up OpenSSL error stack in `ECDH::Initialize`, some curves have
faulty implementations that are leaving dangling errors after
initializing the curve.

Fix: #4686
PR-URL: #4689
Reviewed-By: Sakthipriyan Vairamani <[email protected]>
Reviewed-By: Shigeki Ohtsu <[email protected]>
MylesBorins pushed a commit that referenced this issue Feb 11, 2016
Clean up OpenSSL error stack in `ECDH::Initialize`, some curves have
faulty implementations that are leaving dangling errors after
initializing the curve.

Fix: #4686
PR-URL: #4689
Reviewed-By: Sakthipriyan Vairamani <[email protected]>
Reviewed-By: Shigeki Ohtsu <[email protected]>
MylesBorins pushed a commit to MylesBorins/node that referenced this issue Feb 11, 2016
Clean up OpenSSL error stack in `ECDH::Initialize`, some curves have
faulty implementations that are leaving dangling errors after
initializing the curve.

Fix: nodejs#4686
PR-URL: nodejs#4689
Reviewed-By: Sakthipriyan Vairamani <[email protected]>
Reviewed-By: Shigeki Ohtsu <[email protected]>
MylesBorins pushed a commit to MylesBorins/node that referenced this issue Feb 13, 2016
Clean up OpenSSL error stack in `ECDH::Initialize`, some curves have
faulty implementations that are leaving dangling errors after
initializing the curve.

Fix: nodejs#4686
PR-URL: nodejs#4689
Reviewed-By: Sakthipriyan Vairamani <[email protected]>
Reviewed-By: Shigeki Ohtsu <[email protected]>
MylesBorins pushed a commit to MylesBorins/node that referenced this issue Feb 15, 2016
Clean up OpenSSL error stack in `ECDH::Initialize`, some curves have
faulty implementations that are leaving dangling errors after
initializing the curve.

Fix: nodejs#4686
PR-URL: nodejs#4689
Reviewed-By: Sakthipriyan Vairamani <[email protected]>
Reviewed-By: Shigeki Ohtsu <[email protected]>
scovetta pushed a commit to scovetta/node that referenced this issue Apr 2, 2016
Clean up OpenSSL error stack in `ECDH::Initialize`, some curves have
faulty implementations that are leaving dangling errors after
initializing the curve.

Fix: nodejs#4686
PR-URL: nodejs#4689
Reviewed-By: Sakthipriyan Vairamani <[email protected]>
Reviewed-By: Shigeki Ohtsu <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crypto Issues and PRs related to the crypto subsystem.
Projects
None yet
Development

No branches or pull requests

4 participants