Comments (7)
Hey, nice idea. Maybe the mailing list is better to discuss this:
http://list.openpgpjs.org/
from openpgpjs.
Hm, does it vary within one machine that much? If that's the case then it's almost certainly a difference in how long it takes to generate the random values. Unfortunately the window.crypto.getRandomValues does not provide us a lot of insight into the progress it is making. A more creative solution might be necessary for this...
from openpgpjs.
I am pretty sure this is not possible due to the way keys are generated.
If you generate a key, he basically takes two random numbers and searches for the next bigger prime.
Because you do not know how far away the next bigger prime is, you can not know how long it will take until you get there.
The only thing you can display is when the first prime was found but there is no way in telling how long the second one will take. It often occured to me that the first prime took 2 seconds and the second took 20 seconds.
As for that I think it is impossible. There is a reason enigmail for example does not have a bar either. (To say the truth: it has a bar, but the bar does not move fluently and just gets stuck at one point)
from openpgpjs.
Is it possible to profile the system with some simpler calculations, time how long that takes, and use it to "fake" a progress percentage?
from openpgpjs.
I am trying this by letting browser create a 128bit key which is pretty fast any browser. I am not faking a percentage but telling user that the key creation might take a minute or a few minutes etc...
from openpgpjs.
Nice! 👍
from openpgpjs.
Not relevant anymore as we use native keygen now in most cases.
from openpgpjs.
Related Issues (20)
- Missing clearPrivateParams from TS definitions HOT 3
- Leveraging Compression API even when not streaming
- [@types]: TypeScript build error HOT 5
- esm/cjs export config error HOT 1
- Node patch releases 18.19.1, 20.11.1, 21.6.2 break OpenPGP when RSA keys are used HOT 6
- 5.11.1 Release Notes HOT 1
- Decryption fails after upgrading to latest Node 18, 20, 21 versions HOT 1
- Error decrypting message: Cannot destructure property 'c' of 'sessionKeyParams' as it is null HOT 3
- readKey: must pass options object containing `armoredKey` or `binaryKey` HOT 2
- Error: Error decrypting message: Could not find valid self-signature in key ac93a73e2d1sscd3
- Decryption failing since 18 April
- Newest AWS lambda runtime fails to decrypt HOT 1
- I am also getting the error **Unexpected packet type: 6** while decrypting.
- encrypt method return type error
- Decryption Error On Node v20.14.0 (LTS)
- Cannot decrypt file stream - readMessage(): Error: Misformed armored text HOT 2
- Keys containing signatures with unknown critical subpackets are incorrectly rejected
- Unexpected exception with newer node18/node20 runtimes in AWS HOT 1
- RSA_PKCS1_PADDING is no longer supported for private decryption with node greater than 16 HOT 10
- The sign method in the browser differs from that in Node.js; there is an error with the sign method in the browser. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from openpgpjs.