You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
importcryptofrom'node:crypto';const{ privateKey, publicKey }=crypto.generateKeyPairSync('x25519',{});constsign=crypto.createSign('sha512');sign.update('some data to sign');sign.end();constsignature=sign.sign(privateKey);console.log('Signature:',signature.toString('hex'));constverify=crypto.createVerify('sha512');verify.update('some data to sign');verify.end();console.log('Verify:',verify.verify(publicKey,signature));
Produces output like:
How often does it reproduce? Is there a required condition?
Always
What is the expected behavior? Why is that the expected behavior?
Node throws an error that x25519 keys can not be used for signing. Same should happen for dh keys.
Version
v22.4.0
Platform
Linux pop-os 6.9.3-76060903-generic #202405300957
171834820922.04~7817b67 SMP PREEMPT_DYNAMIC Mon J x86_64 x86_64 x86_64 GNU/LinuxSubsystem
crypto
What steps will reproduce the bug?
Produces output like:
How often does it reproduce? Is there a required condition?
Always
What is the expected behavior? Why is that the expected behavior?
Node throws an error that x25519 keys can not be used for signing. Same should happen for
dh
keys.What do you see instead?
(invalid output)
Additional information
No response
The text was updated successfully, but these errors were encountered: