openwall / openwall/john

RACF-KDFAES tunable costs

Open
#4,750 0 comments 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

Apparently, RACF-KDFES has at least 2 tunable costs, mfact and rfact, which are currently not reported.
And, apparently, for benchmarking we should ideally have test vectors with lower cost values.

$ date; time ./john --test=0 --format=RACF-KDFAES; date; time ./john --test --format=RACF-KDFAES; date; time ./john --test=-1 --format=RACF-KDFAES; date
Mo 14. Jun 01:20:50 CEST 2021
Will run 8 OpenMP threads
Testing: RACF-KDFAES [KDFAES (DES + HMAC-SHA256/64 + AES-256)]... (8xOMP) PASS

real	0m32.974s
user	1m40.352s
sys	0m0.048s
Mo 14. Jun 01:21:23 CEST 2021
Will run 8 OpenMP threads
Benchmarking: RACF-KDFAES [KDFAES (DES + HMAC-SHA256/64 + AES-256)]... (8xOMP) DONE
Warning: "Many salts" test limited: 2/256
Many salts:	0.6 c/s real, 0.0 c/s virtual
Only one salt:	0.3 c/s real, 0.0 c/s virtual


real	1m23.371s
user	8m11.868s
sys	0m0.059s
Mo 14. Jun 01:22:47 CEST 2021
Will run 8 OpenMP threads
Benchmarking: RACF-KDFAES [KDFAES (DES + HMAC-SHA256/64 + AES-256)]... (8xOMP) DONE
Many salts:	0.6 c/s real, 0.0 c/s virtual
Only one salt:	0.3 c/s real, 0.0 c/s virtual


real	51m55.669s
user	410m38.680s
sys	0m0.283s
Mo 14. Jun 02:14:42 CEST 2021

This is just crazy.
I knew --test=-1 would be pointless, given that at this speed (and john reporting just on decimal place for c/s), I would hardly see any difference.
But I wanted to see just how long it would take.

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 from the --format=RACF-KDFAES entry point and inspect how its tunable costs and benchmark test vectors are represented. Done means the mfact and rfact costs are reported and lower-cost vectors make benchmarking practical without changing the format's behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
cryptography, security
Issue type
Feature
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.