Skip to content

Add OpenCL SHA384 format - #6025

Open
rofl0r wants to merge 1 commit into
openwall:bleeding-jumbofrom
rofl0r:sha384-opencl
Open

Add OpenCL SHA384 format#6025
rofl0r wants to merge 1 commit into
openwall:bleeding-jumbofrom
rofl0r:sha384-opencl

Conversation

@rofl0r

@rofl0r rofl0r commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Implemented OpenCL SHA384 cracking support based on the GPL'd SHA512 OpenCL implementation. Four files added:

  • run/opencl/sha384_kernel.cl: Kernel based on sha512_gpl_kernel.cl, overrides H0-H7 with SHA384 initial values (FIPS 180-4), renames sha512_block to sha384_block. Round constants and Sigma/sigma macros are identical to SHA512; truncation to 48 bytes handled at C level.

  • src/rawSHA384_common.h: Common header with DIGEST_SIZE=48, FORMAT_TAG="$SHA384$", and sha384_common_* function declarations.

  • src/rawSHA384_common_plug.c: Test vectors (verified against Python hashlib.sha384), SHA384 initial values for binary_rev, and valid/binary/split implementations.

  • src/opencl_rawsha384_fmt_plug.c: Main format plugin based on opencl_rawsha512_gpl_fmt_plug.c, stripped of XSHA512 variant. CPU fallback uses SHA384_Init/Update/Final.

Self-test passes (11 test vectors), benchmark runs, and password cracking verified end-to-end.

Implemented OpenCL SHA384 cracking support based on the GPL'd SHA512
OpenCL implementation. Four files added:

- run/opencl/sha384_kernel.cl: Kernel based on sha512_gpl_kernel.cl,
  overrides H0-H7 with SHA384 initial values (FIPS 180-4), renames
  sha512_block to sha384_block. Round constants and Sigma/sigma macros
  are identical to SHA512; truncation to 48 bytes handled at C level.

- src/rawSHA384_common.h: Common header with DIGEST_SIZE=48,
  FORMAT_TAG="$SHA384$", and sha384_common_* function declarations.

- src/rawSHA384_common_plug.c: Test vectors (verified against
  Python hashlib.sha384), SHA384 initial values for binary_rev,
  and valid/binary/split implementations.

- src/opencl_rawsha384_fmt_plug.c: Main format plugin based on
  opencl_rawsha512_gpl_fmt_plug.c, stripped of XSHA512 variant.
  CPU fallback uses SHA384_Init/Update/Final.

Self-test passes (11 test vectors), benchmark runs, and password
cracking verified end-to-end.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant