[GH-ISSUE #1191] SunMD5 format fails self-test using AVX2 #745

Closed
opened 2026-10-14 03:22:13 +07:00 by bsakaguchi · 3 comments
Owner

Originally created by @magnumripper on GitHub (Apr 8, 2015).
Original GitHub issue: https://github.com/openwall/john/issues/1191

Originally assigned to: @jfoug on GitHub.

$ ../run/john -test -form:sunmd5 
Benchmarking: SunMD5 [MD5 256/256 AVX2 8x2 x64]... FAILED (cmp_all(2))

I really can't see the problem. Except there are two very strange ifdefs:

#if COEF == 4
                        ((ARCH_WORD_32*)cpo)[56]=((16+roundasciilen)<<3);
#else
                        ((ARCH_WORD_32*)cpo)[28]=((16+roundasciilen)<<3);
#endif

This is already within #if SIMD_COEF_32 so what is that else clause for? MMX?

Originally created by @magnumripper on GitHub (Apr 8, 2015). Original GitHub issue: https://github.com/openwall/john/issues/1191 Originally assigned to: @jfoug on GitHub. ``` $ ../run/john -test -form:sunmd5 Benchmarking: SunMD5 [MD5 256/256 AVX2 8x2 x64]... FAILED (cmp_all(2)) ``` I really can't see the problem. Except there are two very strange ifdefs: ``` #if COEF == 4 ((ARCH_WORD_32*)cpo)[56]=((16+roundasciilen)<<3); #else ((ARCH_WORD_32*)cpo)[28]=((16+roundasciilen)<<3); #endif ``` This is already within `#if SIMD_COEF_32` so what is that else clause for? MMX?
bsakaguchi 2026-10-14 03:22:13 +07:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@magnumripper commented on GitHub (Apr 8, 2015):

Ah, that was it

#if COEF == 8
                       ((ARCH_WORD_32*)cpo)[112]=((16+roundasciilen)<<3);
#elif COEF == 4
                       ((ARCH_WORD_32*)cpo)[56]=((16+roundasciilen)<<3);
#else
                       ((ARCH_WORD_32*)cpo)[28]=((16+roundasciilen)<<3);
#endif
<!-- gh-comment-id:91005401 --> @magnumripper commented on GitHub (Apr 8, 2015): Ah, that was it ``` C #if COEF == 8 ((ARCH_WORD_32*)cpo)[112]=((16+roundasciilen)<<3); #elif COEF == 4 ((ARCH_WORD_32*)cpo)[56]=((16+roundasciilen)<<3); #else ((ARCH_WORD_32*)cpo)[28]=((16+roundasciilen)<<3); #endif ```
Author
Owner

@frank-dittrich commented on GitHub (Apr 8, 2015):

((ARCH_WORD_32*)cpo)[COEFF*14]=((16+roundasciilen)<<3);
<!-- gh-comment-id:91006295 --> @frank-dittrich commented on GitHub (Apr 8, 2015): ``` ((ARCH_WORD_32*)cpo)[COEFF*14]=((16+roundasciilen)<<3); ```
Author
Owner

@magnumripper commented on GitHub (Apr 8, 2015):

Exactly, that's what I actually committed. And that's what Jim should have done to start with.

<!-- gh-comment-id:91011179 --> @magnumripper commented on GitHub (Apr 8, 2015): Exactly, that's what I actually committed. And that's what Jim should have done to start with.
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#745
No description provided.