# The default OpenSSH key encryption is worse than plaintext

DevFeed: [The default OpenSSH key encryption is worse than plaintext](<https://devfeed.tech/articles/the-default-openssh-key-encryption-is-worse-than-plaintext-29168.md>)

Original publisher: [Read original article](<https://www.latacora.com/blog/2018/08/03/default-openssh-key-encryption/>)

Published: 2018-08-03T14:02:00Z

Content type: opinion

Language: en

Sources: [Latacora](<https://devfeed.tech/sources/latacora.md>)

Topics: [OpenSSH](<https://devfeed.tech/topics/openssh.md>), [Encryption](<https://devfeed.tech/topics/encryption.md>), [Cryptography](<https://devfeed.tech/topics/cryptography.md>), [public key](<https://devfeed.tech/topics/public-key.md>)

Tags: [credentials](<https://devfeed.tech/tags/credentials.md>), [encryption](<https://devfeed.tech/tags/encryption.md>), [github](<https://devfeed.tech/tags/github.md>), [openssh](<https://devfeed.tech/tags/openssh.md>), [openssl](<https://devfeed.tech/tags/openssl.md>), [public-key](<https://devfeed.tech/tags/public-key.md>), [rsa](<https://devfeed.tech/tags/rsa.md>), [ssh](<https://devfeed.tech/tags/ssh.md>)

## AI overview

The article examines default OpenSSH encryption for RSA private keys and argues that deriving the AES key with MD5 of the password and part of the IV makes the protection vulnerable to efficient password guessing. It concludes that the encryption can be ineffective, especially when passwords are reused.

## Source excerpt

Update: I don't know if we can take credit for it or if it's random chance, but I note OpenSSH changed its default in the release after this blog post. The system works! The eslint-scope npm package got compromised recently, stealing npm credentials from your home directory. We started running tabletop exercises: what else would you smash-and-grab, and how can we mitigate that risk? Most people have an RSA SSH key laying around. That SSH key has all sorts of privileges: typically logging into prod and GitHub access. Unlike an npm credential, an SSH key is encrypted, so perhaps it's safe even if it leaks? Let's find out!