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
import{createSign}from"crypto";constprivateKey=`-----BEGIN RSA PRIVATE KEY-----MIIEowIBAAKCAQEAkDalaR550JK4X3dPWUeV39ON3fJpF9dyuSY4V3eZZhwcPN6PqpduGPZKfugI8pSvQgKAN7VawF6N1ynHe3TPS+/4iouIs7xPMhIJFUsI8P7kbeSZwLBAVNTZeWhit9Z8jGr/r1fLBZhMnOcbheD9Tsap61qnbojFghCI7a+bF9JOok93h6hfrxL9YV+AiaSHSDyeu/3MXt9i74e8MFwTM6SucgoW04KN3VW3+EDRB3BBglN67mJBpzGqhodEgSQrdMc2OYo7olxxMDiHaZjac3P1JwcWRnBqzzTeFJ1HvKI/Z4FCVtCG/5fWalfCpAmDhSme1rll7sb6KKHe18vbTwIDAQABAoIBAFwTN8sE1Tuw4Zy6PWRAS1WL6dEiO60oNqw11dUqnDtQiUrnwoxlgLrZTTj3hvbyrW8Uz65B0P5voFoW57FQJCZUwbgbXJ19BoducnQw4zWTWF89jFk1bu16tJtKZXUAsaapjjPydsJMueWXvL/epXxNZSHKUIpHMutXCUXQT9KFyo48SDWVDye39ZhW8ws2v3lDnyop6TY56UIP8ro79JL517Rqd3EZcPMiw/9Un4YUxF7Gqb941mNf1M0CT2dXP7QdMdGZnVofXRH0qT9fKnr1PyCMGSYa6E7aGN4VZ/GO21U7PSf4ZVADPgO+Z/ItMuCm2/jFxfVssWfuw59X0okCgYEA/BzUNXXCxaaoVI1SamQnaE4hfzuhdgWxkxVbMHFqKLquqOZp0AlkThZxG9jO6c3J6iH14fNW3pcuUC5VuGM+UBMlCfwI/QxzgV//sPEAQACXPpvuULBKfLINIITLyH4QpK8xDLL44DHQs1KOSoUHm4LJtQOpkk8myX2fTHJ2eJsCgYEAkm/nZifEeUcjh0fpmvHx6VbmEgADuff61TfN5Ne/7qCK6fUQg5suRavXKVQDmDlPvitoNZQznUf67u4LLywxILWl4Xv+GNUUxAYsUzNkQ4i5TQmvZskB9ZE1B913u2RJwpXEWOKZO5/SRZlg0JRL++gB2YpRrwFlLpcTgm7bUV0CgYAplqvfAcUWi8563DE7QbhKeZEHBxQ0fu3zIHPBgwQLIfiL/i54VgRI6WTRPiur3/mt+Nox4s1yvKe0LGCRoTV3SiEzC3OEItiu/+ITEz6CUFaiymA+yUYQWeLWeXGQalNeh1PlD2UEvtL5seWtH1LI8YNKrAb+DraMSH/NwZgPfwKBgQCKwwuNG+Xr3mNmT9ingNjxeezt5aGiWcAQx56NWXyAjRTVeem6LBR+5MUwXnJBjx1nYQ6Qpuz5/zljq6JhgwjSrA6SSsKPmWriDc92z94UuLyOqbzSM2tt3blYyJ4qrm/OucijSaZWf63rUdoSDFSsUj9eetnIchQFQBe2o4Gj6QKBgAL9vs5gq7ZrDlqRH2hjUY0hkTE3W0KQb6RlaOFOTKRa8N1NcQU2Zsv2d/kOHiIJZuv+kNUyCtYdZ5iJlCEPQBXA0hEL7h69GUhQdio3u8Id7oPXxWQdxHmoqQPT1FCrvzfvjcmRwq5ysUK0pln0spsE4DHiY+5KEnuuODzxQFGh-----END RSA PRIVATE KEY-----`;constdata="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.";conststart=Date.now();for(leti=0;i<100;i++){createSign("RSA-SHA1").update(data).sign(privateKey,"base64");}console.log("signing took",Date.now()-start,"ms");// bun: 2569 ms// node: 116 ms
What is the expected behavior?
The signing speed should be at least on par with Nodejs.
What do you see instead?
I see signing speeds 20 times slower than Nodejs.
Additional information
I have noticed this issue when working with @aws-sdk/cloudfront-signer as they are using crypto.createSign internally.
The text was updated successfully, but these errors were encountered:
What version of Bun is running?
1.0.28+705638470
What platform is your computer?
Darwin 23.2.0 arm64 arm
What steps can reproduce the bug?
What is the expected behavior?
The signing speed should be at least on par with Nodejs.
What do you see instead?
I see signing speeds 20 times slower than Nodejs.
Additional information
I have noticed this issue when working with @aws-sdk/cloudfront-signer as they are using crypto.createSign internally.
The text was updated successfully, but these errors were encountered: