[GH-ISSUE #2070] Build warning for pbkdf2_hmac_common_plug.c #1388

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

Originally created by @magnumripper on GitHub (Mar 2, 2016).
Original GitHub issue: https://github.com/openwall/john/issues/2070

I currently get this for a vanilla linux 64-bit AVX2 build:

In file included from pbkdf2_hmac_common_plug.c:28:0:
pbkdf2_hmac_sha512.h:197:13: warning: ‘pbkdf2_sha512_sse’ defined but not used [-Wunused-function]
 static void pbkdf2_sha512_sse(const unsigned char *K[SSE_GROUP_SZ_SHA512], int KL[SSE_GROUP_SZ_SHA512], unsigned char *S, int SL, int R, unsigned char *out[SSE_GROUP_SZ_SHA512], int outlen, int skip_bytes)
             ^

This must be from some recent commit.

Originally created by @magnumripper on GitHub (Mar 2, 2016). Original GitHub issue: https://github.com/openwall/john/issues/2070 I currently get this for a vanilla linux 64-bit AVX2 build: ``` In file included from pbkdf2_hmac_common_plug.c:28:0: pbkdf2_hmac_sha512.h:197:13: warning: ‘pbkdf2_sha512_sse’ defined but not used [-Wunused-function] static void pbkdf2_sha512_sse(const unsigned char *K[SSE_GROUP_SZ_SHA512], int KL[SSE_GROUP_SZ_SHA512], unsigned char *S, int SL, int R, unsigned char *out[SSE_GROUP_SZ_SHA512], int outlen, int skip_bytes) ^ ``` This must be from some recent commit.
bsakaguchi 2026-10-14 03:47:08 +07:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@jfoug commented on GitHub (Mar 2, 2016):

It is, I simply have not gotten time to look into it. The common code includes ALL of the pbkdf2 hashes, in oSSL mode. There is supposed to be a define GPU_BUILD or something that allows suppression of that function being included (the SIMD stuff). I thought I had added it to sha512, but I must not have, or most have missed the commit.

<!-- gh-comment-id:191402463 --> @jfoug commented on GitHub (Mar 2, 2016): It is, I simply have not gotten time to look into it. The common code includes ALL of the pbkdf2 hashes, in oSSL mode. There is supposed to be a define GPU_BUILD or something that allows suppression of that function being included (the SIMD stuff). I thought I had added it to sha512, but I must not have, or most have missed the commit.
Author
Owner

@magnumripper commented on GitHub (Mar 2, 2016):

Not sure I understand the issue. Since this is a common object file, it should contain SIMD code even for GPU builds, no?

<!-- gh-comment-id:191407184 --> @magnumripper commented on GitHub (Mar 2, 2016): Not sure I understand the issue. Since this is a common object file, it should contain SIMD code even for GPU builds, no?
Author
Owner

@jfoug commented on GitHub (Mar 2, 2016):

Nope. The warning is 'static' function not used. We use these to fully validate 'likely' hits in cmp_exact. In the formats, many of them only crack 'part' of the hash (usually 1 limb deep). So the key may be 64 bytes, but we only get 32 of them. Then in cmp_exact, we have 1 password, and 1 salt. We do the full test, using oSSL logic, to fully validate. The SIMD code is not used. So if it is included, you get that warning. Using SIMD vs oSSL gains nothing when you are testing just a single value, ALSO, cmp_exact calls should be considered rare anyway.

<!-- gh-comment-id:191416032 --> @jfoug commented on GitHub (Mar 2, 2016): Nope. The warning is 'static' function not used. We use these to fully validate 'likely' hits in cmp_exact. In the formats, many of them only crack 'part' of the hash (usually 1 limb deep). So the key may be 64 bytes, but we only get 32 of them. Then in cmp_exact, we have 1 password, and 1 salt. We do the full test, using oSSL logic, to fully validate. The SIMD code is not used. So if it is included, you get that warning. Using SIMD vs oSSL gains nothing when you are testing just a single value, ALSO, cmp_exact calls should be considered rare anyway.
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#1388
No description provided.