Site Tools


Sidebar

software:benchmark:john

What?

Collecting snippets here for benchmarking. Eventually, I want to benchmark Thinkpad L480 vs. Nintento switch vs. Raspi 4, all running Linux. Goal is not to compare bare computing power, I already did that, but computing power together with power consumption: so who computes most for per consumed power?

John the ripper

  • threads: by default, one thread per cpu is spawned. Fits the 3 benchmark platforms, all have 4 cpus
  • memory: John seems to take >100MB or RAM, fits all 3 benchmark platforms
  • I need some simple password which can be found after some time.. to measure the time.
cd Downloads
wget https://www.openwall.com/john/k/john-1.9.0-jumbo-1.tar.xz
tar xJfv john-1.9.0-jumbo-1.tar.xz 
cd john-1.9.0-jumbo-1/src/
./configure 
make -s clean && make -sj4
cd ../run

# for testing, hash password 'calvin' and see if it gets
# found by john
openssl passwd -6 -salt xyz calvin >mypasswd_test_sha512
./john mypasswd_test_sha512

# if you want to bruteforce hashes from the running system
sudo ./unshadow /etc/passwd /etc/shadow > mypasswd
./john mypasswd

# other hash creation methods
openssl passwd -1 -salt xyz secretpassword >mypasswd_md5
openssl passwd -2 -salt xyz secretpassword >mypasswd_sha256
openssl passwd -6 -salt xyz secretpassword >mypasswd_sha512

Some results, Thinkpad L480

passwd crypt runtime calculations/sec power loaded calculations/Wh
aaaaa sha512 47sec 5053C/s 14.7V/1.9A / 25mAh 202.1k
aaaaa md5 1sec 2273C/s
aaaab md5 241sec 9091C/s
  • power consumption unloaded: 14.7V/0.24A
  • 1Ah = 202120 sha512 operations

Some results, raspi4/2GB

passwd crypt runtime calculations/sec power loaded calculations/Wh
aaaaa sha512 492sec 485.3C/s 5.07V/1.01A / 142mAh 3.5k
aaaaa md5 17sec 14313C/s 5.07V/1.01A / 3mAh 4771.0k
aaaab md5 3506ec 17120C/s 5.07V/1.01A / 872mAh
  • power consumption unloaded: 5.13V/0.45A
  • 1Ah = 3415 sha512 operations
  • ⇒ For sha512 operations, for a given amount of electric energy like 1Ah, the raspi4 is doing 2% of the operations which the Thinkpad does with the energy.
software/benchmark/john.txt · Last modified: 2022/11/13 12:06 by 127.0.0.1