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

node-rsa decrypt 20x slowser then node #4859

Closed
ttv20 opened this issue Sep 10, 2023 · 1 comment · Fixed by #13786
Closed

node-rsa decrypt 20x slowser then node #4859

ttv20 opened this issue Sep 10, 2023 · 1 comment · Fixed by #13786
Labels
performance An issue with performance

Comments

@ttv20
Copy link

ttv20 commented Sep 10, 2023

What version of Bun is running?

1.0.0

What platform is your computer?

Linux 6.5.2-zen1-1-zen x86_64 unknown

What steps can reproduce the bug?

bun install node-rsa

Run on node and bun:

const NodeRSA = require('node-rsa');
const key = new NodeRSA({b: 512});
 
const text = 'Hello RSA!';
const encrypted = key.encrypt(text, 'base64');
console.log('encrypted: ', encrypted);
console.time()
const decrypted = key.decrypt(encrypted, 'utf8');
console.timeEnd()
console.log('decrypted: ', decrypted);

result:

[user@host]$ node 1.js 
encrypted:  KzeFH2C+tcQ50dE6ix1zSr3TqGMogWPfQzxJTpzm+VNku0GJ9UDt0iJyzJqbmcCyqOgAlBI64PXVb1go7RNyZA==
default: 1.198ms
decrypted:  Hello RSA!
[user@host]$ bun 1.js 
encrypted:  aylXzatSYZJtF4KClXZp8QqF01oF55o8hfagYhpmgLmen1a15REDgnVvU2lM04/Vvqk9TeCSTh1V9vKxF5XadQ==
[24.20ms] default
decrypted:  Hello RSA!

What is the expected behavior?

No response

What do you see instead?

No response

Additional information

No response

@ttv20 ttv20 added the bug Something isn't working label Sep 10, 2023
@Electroid Electroid added performance An issue with performance and removed bug Something isn't working labels Oct 27, 2023
@Jarred-Sumner
Copy link
Collaborator

Confirming this is still an issue in Bun v1.1.27

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance An issue with performance
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants