Velvet Star Monitor

Standout celebrity highlights with iconic style.

news

How to retrieve passphrase for private key?

Writer Andrew Mclaughlin

I generated DSA key using ubuntu. Saved the public key on remote server, such that keys are required before connecting ssh.

I have forgot the passphrase for that key. How can I retrieve it?

1 Answer

If it was a reasonably secure password, the answer is probably "not at all". According to the ssh-keygen man page, the private key is encrypted using 128bit AES. Although this algorithm has some weaknesses, the complexity is still high enough to make it reasonably secure. So, assuming a strong password and highly parallel decryption (for instance using GPGPU) having 210 threads, each having a very optimistic rate of 230 operations per second, after a day of time, you could have run about 256 operations. With an effective complexity of around 2100, it would take about 3 billion years to break the key...

If it was an insecure password, you might have a chance to break it with brute force though. It seems the community enhanced edition John the Ripper has a GPGPU module for brute-force attacks on OpenSSH key files (didn't try it, I don't use proprietary drivers).

By thy way, a similar question, not about retrieving the key, but instead breaking the encryption itself was already asked.

1

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy