[GH-ISSUE #1036] Three format fails after merging GPU mask branch #634

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

Originally created by @magnumripper on GitHub (Jan 28, 2015).
Original GitHub issue: https://github.com/openwall/john/issues/1036

Testing: bfegg, Eggdrop [Blowfish 32/64]... (4xOMP) FAILED (get_key(1))
Testing: HMAC-SHA1 [password is key, SHA1 128/128 XOP 8x]... (4xOMP) FAILED (get_key(3))
Testing: mysql, MySQL pre-4.1 [32/64]... (4xOMP) FAILED (get_key(4))

This may or may not be problems in the formats. It's more likely these are "self test technical" issues that need to be worked around, either in formats.c or in these formats.

Originally created by @magnumripper on GitHub (Jan 28, 2015). Original GitHub issue: https://github.com/openwall/john/issues/1036 ``` Testing: bfegg, Eggdrop [Blowfish 32/64]... (4xOMP) FAILED (get_key(1)) Testing: HMAC-SHA1 [password is key, SHA1 128/128 XOP 8x]... (4xOMP) FAILED (get_key(3)) Testing: mysql, MySQL pre-4.1 [32/64]... (4xOMP) FAILED (get_key(4)) ``` This may or may not be problems in the formats. It's more likely these are "self test technical" issues that need to be worked around, either in formats.c or in these formats.
bsakaguchi 2026-10-14 03:16:21 +07:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@sayan1an commented on GitHub (Jan 28, 2015):

Yes, I saw that too. Looking into it right now.

<!-- gh-comment-id:71795737 --> @sayan1an commented on GitHub (Jan 28, 2015): Yes, I saw that too. Looking into it right now.
Author
Owner

@sayan1an commented on GitHub (Jan 28, 2015):

Quick fix:
change line 539 in format.c to the following:

for (i = match - 1; i >= 0; i--)
<!-- gh-comment-id:71796846 --> @sayan1an commented on GitHub (Jan 28, 2015): Quick fix: change line 539 in format.c to the following: ``` for (i = match - 1; i >= 0; i--) ```
Author
Owner

@sayan1an commented on GitHub (Jan 28, 2015):

However, it looks like the these format generate same hash for multiple passwords. Otherwise, there shouldn't have been any problem.

<!-- gh-comment-id:71797195 --> @sayan1an commented on GitHub (Jan 28, 2015): However, it looks like the these format generate same hash for multiple passwords. Otherwise, there shouldn't have been any problem.
Author
Owner

@magnumripper commented on GitHub (Jan 28, 2015):

Hmm or maybe they just have dupe test vectors?

<!-- gh-comment-id:71798443 --> @magnumripper commented on GitHub (Jan 28, 2015): Hmm or maybe they just have dupe test vectors?
Author
Owner

@magnumripper commented on GitHub (Jan 28, 2015):

Hm, no.

$ ../run/john -form:bfegg --list=format-tests 
bfegg   0   +9F93o1OxwgK1   123456
bfegg   1   +C/.8o.Wuph9.   qwerty
bfegg   2   +EEHgy/MBLDd0   walkman
bfegg   3   +vPBrs07OTXE/   tesztuser
bfegg   4   +zIvO/1nDsd9.   654321
<!-- gh-comment-id:71798847 --> @magnumripper commented on GitHub (Jan 28, 2015): Hm, no. ``` $ ../run/john -form:bfegg --list=format-tests bfegg 0 +9F93o1OxwgK1 123456 bfegg 1 +C/.8o.Wuph9. qwerty bfegg 2 +EEHgy/MBLDd0 walkman bfegg 3 +vPBrs07OTXE/ tesztuser bfegg 4 +zIvO/1nDsd9. 654321 ```
Author
Owner

@magnumripper commented on GitHub (Jan 28, 2015):

Are we always setting all keys in the batch? If not, you might see leftovers from a previous crypt.

<!-- gh-comment-id:71799107 --> @magnumripper commented on GitHub (Jan 28, 2015): Are we always setting all keys in the batch? If not, you might see leftovers from a previous crypt.
Author
Owner

@sayan1an commented on GitHub (Jan 28, 2015):

Yes, right. But then, shouldn't the format cleanse its buffer such that cmp_one() and cmp_exact() does not return false positives?

Anyway, the latest commit emulates the self-test exactly as we did before for older formats and externally, they shouldn't notice any difference.

<!-- gh-comment-id:71799669 --> @sayan1an commented on GitHub (Jan 28, 2015): Yes, right. But then, shouldn't the format cleanse its buffer such that cmp_one() and cmp_exact() does not return false positives? Anyway, the latest commit emulates the self-test exactly as we did before for older formats and externally, they shouldn't notice any difference.
Author
Owner

@magnumripper commented on GitHub (Jan 28, 2015):

shouldn't the format cleanse its buffer such that cmp_one() and cmp_exact() does not return false positives?

In real runs, we always set n keys and then call crypt_all(n) and cmp_*(n) so buffer cleaning would just harm performance. We should try to make the self-test work as close to real-life as possible (perhaps fill keys with dummy strings that are not included in any actual test vector).

<!-- gh-comment-id:71801172 --> @magnumripper commented on GitHub (Jan 28, 2015): > shouldn't the format cleanse its buffer such that cmp_one() and cmp_exact() does not return false positives? In real runs, we always set _n_ keys and then call `crypt_all(n)` and `cmp_*(n)` so buffer cleaning would just harm performance. We should try to make the self-test work as close to real-life as possible (perhaps fill keys with dummy strings that are not included in any actual test vector).
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#634
No description provided.