Closed NedColin closed 7 years ago
How much memory (RAM) does your mobile device have? The scrypt key derivation function (which is what you're using in your examples) is memory hard, so it can be quite slow on mobile. If you're using keythereum to recover arbitrary keys generated elsewhere (e.g., by geth), I recommend not running keythereum.recover directly on mobile, if you can help it.
If you're using keythereum to generate the keys, depending on your application, you might try using PBKDF2 instead of scrypt. While scrypt is in general more secure, it is very heavy for mobile (or browser) use.
Using keythereum to recover plaintext private key with jSON string,when the hash round in key derivation is 1<<18,it spends about 20 minutes to recover,is it nomal? Here is the implementation.
https://github.com/NedColin/Web3jsDemo/blob/master/Web3jsDemo/web3jsDemo/Web3SecretStore.m