Improving account import
I saw that you are using the Java Scrypt library to calculate the derived key. I noticed that is not that fast and I found that the Bouncy Castle implementation is better. Here is the class and method that you can call.
org.bouncycastle.crypto.generators.SCrypt.generate(...)
Hope this can improve the Web3j library.
I started off using the Bouncy Castle Scrypt implementation, however migrated to the Java Scrypt library as per the following comments in the Wallet implementation.
Note: we don't use the Bouncy Castle Scrypt implementation org.bouncycastle.crypto.generators.SCrypt, as the following parameter assertion results in failure of the Ethereum reference Scrypt test vector:
// Only value of r that cost (as an int) could be exceeded for is 1
if (r == 1 && N > 65536)
{
throw new IllegalArgumentException("Cost parameter N must be > 1 and < 65536.");
}
Oh I didn't know that, I used Bouncy Castle and I have never received that error because my test accounts have r = 8 and N = 262144.
Closing, as for the time being I want to ensure that web3j remains compliant with the Scrypt test vector.