[GH-ISSUE #1639] pass_gen.pl HashType #1084

Closed
opened 2026-10-14 03:34:31 +07:00 by bsakaguchi · 7 comments
Owner

Originally created by @loverszhaokai on GitHub (Aug 10, 2015).
Original GitHub issue: https://github.com/openwall/john/issues/1639

I think the pass_gen.pl has a problem:

$ ./pass_gen.pl luks


Enter words to hash, one per line.
When all entered ^D starts the processing.

When I run the "./pass_gen.pl luks", the pass_gen.pl report the message and then exit.
There is no time for me to enter words.

Originally created by @loverszhaokai on GitHub (Aug 10, 2015). Original GitHub issue: https://github.com/openwall/john/issues/1639 I think the pass_gen.pl has a problem: $ ./pass_gen.pl luks ``` Enter words to hash, one per line. When all entered ^D starts the processing. ``` When I run the "./pass_gen.pl luks", the pass_gen.pl report the message and then exit. There is no time for me to enter words.
Author
Owner

@frank-dittrich commented on GitHub (Aug 10, 2015):

Same output when you use a non-existing format.
So, luks just isn't supported. (There should be an appropriate warning, though.)

<!-- gh-comment-id:129512358 --> @frank-dittrich commented on GitHub (Aug 10, 2015): Same output when you use a non-existing format. So, luks just isn't supported. (There should be an appropriate warning, though.)
Author
Owner

@loverszhaokai commented on GitHub (Aug 10, 2015):

@frank-dittrich

Thanks for your explanation. Do you know how to get the past contest pots ?

<!-- gh-comment-id:129513380 --> @loverszhaokai commented on GitHub (Aug 10, 2015): @frank-dittrich Thanks for your explanation. Do you know how to get the past contest pots ?
Author
Owner

@frank-dittrich commented on GitHub (Aug 10, 2015):

Do you have a Linux system, then you can create a file and extract your hash from that one:

[fd@f22 ~]$ dd if=/dev/zero of=test.luks bs=1024 count=2000
2000+0 records in
2000+0 records out
2048000 bytes (2.0 MB) copied, 0.0168365 s, 122 MB/s
[fd@f22 ~]$ cryptsetup luksFormat test.luks

WARNING!
========
This will overwrite data on test.luks irrevocably.

Are you sure? (Type uppercase yes): YES
Enter passphrase: 
Verify passphrase: 
[fd@f22 ~]$ cryptsetup luksDump test.luks 
LUKS header information for test.luks

Version:        1
Cipher name:    aes
Cipher mode:    xts-plain64
Hash spec:      sha1
Payload offset: 4096
MK bits:        256
MK digest:      c3 13 42 54 e8 a6 f1 26 11 6f 47 18 62 6b 44 ad ec d6 a7 6c 
MK salt:        9c 9a b5 14 df 2c f4 a2 02 21 f9 bb 26 89 c7 74 
                29 8e c0 d3 8c dc 1c 45 98 ed aa 54 5f 7f 2e 3e 
MK iterations:  98875
UUID:           6fc41238-478e-409d-89fa-e8b4510a2b6c

Key Slot 0: ENABLED
    Iterations:             458781
    Salt:                   bf b0 e6 c5 18 30 d1 c7 c5 e2 74 87 16 ac 8f 6f 
                            6e cb 8a c2 9a 14 86 08 ed 97 d0 b7 c8 ae d6 e3 
    Key material offset:    8
    AF stripes:             4000
Key Slot 1: DISABLED
Key Slot 2: DISABLED
Key Slot 3: DISABLED
Key Slot 4: DISABLED
Key Slot 5: DISABLED
Key Slot 6: DISABLED
Key Slot 7: DISABLED

Read the cryptsetup man page how to specify a much smaller iteration count for your new format self test, then use luks2john to extract the "hash".

<!-- gh-comment-id:129514714 --> @frank-dittrich commented on GitHub (Aug 10, 2015): Do you have a Linux system, then you can create a file and extract your hash from that one: ``` [fd@f22 ~]$ dd if=/dev/zero of=test.luks bs=1024 count=2000 2000+0 records in 2000+0 records out 2048000 bytes (2.0 MB) copied, 0.0168365 s, 122 MB/s [fd@f22 ~]$ cryptsetup luksFormat test.luks WARNING! ======== This will overwrite data on test.luks irrevocably. Are you sure? (Type uppercase yes): YES Enter passphrase: Verify passphrase: [fd@f22 ~]$ cryptsetup luksDump test.luks LUKS header information for test.luks Version: 1 Cipher name: aes Cipher mode: xts-plain64 Hash spec: sha1 Payload offset: 4096 MK bits: 256 MK digest: c3 13 42 54 e8 a6 f1 26 11 6f 47 18 62 6b 44 ad ec d6 a7 6c MK salt: 9c 9a b5 14 df 2c f4 a2 02 21 f9 bb 26 89 c7 74 29 8e c0 d3 8c dc 1c 45 98 ed aa 54 5f 7f 2e 3e MK iterations: 98875 UUID: 6fc41238-478e-409d-89fa-e8b4510a2b6c Key Slot 0: ENABLED Iterations: 458781 Salt: bf b0 e6 c5 18 30 d1 c7 c5 e2 74 87 16 ac 8f 6f 6e cb 8a c2 9a 14 86 08 ed 97 d0 b7 c8 ae d6 e3 Key material offset: 8 AF stripes: 4000 Key Slot 1: DISABLED Key Slot 2: DISABLED Key Slot 3: DISABLED Key Slot 4: DISABLED Key Slot 5: DISABLED Key Slot 6: DISABLED Key Slot 7: DISABLED ``` Read the cryptsetup man page how to specify a much smaller iteration count for your new format self test, then use luks2john to extract the "hash".
Author
Owner

@loverszhaokai commented on GitHub (Aug 10, 2015):

@frank-dittrich Yes, I have a linux system. Sorry to mislead you. In fact, I need to generate skein-256 and skein-512.

<!-- gh-comment-id:129515619 --> @loverszhaokai commented on GitHub (Aug 10, 2015): @frank-dittrich Yes, I have a linux system. Sorry to mislead you. In fact, I need to generate skein-256 and skein-512.
Author
Owner

@frank-dittrich commented on GitHub (Aug 10, 2015):

@loverszhaokai I just answered that question on the mailing list.

<!-- gh-comment-id:129517222 --> @frank-dittrich commented on GitHub (Aug 10, 2015): @loverszhaokai I just answered that question on the mailing list.
Author
Owner

@loverszhaokai commented on GitHub (Aug 10, 2015):

@frank-dittrich Thanks very much. I will get the post on contest. 👍

<!-- gh-comment-id:129517645 --> @loverszhaokai commented on GitHub (Aug 10, 2015): @frank-dittrich Thanks very much. I will get the post on contest. :+1:
Author
Owner

@jfoug commented on GitHub (Aug 10, 2015):

pass_gen will now complain when you type in a format that is not supported:

$ ../run/pass_gen.pl luks
Enter words to hash, one per line.
When all entered ^D starts the processing.
hash type [luks] is not supported


$ ../run/pass_gen.pl raw-md5
Enter words to hash, one per line.
When all entered ^D starts the processing.
  ** Here are the hashes for format raw-md5 **
a
u0:0cc175b9c0f1b6a831c399e269772661:0:0:a:


$ ../run/pass_gen.pl raw-md5 raw-md4 luks
Enter words to hash, one per line.
When all entered ^D starts the processing.

a

  ** Here are the hashes for format raw-md5 **
u0:0cc175b9c0f1b6a831c399e269772661:0:0:a:

  ** Here are the hashes for format raw-md4 **
u0:bde52cb31de33e46245e05fbdbd6fb24:0:0:a:
hash type [luks] is not supported

<!-- gh-comment-id:129551505 --> @jfoug commented on GitHub (Aug 10, 2015): pass_gen will now complain when you type in a format that is not supported: ``` $ ../run/pass_gen.pl luks Enter words to hash, one per line. When all entered ^D starts the processing. hash type [luks] is not supported $ ../run/pass_gen.pl raw-md5 Enter words to hash, one per line. When all entered ^D starts the processing. ** Here are the hashes for format raw-md5 ** a u0:0cc175b9c0f1b6a831c399e269772661:0:0:a: $ ../run/pass_gen.pl raw-md5 raw-md4 luks Enter words to hash, one per line. When all entered ^D starts the processing. a ** Here are the hashes for format raw-md5 ** u0:0cc175b9c0f1b6a831c399e269772661:0:0:a: ** Here are the hashes for format raw-md4 ** u0:bde52cb31de33e46245e05fbdbd6fb24:0:0:a: hash type [luks] is not supported ```
bsakaguchi changed title from [GH-ISSUE #1639] pass_gen.pl HashType to [GH-ISSUE #1639] pass_gen.pl HashType 2026-10-15 04:12:55 +07:00
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#1084
No description provided.