[GH-ISSUE #100] gpg-opencl does not work #10

Closed
opened 2026-10-14 02:49:42 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @pettersolberg88 on GitHub (Oct 9, 2012).
Original GitHub issue: https://github.com/openwall/john/issues/100

Originally assigned to: @kholia on GitHub.

The gpg-opencl does not function properly. It finds a password, but does not output it right. Instead of outputting the password, it seems that it outputs the key filename/path of the key instead. I'm trying on a private key that has the password "per". Both running opencl on the cpu and gpu fails, but using the cpu cracker works.

To reproduce:
I compiled the fcd70bd from unstable on 32bit ubuntu and used the key http://folk.ntnu.no/pettso/public/secret.key password:per

make clean linux-x86-opencl
make gpg2john
./gpg2john ~/bugreport/keys/secret.key > ~/bugreport/parsed.out

Crack using gpg-opencl HD5970

./john -fo:gpg-opencl ~/bugreport/parsed.out
OpenCL platform 0: AMD Accelerated Parallel Processing, 3 device(s).
Using device 0: Cypress
Compilation log:
Warning: gpg kernel has register spilling. Lower performance is expected.

Loaded 1 password hash (OpenPGP / GnuPG Secret Key [OpenCL])
/home/petter/bu (/home/petter/bugreport/keys/secret.key)
guesses: 1 time: 0:00:00:00 DONE (Tue Oct 9 15:32:02 2012) c/s: 3716 trying: /home/petter/bu - Pbugreport0
Use the "--show" option to display all of the cracked passwords reliably

./john --show ~/bugreport/parsed.out
/home/petter/bugreport/keys/secret.key:/home/petter/bu

1 password hash cracked, 0 left

Crack using gpg-opencl CPU

rm john.pot
./john -fo:gpg-opencl -dev=2 ~/bugreport/parsed.out
OpenCL platform 0: AMD Accelerated Parallel Processing, 3 device(s).
Using device 2: Intel(R) Core(TM) i7 CPU 940 @ 2.93GHz
Loaded 1 password hash (OpenPGP / GnuPG Secret Key [OpenCL])
/home/petter/bu (/home/petter/bugreport/keys/secret.key)
guesses: 1 time: 0:00:00:52 DONE (Tue Oct 9 15:42:30 2012) c/s: 43.93 trying: /home/petter/bu - Pbugreport0
Use the "--show" option to display all of the cracked passwords reliably

./john --show ~/bugreport/parsed.out
/home/petter/bugreport/keys/secret.key:/home/petter/bu

1 password hash cracked, 0 left

Crack using gpg

rm john.pot
./john -fo:gpg ~/bugreport/parsed.out
Loaded 1 password hash (OpenPGP / GnuPG Secret Key [32/32])
pet (/home/petter/bugreport/keys/secret.key)
guesses: 1 time: 0:00:00:00 DONE (Tue Oct 9 15:46:59 2012) c/s: 1085 trying: pet
Use the "--show" option to display all of the cracked passwords reliably

./john --show ~/bugreport/parsed.out
/home/petter/bugreport/keys/secret.key:pet

1 password hash cracked, 0 left

Originally created by @pettersolberg88 on GitHub (Oct 9, 2012). Original GitHub issue: https://github.com/openwall/john/issues/100 Originally assigned to: @kholia on GitHub. The gpg-opencl does not function properly. It finds a password, but does not output it right. Instead of outputting the password, it seems that it outputs the key filename/path of the key instead. I'm trying on a private key that has the password "per". Both running opencl on the cpu and gpu fails, but using the cpu cracker works. To reproduce: I compiled the fcd70bd from unstable on 32bit ubuntu and used the key http://folk.ntnu.no/pettso/public/secret.key password:per make clean linux-x86-opencl make gpg2john ./gpg2john ~/bugreport/keys/secret.key > ~/bugreport/parsed.out ## Crack using gpg-opencl HD5970 ./john -fo:gpg-opencl ~/bugreport/parsed.out OpenCL platform 0: AMD Accelerated Parallel Processing, 3 device(s). Using device 0: Cypress Compilation log: Warning: gpg kernel has register spilling. Lower performance is expected. Loaded 1 password hash (OpenPGP / GnuPG Secret Key [OpenCL]) /home/petter/bu (/home/petter/bugreport/keys/secret.key) guesses: 1 time: 0:00:00:00 DONE (Tue Oct 9 15:32:02 2012) c/s: 3716 trying: /home/petter/bu - Pbugreport0 Use the "--show" option to display all of the cracked passwords reliably ./john --show ~/bugreport/parsed.out /home/petter/bugreport/keys/secret.key:/home/petter/bu 1 password hash cracked, 0 left ## Crack using gpg-opencl CPU rm john.pot ./john -fo:gpg-opencl -dev=2 ~/bugreport/parsed.out OpenCL platform 0: AMD Accelerated Parallel Processing, 3 device(s). Using device 2: Intel(R) Core(TM) i7 CPU 940 @ 2.93GHz Loaded 1 password hash (OpenPGP / GnuPG Secret Key [OpenCL]) /home/petter/bu (/home/petter/bugreport/keys/secret.key) guesses: 1 time: 0:00:00:52 DONE (Tue Oct 9 15:42:30 2012) c/s: 43.93 trying: /home/petter/bu - Pbugreport0 Use the "--show" option to display all of the cracked passwords reliably ./john --show ~/bugreport/parsed.out /home/petter/bugreport/keys/secret.key:/home/petter/bu 1 password hash cracked, 0 left ## Crack using gpg rm john.pot ./john -fo:gpg ~/bugreport/parsed.out Loaded 1 password hash (OpenPGP / GnuPG Secret Key [32/32]) pet (/home/petter/bugreport/keys/secret.key) guesses: 1 time: 0:00:00:00 DONE (Tue Oct 9 15:46:59 2012) c/s: 1085 trying: pet Use the "--show" option to display all of the cracked passwords reliably ./john --show ~/bugreport/parsed.out /home/petter/bugreport/keys/secret.key:pet 1 password hash cracked, 0 left
Author
Owner

@kholia commented on GitHub (Oct 10, 2012):

I have committed a fix in cd2019afbe.

➜  src git:(unstable-jumbo) ✗ ../run/gpg2john secret.key > hash
➜  src git:(unstable-jumbo) ✗ ../run/john -fo:gpg-opencl hash  
OpenCL platform 0: AMD Accelerated Parallel Processing, 2 device(s).
Using device 0: Cayman

Loaded 1 password hash (OpenPGP / GnuPG Secret Key [OpenCL])
pet              (secret.key)

Essentially, false positives were happening due to uninitialized / wrongly set cracked array.

<!-- gh-comment-id:9303678 --> @kholia commented on GitHub (Oct 10, 2012): I have committed a fix in cd2019afbe90fcbd2477490935764ae7c847cbb3. ``` ➜ src git:(unstable-jumbo) ✗ ../run/gpg2john secret.key > hash ➜ src git:(unstable-jumbo) ✗ ../run/john -fo:gpg-opencl hash OpenCL platform 0: AMD Accelerated Parallel Processing, 2 device(s). Using device 0: Cayman Loaded 1 password hash (OpenPGP / GnuPG Secret Key [OpenCL]) pet (secret.key) ``` Essentially, false positives were happening due to uninitialized / wrongly set cracked array.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
openwall/john#10
No description provided.