Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Three format fails after merging GPU mask branch #1036

Closed
magnumripper opened this issue Jan 28, 2015 · 8 comments
Closed

Three format fails after merging GPU mask branch #1036

magnumripper opened this issue Jan 28, 2015 · 8 comments
Labels

Comments

@magnumripper
Copy link
Member

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.

@sayan1an
Copy link
Contributor

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

@sayan1an
Copy link
Contributor

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

for (i = match - 1; i >= 0; i--)

@sayan1an
Copy link
Contributor

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

@magnumripper
Copy link
Member Author

Hmm or maybe they just have dupe test vectors?

@magnumripper
Copy link
Member Author

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

@magnumripper
Copy link
Member Author

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

@sayan1an
Copy link
Contributor

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.

@magnumripper
Copy link
Member Author

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 up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants