web3j icon indicating copy to clipboard operation
web3j copied to clipboard

Account creation with custom N, R, P parameters

Open fraspadafora opened this issue 9 years ago • 6 comments

Hi, I'm working with Android apps, and the decrypt time for the account is very high. So i need to create accounts with different N, R, P so it doesn't take that much time. Is it possible to add a new function in the Wallet class with the possibility to specify these parameters? Thank you.

fraspadafora avatar Dec 19 '16 16:12 fraspadafora

hi,i get the same problem with you!! can you tell me how to change the N,R,P to make decrypt time quick?

bigstar119 avatar Dec 20 '16 05:12 bigstar119

The geth mobile lib uses N = 4096 and P = 6 That can be decrypted in 10 seconds more or less. For this reason I think it is useful to have the possibility to set the N,P and R parameters when an account is created.

fraspadafora avatar Dec 20 '16 10:12 fraspadafora

change N adn P value make account create faster is good..but does it have security risks? the hacker decrypt it quick also.

bigstar119 avatar Dec 20 '16 11:12 bigstar119

We could potentially lower these values for the Android client. I'll follow up with the Go team on their justification for lowering the value - unless one of you can already provide this insight?

conor10 avatar Dec 20 '16 21:12 conor10

In the geth mobile library for Android (https://ethereum.github.io/go-ethereum/downloads/) in the AccountManager, they are using the Geth.LightScryptN object with value 4096 and Geth.LightScryptP with value 6 to create a new account. Of course it is easier to decrypt, but I think it is the compromise to have something usable. I suggest to store big amounts of money in mist wallets, and less quantity in mobile accounts.

fraspadafora avatar Dec 21 '16 08:12 fraspadafora

This functionality has been checked in - expect to see in web3j-android release 1.2.0 in the next week or so.

See https://github.com/web3j/web3j/blob/master/src/main/java/org/web3j/crypto/Wallet.java for details.

conor10 avatar Jan 31 '17 08:01 conor10