I lost a password for an ethereum wallet at the end of 2016. Computer immediately shutdown and password was not recoverable.

I know there are many potential avenues for narrowing my search for what my password could have been, but I am wondering if the number of characters can be determined from the encrypted file?

I dont know if this would make a difference but it was an ethereum wallet, using Geth


No. Password cannot be used to encrypt anything directly unless it is exactly of a certain size, and then it will be likely weak. Encryption passwords are hashed, with a slow hash hopefully, and the output is used as key.

  • $\begingroup$ ok so the specific program used for hashing is up to what ever the developers decided to use with their client? (I'm assuming hashing isnt a singular process like there is different types of hashing) $\endgroup$ – user588641 Sep 19 '18 at 19:16
  • $\begingroup$ And so it looks like there would never be a way to determine the starting size of the password? $\endgroup$ – user588641 Sep 19 '18 at 19:17
  • $\begingroup$ Yes, the concrete program chooses the hashing. If they follow recommendations, nowadays it should be PBKDF2 or preferably Argon2 $\endgroup$ – Petar Donchev Sep 19 '18 at 19:18
  • $\begingroup$ Or it it specified in a protocol. Or the stored data has metadata for the chosen hashing details. $\endgroup$ – Petar Donchev Sep 19 '18 at 19:19
  • 1
    $\begingroup$ No, length would not be easier to guess than guessing the password itself, unless they did something very stupid. But 'etherium wallet, end of 2016', I bet they did it properly, with a slow hash, maybe not among the recommended but still very strong. Remembering the password is you best bet. If you did not invent it but it was automatically chosen (by password manager, for example), I am not optimistic. BTW even if you knew the length that will not help a lot (in general, it halves the needed guesses). If you can break it knowing the length, you can break it not knowing it. And vice versa. $\endgroup$ – Petar Donchev Sep 19 '18 at 19:34

No it is not possible to determine the password used to encrypt the file by analyzing the file.

AES is a block cypher which uses a fixed length encryption key (which is not your password) to create fixed blocks of encrypted bytes. This means the designers of the cryptographic system you used had to take a variable length password submitted by the user (which is not very random because the characters in the password are represented on a computer by a small range of bytes) and convert it to a fixed length encryption key which is very random (a.k.a has high entropy). This transformation often happen by the application of many hashes (in a process known as Password Based Key Derivation Functions, PBKDF). Hashes are transformations (a.k.a. functions) which take in a string of byes of any size and produce a fixed length output. Hashes also have the desired property that this transformation can only happen in one direction. It would be too difficult to take the output of a hash and determine what input to the hash function created it.

If I was in this situation I would investigate to see if the application I used was Open Source. I would then investigate the software repository (most likely hosted on Gitlab or GitHub) and look at the code responsible for the encryption. I would then use that code to create a small decryption program which attempts to decrypt the file and then checks the output. This of course assumes that the amount of currency recovered was worth the time.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.