0
$\begingroup$

This thought randomly popped into my head and I have not been able to find a clear, defined answer for it. Given an AES key, lets say an AES-256 key which is derived from a user password, is there any way to analyze the key and reverse engineer the password used to generate the key?

I understand if the key has been revealed and is known to an attacker they already have what they need, but this is a theoretical. Alternatively, a hacker may leverage a weakly protected system, stealing the key for a particular user from that system, reverse engineer the password then hope the user used the same password on a more secure system that the hackers primary goal is to access that.

I apologize if this is an obvious question, I am a software developer trying to break into the security field and attempting to develop my understanding of cryptographic principles.

Thanks!

$\endgroup$
  • 2
    $\begingroup$ You ask: Given a "key which is derived from a user password", is it possible to derive the user password from the key? Essentially, you're asking if it is possible to reverse the key derivation function. But you don't mention what this function is, making this question difficult to answer! $\endgroup$ – bkjvbx Jul 24 '17 at 19:34
  • 2
    $\begingroup$ There are ways to derive AES keys from passwords that make password recovery trivial (those are generally discouraged by knowledgeable people) and there are ways to derive AES keys from passwords such that you can't do better than (slow) brute-force. $\endgroup$ – SEJPM Jul 24 '17 at 19:44
  • $\begingroup$ yes, worst-case: doing the same derivation as the encoder and checking the result for a match $\endgroup$ – dandavis Jul 24 '17 at 23:07
  • $\begingroup$ There are also ways to create passwords from randomly generated AES keys, though they won't generally hash back to the same AES key. One way would be to use the bits of the AES key to select words from a Diceware-style list. 19 words can be selected in this way, assuming the standard EFF list. The resulting passphrase encodes the AES key, used to generate it, but will hash to a totally different AES key. I've no idea why anyone would want to do this, there are much better ways to pick the 19 random words for a >256-bit passphrase. $\endgroup$ – SAI Peregrinus Jul 25 '17 at 0:10
5
$\begingroup$

Given an AES key, lets say an AES-256 key which is derived from a user password, is there any way to analyze the key and reverse engineer the password used to generate the key?

This is really the same problem as password cracking, where the simple strategy of trying statistically likely passwords at very high speed with specialized, massively parallel hardware (e.g., GPUs) has proven to be very fruitful. This doesn't involve any sort of cryptanalytic attack to reverse the key derivation function, rather just relying on (a) the predictability of real-world passwords and (b) the fitness of GPUs for this sort of task.

If you're not familiar with this topic, this article and the enclosed video are a good primer.

$\endgroup$

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.