-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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
Ed25519/Ed448 does not throw when used with invalid digest in crypto.createSign #52097
Labels
Comments
xicilion
added
the
feature request
Issues that request new features to be added to Node.js.
label
Mar 15, 2024
This seems like a bug. Ed25519 and Ed448 should only be available via the oneshot apis in the first place. |
Yes, there is indeed an error here, so an error should be thrown here instead of returning a zero-filled Buffer. |
panva
added
confirmed-bug
Issues with confirmed bugs.
crypto
Issues and PRs related to the crypto subsystem.
and removed
feature request
Issues that request new features to be added to Node.js.
labels
Mar 19, 2024
panva
changed the title
It is recommended to throw an error when passing Ed25519 private key to Signer.
Ed25519/Ed448 does not throw when used with invalid digest in crypto.createSign
Mar 19, 2024
cc @nodejs/crypto |
I would like to work on this if nobody else is. |
panva
added a commit
to panva/node
that referenced
this issue
Apr 3, 2024
panva
added a commit
to panva/node
that referenced
this issue
Apr 3, 2024
panva
added a commit
to panva/node
that referenced
this issue
Apr 4, 2024
aduh95
pushed a commit
to aduh95/node
that referenced
this issue
Sep 24, 2024
fixes: nodejs#52097 PR-URL: nodejs#52340 Fixes: nodejs#52097 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
aduh95
pushed a commit
to aduh95/node
that referenced
this issue
Sep 25, 2024
fixes: nodejs#52097 PR-URL: nodejs#52340 Fixes: nodejs#52097 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
richardlau
pushed a commit
to aduh95/node
that referenced
this issue
Sep 27, 2024
fixes: nodejs#52097 PR-URL: nodejs#52340 Fixes: nodejs#52097 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
What is the problem this feature will solve?
The following example:
will output the following:
When Signer is used for Ed25519 signing, Signer does not report any errors, but returns an all-zero Buffer as the signature result.
This can be confusing for programmers who think they have signed successfully, but in fact the returned signature is not available.
What is the feature you are proposing to solve the problem?
I think in this case Signer.sign should throw an error so that the programmer can deal with the problem early on.
What alternatives have you considered?
No response
The text was updated successfully, but these errors were encountered: