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

crypto.publicDecrypt doesn't seem to work #30237

Closed
yovanoc opened this issue Nov 3, 2019 · 4 comments
Closed

crypto.publicDecrypt doesn't seem to work #30237

yovanoc opened this issue Nov 3, 2019 · 4 comments
Labels
crypto Issues and PRs related to the crypto subsystem. question Issues that look for answers.

Comments

@yovanoc
Copy link

yovanoc commented Nov 3, 2019

  • Version: 13.0.1
  • Platform: MacOS Catalina

image

pub doesn't work. Only priv and bob.publicKey but I know that priv should work because in docs: Because RSA public keys can be derived from private keys, a private key may be passed instead of a public key. I really want to know why pub isn't working.

It's showing that:

image

@tniessen tniessen added crypto Issues and PRs related to the crypto subsystem. question Issues that look for answers. labels Nov 4, 2019
@bnoordhuis
Copy link
Member

@tniessen Is that an oversight? The 'private' here looks wrong to me:

const publicDecrypt = rsaFunctionFor(_publicDecrypt, RSA_PKCS1_PADDING,
'private');

Since that means preparePrivateKey() is called, not preparePublicOrPrivateKey().

@tniessen
Copy link
Member

tniessen commented Nov 4, 2019

@bnoordhuis I think so, yes. I am surprised it went unnoticed for so long, but it is probably a rarely used function.

MylesBorins pushed a commit that referenced this issue Nov 17, 2019
PR-URL: #30249
Fixes: #30237
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
targos pushed a commit that referenced this issue Dec 1, 2019
PR-URL: #30249
Fixes: #30237
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
MylesBorins pushed a commit that referenced this issue Dec 17, 2019
PR-URL: #30249
Fixes: #30237
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
@sda3211

This comment has been minimized.

@sda3211

This comment has been minimized.

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. question Issues that look for answers.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants