Take the 2-minute tour ×
Information Security Stack Exchange is a question and answer site for Information security professionals. It's 100% free, no registration required.

I am trying to understand when using the default android device encryption in 4.0.4 ICS (AES-CBC 128Bit) how the Key Derivation Function works? That is how is the users decryption passcode transformed into a secure key for use with the Decryption?

And how is the Decryption Password Stored and hashed on the device?

I am trying to demonstrate points of potential vulnerability on our enterprise android devices, and mitigations.

share|improve this question

migrated from stackoverflow.com Jan 14 '13 at 13:52

This question came from our site for professional and enthusiast programmers.

    
AES is not a KDF, so your question is not well defined. –  Maarten Bodewes - owlstead Jan 13 '13 at 14:50
1  
Correct - but i want to know the architecture behind how android takes a User Defined Passcode, and uses it to generate a key to encrypt the device using AES.... and then secures that hashed key. –  diagonalbatman Jan 13 '13 at 15:47
2  
Why is this off topic? I haven't 'tried' anything other than looking around the Google Docs. –  diagonalbatman Jan 13 '13 at 15:53
1  
sigh.... What other way can i ask that question? I think it is perfectly valid to ask how the Security Framework works. –  diagonalbatman Jan 13 '13 at 16:00
    
This link might be of some help source.android.com/tech/encryption/… –  Ali Ahmad Jan 14 '13 at 14:08

1 Answer 1

Android Encryption Implementation Notes has a pretty detailed description of how the disk encryption is implemented from 3.0. When a user enables encryption if they do not already have a pin set they are required to set one.

The master key is a 128 bit number created by reading from /dev/urandom. It is encrypted with a hash of the user password created with the PBKDF2 function from the SSL library. The footer also contains a random salt (also read from /dev/urandom) used to add entropy to the hash from PBKDF2, and prevent rainbow table attacks on the password

The master key is then stored in the footer of the encrypted partition. Most of the code that is used to start the encryption process is in Vold, Android's volume daemon. If you have the full AOSP source for android you can take a look at /system/core/vold/cryptfs.c which implements many of the commands for encryption in vold as well as commands for verifying and changing the password.

This blog post, Android Disk Encryption also has some good insights into the crypto implmentation as well as the implications of tying the decryption of the master key to the pin/password entered by the user to unlock the device.

Hope this helps.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.