Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Sun, 26 Sep 2021 14:14:40 +0200
From: Solar Designer <>
To: Ben Calegari <>
Subject: Re: Cracking CSR Private Key

Hello Ben,

I'm sorry no one replied sooner.

On Wed, Sep 22, 2021 at 12:19:00AM -0400, Ben Calegari wrote:
> I'm having trouble cracking a key I created in the following way:
> openssl req -newkey rsa:2048 -keyout keynamehere.key -out csrnamehere.key
> I don't see a corresponding xxx2john utility to convert this sort of key to
> a hash that john can understand. Is it impossible or am I just missing
> something?

The corresponding utility is  I've just tested your command
above, typing "test" for the password, followed by:

$ ./ keynamehere.key > pw
$ ./john pw
Warning: detected hash type "PEM", but the string is also recognized as "pem-opencl"
Use the "--format=pem-opencl" option to force loading these as that type instead
Using default input encoding: UTF-8
Loaded 1 password hash (PEM, PKCS#8 private key (RSA/DSA/ECDSA) [PBKDF2-SHA1 128/128 AVX 4x 3DES/AES])
Cost 1 (iteration count) is 4096 for all loaded hashes
Cost 2 (cipher [1=3DES 2/3/4=AES-128/192/256]) is 1 for all loaded hashes
Will run 32 OpenMP threads
Proceeding with single, rules:Single
Press 'q' or Ctrl-C to abort, almost any other key for status
Almost done: Processing the remaining buffered candidate passwords, if any.
Proceeding with wordlist:./password.lst
test             (?)
1g 0:00:00:00 DONE 2/3 (2021-09-26 14:09) 1.960g/s 4015p/s 4015c/s 4015C/s 123456..222222
Use the "--show" option to display all of the cracked passwords reliably
Session completed.
$ ./john --show pw

1 password hash cracked, 0 left

Maybe we need to improve so that it would redirect
people to (at least) when its input looks like PEM.  Would
that have helped you?


Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.