forked from openpgpjs/openpgpjs
-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Description
I have a trouble with performance during generation of key 2048 bit.
This process can spend from 3 minutes to 14-15.
Therefore I would like to know, what exactly spend time.
It was BigInteger constructors in rsa generate method. (src/crypto/public_key/rsa.js)
call of new BigInteger() can spend from 2 to 5 minutes.
Smartphone:
- Android 6.0.1;
- ASUS Zenfone (ZD551KL);
- processor Qualcomm MSM8939 Snapdragon 615 + Adreno 405;
- RAM 3072MB.
Project dependencies:
- "react": "15.4.2"
- "react-native": "0.42.3"
- "react-native-openpgp": "^1.0.3"
Code snippet:
const optionsGenerateKey = {
userIds: [{ name:'FirstName LastName', email:'first.last@gmail.com' }],
numBits: 2048,
passphrase: 'password',
};
console.warn('prepare random values...');
await openpgp.prepareRandomValues();
console.warn('keys generation...');
const start = Date.now();
const key = await this.generateKey(optionsGenerateKey);
const end = Date.now();
console.warn((end - start) / 1000);```
Metadata
Metadata
Assignees
Labels
No labels