openwall / openwall/john

The pfx format has a huge performance loss with clang

Open
#5,604 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

  • I can easily reproduce:

gcc from Ubuntu 24

$ john | head -1; sleep 3; john --test --format=pfx
John the Ripper 1.9.0-jumbo-1+bleeding-b3bd5ea707 2024-12-01 03:06:08 +0100 OMP [linux-gnu 64-bit x86_64 AVX2 AC]
Will run 8 OpenMP threads
Benchmarking: pfx, (.pfx, .p12) [PKCS#12 PBE (SHA1/SHA2) 256/256 AVX2 8x]... (8xOMP) DONE
Speed for cost 1 (iteration count) of 2048, cost 2 (mac-type [1:SHA1 224:SHA224 256:SHA256 384:SHA384 512:SHA512]) of 1
Raw:	26842 c/s real, 3696 c/s virtual

clang from Ubuntu 24.

$ $ run/john | head -1; sleep 3; run/john --test --format=pfx
John the Ripper 1.9.0-jumbo-1+bleeding-364b1ca435 2024-12-02 06:20:23 +0100 [linux-gnu 64-bit x86_64 AVX2 AC]
Benchmarking: pfx, (.pfx, .p12) [PKCS#12 PBE (SHA1/SHA2) 256/256 AVX2 8x2]... DONE
Speed for cost 1 (iteration count) of 2048, cost 2 (mac-type [1:SHA1 224:SHA224 256:SHA256 384:SHA384 512:SHA512]) of 1
Raw:	9792 c/s real, 9792 c/s virtual
$ run/john | head -1; sleep 3; run/john --test --format=pfx
John the Ripper 1.9.0-jumbo-1+bleeding-0251a0f0f8 2024-12-02 18:56:33 -0300 [linux-gnu 64-bit x86_64 AVX2 AC]
Benchmarking: pfx, (.pfx, .p12) [PKCS#12 PBE (SHA1/SHA2) 256/256 AVX2 8x]... DONE
Speed for cost 1 (iteration count) of 2048, cost 2 (mac-type [1:SHA1 224:SHA224 256:SHA256 384:SHA384 512:SHA512]) of 1
Raw:	11328 c/s real, 11328 c/s virtual

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 reproducing the reported run/john --test --format=pfx benchmark with both GCC and Clang builds, using the commands and iteration costs shown in the issue. Trace the pfx format implementation and its compiler-sensitive path; done means the Clang benchmark no longer has the reported performance loss without regressing the GCC result.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
performance
Issue type
Bug
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.