OpenSSL "dsa" - Open Encrypted DSA Keys

Q

How to open an encrypted DSA key file using OpenSSL "dsa" command? I was told the key file is DES encrypted and I know the password.

✍: FYIcenter.com

A

If you are trying to open a password (encrypted) DSA key file using the "dsa" command, you will be prompted for the password as shown below:

C:\Users\fyicenter>\local\openssl\openssl

OpenSSL> dsa -in my_dsa_2048_des.key -text
read DSA key
Enter pass phrase for my_dsa_2048_des.key: noidea
unable to load Private Key
15816:error:06065064:digital envelope routines:EVP_DecryptFinal_ex:
   bad decrypt:.\crypto\evp\evp_enc.c:529:
15816:error:0906A065:PEM routines:PEM_do_header:
   bad decrypt:.\crypto\pem\pem_lib.c:482:
unable to load Key
error in dsa

OpenSSL> dsa -in my_dsa_2048_des.key -text
read DSA key
Enter pass phrase for my_dsa_2048_des.key: fyicenter
Private-Key: (2048 bit)
priv:
    4b:9f:fb:3f:e2:ab:91:26:75:4e:af:06:b2:9c:df:
    e4:fa:eb:9e:07:53:35:4b:7f:28:c6:07:6a:bb:b9:
    ce:a9
pub:
    77:97:51:fa:27:bf:99:e1:46:ef:12:22:ad:8d:96:
    83:f9:45:51:50:03:a7:d8:e3:83:6b:82:4f:36:27:
    78:92:e7:0f:58:ac:63:40:bd:ae:90:24:ca:c5:21:
...

Options used in this command are:

  • "-in my_dsa_2048_des.key" - Read the DSA private key file.
  • "-text" - Print contents of the key in text format.
  • "noidea" - The incorrect password of the key file. You get errors.
  • "fyicenter" - The correct password of the key file.

 

OpenSSL "dsa -aes*" - Re-Encrypt DSA Keys

OpenSSL "gendsa -des" - DES Encrypt DSA Keys

OpenSSL "gendsa" and "dsa" Commands

⇑⇑ OpenSSL Tutorials

2016-12-18, 3154🔥, 0💬