[GH-ISSUE #882] androidfde_fmt_plug.c: iterations #485

Closed
opened 2026-10-14 03:10:17 +07:00 by bsakaguchi · 8 comments
Owner

Originally created by @frank-dittrich on GitHub (Dec 14, 2014).
Original GitHub issue: https://github.com/openwall/john/issues/882

The salt definition includes a component iterations which is never used.
crypt_all calls hash_plugin_check_hash which seems to use a hard coded value of 2000.
Who knows whether this format should handle a varying iteration count?
(If the number of iterations isn't a constant, it should be reported as a tunable cost.)

Originally created by @frank-dittrich on GitHub (Dec 14, 2014). Original GitHub issue: https://github.com/openwall/john/issues/882 The salt definition includes a component iterations which is never used. crypt_all calls hash_plugin_check_hash which seems to use a hard coded value of 2000. Who knows whether this format should handle a varying iteration count? (If the number of iterations isn't a constant, it should be reported as a tunable cost.)
Author
Owner

@kholia commented on GitHub (Dec 14, 2014):

In addition, it seems that almost every Android manufacturer has their own FDE variation.

@gat3way IIRC, you know a lot about this stuff, right?

<!-- gh-comment-id:66914509 --> @kholia commented on GitHub (Dec 14, 2014): In addition, it seems that almost every Android manufacturer has their own FDE variation. @gat3way IIRC, you know a lot about this stuff, right?
Author
Owner

@jfoug commented on GitHub (Dec 15, 2014):

Sounds like this one is locked at 2000 iterations. 4.4 adds scrypt (not sure the pbkdf2-hmac-sha1 variant is dead on 4.4 or not).

Here is a couple of info posts

http://nelenkov.blogspot.com/2014/10/revisiting-android-disk-encryption.html
http://hashcat.net/forum/thread-2270.html

<!-- gh-comment-id:66954749 --> @jfoug commented on GitHub (Dec 15, 2014): Sounds like this one is locked at 2000 iterations. 4.4 adds scrypt (not sure the pbkdf2-hmac-sha1 variant is dead on 4.4 or not). Here is a couple of info posts http://nelenkov.blogspot.com/2014/10/revisiting-android-disk-encryption.html http://hashcat.net/forum/thread-2270.html
Author
Owner

@frank-dittrich commented on GitHub (Dec 15, 2014):

More questions regarding Android FDE format.
The format label is fde, and $fde$ is used as the format tag.
fde is quite a generic term. Should we change th format label/format tag?
Android FDE is new in bleeding-jumbo. It didn't exist in released jumbo versions and doesn't exist in unstable. So we could still change it.

Also, if Android 4.4 and higher use a different FDE algorithm, should the format name mention that this format is used for android versions up to 4.3?

<!-- gh-comment-id:66955543 --> @frank-dittrich commented on GitHub (Dec 15, 2014): More questions regarding Android FDE format. The format label is `fde`, and `$fde$` is used as the format tag. `fde` is quite a generic term. Should we change th format label/format tag? Android FDE is new in bleeding-jumbo. It didn't exist in released jumbo versions and doesn't exist in unstable. So we could still change it. Also, if Android 4.4 and higher use a different FDE algorithm, should the format name mention that this format is used for android versions up to 4.3?
Author
Owner

@frank-dittrich commented on GitHub (Dec 15, 2014):

4.4 adds scrypt (not sure the pbkdf2-hmac-sha1 variant is dead on 4.4 or not).

My guess is that the old FDE format will still be used if you upgrade an encrypted device from 4.3 to 4.4, but the new FDE format will be used for devices shipped with android 4.4.

<!-- gh-comment-id:66955764 --> @frank-dittrich commented on GitHub (Dec 15, 2014): > 4.4 adds scrypt (not sure the pbkdf2-hmac-sha1 variant is dead on 4.4 or not). My _guess_ is that the old FDE format will still be used if you upgrade an encrypted device from 4.3 to 4.4, but the new FDE format will be used for devices shipped with android 4.4.
Author
Owner

@jfoug commented on GitHub (Dec 15, 2014):

That is my guess also Frank. I doubt they would fully decrypt, and re-encrypt with new FDE.

Also, if Android 4.4 and higher use a different FDE algorithm, should the format name mention that this format is used for android versions up to 4.3?

I agree with this on both fronts. I would like to see something like

label fde-pbkdf2-hmac-sha1 Then later fde-scrypt
and same for format label. For the label we could keep fde for 4.3 and create fde_s for scrypt if we later add that format. We likely will not add the format until someone with inside knowledge leaks the implement details (and key/iv location information).

<!-- gh-comment-id:66982930 --> @jfoug commented on GitHub (Dec 15, 2014): That is my guess also Frank. I doubt they would fully decrypt, and re-encrypt with new FDE. > Also, if Android 4.4 and higher use a different FDE algorithm, should the format name mention that this format is used for android versions up to 4.3? I agree with this on both fronts. I would like to see something like label fde-pbkdf2-hmac-sha1 Then later fde-scrypt and same for format label. For the label we could keep $fde$ for 4.3 and create $fde_s$ for scrypt if we later add that format. We likely will not add the format until someone with inside knowledge leaks the implement details (and key/iv location information).
Author
Owner

@magnumripper commented on GitHub (Dec 17, 2014):

Sorry for being lazy and not looking at the code, but do we need this format at all - I mean, is it not possible to just use the generic pbkdf2-hmac-sha1 formats?

<!-- gh-comment-id:67257455 --> @magnumripper commented on GitHub (Dec 17, 2014): Sorry for being lazy and not looking at the code, but do we need this format at all - I mean, is it not possible to just use the generic pbkdf2-hmac-sha1 formats?
Author
Owner

@magnumripper commented on GitHub (Dec 17, 2014):

is it not possible to just use the generic pbkdf2-hmac-sha1 formats?

OK, it doesn't look so. I think the ALGORITHM_NAME should be changed from "PBKDF2-SHA1" to "PBKDF2-SHA1 AES"

<!-- gh-comment-id:67258247 --> @magnumripper commented on GitHub (Dec 17, 2014): > is it not possible to just use the generic pbkdf2-hmac-sha1 formats? OK, it doesn't look so. I think the ALGORITHM_NAME should be changed from "PBKDF2-SHA1" to "PBKDF2-SHA1 AES"
Author
Owner

@jfoug commented on GitHub (Dec 17, 2014):

Changing it to this: PBKDF2-SHA1 SHA256/AES

090c266

Added comment about unused iteration count, and about only being <= v4.3 1e99f80

<!-- gh-comment-id:67278427 --> @jfoug commented on GitHub (Dec 17, 2014): Changing it to this: PBKDF2-SHA1 SHA256/AES 090c266 Added comment about unused iteration count, and about only being <= v4.3 1e99f80
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
openwall/john#485
No description provided.