openwall / openwall/john

Make BitLocker OpenCL use shared SHA-256 code

Open
#5,267 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement maintenance/cleanup
Dominant language
C
Stars
13.6k
Forks
2.6k
PR merge metrics
No merged PRs in 30d

Description

Right now, opencl_bitlocker.h and bitlocker_kernel.cl have their own implementation of SHA-256. We could both reduce source code size/duplication and likely speed things up by switching to our shared and maintained SHA-256 code.

In particular, I notice that BitLocker's current code does not use bitselect - it can only use LUT3 and classic (two-operand) Boolean operations. This likely makes it less optimal on AMD GPUs. It also does not use rotate. So a temporary fix (before the refactoring to use shared code) may be to add such usage (in the same cases where we do it in our shared SHA-256 code).

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by comparing the SHA-256 implementation in opencl_bitlocker.h and bitlocker_kernel.cl with the project's shared SHA-256 code, including its use of bitselect and rotate. Done means BitLocker uses the shared implementation without source duplication and retains correct OpenCL behavior; the issue does not name a specific test.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
cryptography, performance
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.