Is there some step-by-step guide on how the official client encrypts the wallet? I'm trying to write an implementation of that in Go, but can't seem to find any concrete reference, asideshttps://github.com/bitcoin/bitcoin/blob/6b8a5ab622e5c9386c872036646bf94da983b190/doc/README
So lets see if I got this right...
I have a private key:
And a password:
Then I need a random master key (how long is it? Is it stored anywhere?)
I take a SHA-512 of the password
Then I perform OpenSSL's EVP_BytesToKey from the master key and the SHA in a dynamic number of rounds based on the speed of my computer (how do I calculate this?)
And what I get is the encrypted private key, right?