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

doc: remove invalid padding from crypto.publicDecrypt #27069

Closed
jtousley opened this issue Apr 3, 2019 · 4 comments
Closed

doc: remove invalid padding from crypto.publicDecrypt #27069

jtousley opened this issue Apr 3, 2019 · 4 comments
Labels
crypto Issues and PRs related to the crypto subsystem. doc Issues and PRs related to the documentations.

Comments

@jtousley
Copy link

jtousley commented Apr 3, 2019

#9609 and #9611 should also apply to publicDecrypt.

Original issues:
#9588 and #1093

@BridgeAR
Copy link
Member

Ping @nodejs/crypto

@bnoordhuis bnoordhuis added the crypto Issues and PRs related to the crypto subsystem. label Apr 11, 2019
@bnoordhuis
Copy link
Member

bnoordhuis commented Apr 11, 2019

The docs for crypto.publicDecrypt() are correct, aren't they?

  - `padding` {crypto.constants} An optional padding value defined in
    `crypto.constants`, which may be: `crypto.constants.RSA_NO_PADDING` or
    `crypto.constants.RSA_PKCS1_PADDING`.
...
Otherwise, this function uses `RSA_PKCS1_PADDING`.

Both padding types are supported. The caveat emptor for RSA_NO_PADDING is that the ciphertext's size needs to match the key's.

edit: see #27188 for regression tests.

@jtousley
Copy link
Author

My apologies, I had thought the other issues referenced the document version. This issue is specific to older versions of the documentation (v4-7.x). The current version is up to date as you say.
For those older versions, the padding types for privateEncrypt and publicDecrypt should match. #9609 seems to have resolved privateEncrypt, but left publicDecrypt alone.

@tniessen
Copy link
Member

The only affected version (that we still support) is v6.x which will be at EOL at the end of the month. I assume there will not be a fix for a documentation issue few days before EOL and strongly recommend to switch to a more recent LTS branch.

@tniessen tniessen added the doc Issues and PRs related to the documentations. label Apr 12, 2019
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. doc Issues and PRs related to the documentations.
Projects
None yet
Development

No branches or pull requests

4 participants