Stories
Slash Boxes
Comments

SoylentNews is people

posted by martyb on Monday August 06 2018, @06:23AM   Printer-friendly
from the send-money? dept.

The Latacora firm has a blog post asserting that OpenSSH-portable has poor defaults for encrypting private RSA keys because of its reliance on OpenSSL. The blog goes into why this is a problem and how you can test it for yourself.

There is nothing wrong with the generated RSA keys themselves, however, just the encryption of the private RSA keys -- if made using current defaults. There are two ways of encrypting RSA keys, an old and apparently insecure way, and a new key format available but not default. Newer key types like Ed25519 use only the new key format and are not bothered by this problem.

Earlier on SN:
WikiLeaks Unveils CIA Implants That Steal SSH Credentials From Windows, Linux PCs (2017)
Upgrade Your SSH Keys (2016)
OpenSSH 6.8 Will Feature Key Discovery and Rotation for Easier Switching to DJB's Ed25519 (2015)


Original Submission

 
This discussion has been archived. No new comments can be posted.
Display Options Threshold/Breakthrough Mark All as Read Mark All as Unread
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
  • (Score: 4, Informative) by coolgopher on Monday August 06 2018, @07:03AM (10 children)

    by coolgopher (1157) on Monday August 06 2018, @07:03AM (#717762)

    If you want to skip to the important bit, what you want to do is:

        ssh-keygen -p -o -f ~/.ssh/id_rsa

    The -o is the magic sauce that saves the key in the new format.

    Starting Score:    1  point
    Moderation   +2  
       Informative=2, Total=2
    Extra 'Informative' Modifier   0  
    Karma-Bonus Modifier   +1  

    Total Score:   4  
  • (Score: 1, Informative) by Anonymous Coward on Monday August 06 2018, @08:43AM

    by Anonymous Coward on Monday August 06 2018, @08:43AM (#717766)

    -o Causes ssh-keygen to save private keys using the new OpenSSH format rather than the
          more compatible PEM format. The new format has increased resistance to brute-force
          password cracking but is not supported by versions of OpenSSH prior to 6.5. Ed25519
          keys always use the new private key format.

  • (Score: 2) by driverless on Monday August 06 2018, @09:15AM (3 children)

    by driverless (4770) on Monday August 06 2018, @09:15AM (#717771)

    You also have to wonder about the title:

    The default OpenSSH key encryption is worse than plaintext

    Since "plaintext" means no protection at all, what's "worse than plaintext"? Does OpenSSH proactively mail your key to the CIA, FSB, DDSI, Unit 8200, MSS, SEBIN, and Special Unit 731?

    • (Score: 2) by coolgopher on Monday August 06 2018, @10:57AM

      by coolgopher (1157) on Monday August 06 2018, @10:57AM (#717790)

      They cover that in TFA. Essentially, due to ease of cracking and the likelihood of password reuse, it's worse because someone could get access to far more than ssh.

    • (Score: 2) by RS3 on Monday August 06 2018, @01:26PM (1 child)

      by RS3 (6367) on Monday August 06 2018, @01:26PM (#717821)

      It's also worse in the sense that you believe you're secure, so you're sending stuff you think is protected. If you know you're in plaintext mode, hopefully you're not going to pass an admin password, but you're more likely to if you think you have the most awesome encryption short of quantum computing.

      • (Score: 0) by Anonymous Coward on Tuesday August 07 2018, @07:17PM

        by Anonymous Coward on Tuesday August 07 2018, @07:17PM (#718389)

        It's also worse in the sense that you believe you're secure, so you're sending stuff you think is protected. If you know you're in plaintext mode, hopefully you're not going to pass an admin password, but you're more likely to if you think you have the most awesome encryption short of quantum computing.

        Not really relevant for the passphrases in question. These passphrases are used to locally decrypt your private keys used in key-based authentication. The passphrase never leaves the local machine running ssh.

        The purpose of encrypting the keys in this manner is if someone gains access to your files they don't automatically gain access to the private key. If your system is already compromised an attacker can probably snoop the key and/or passphrase when you decrypt it, so the threat is pretty much limited to scenarios where someone physically steals your backup tapes. That still may be worth worrying about: you probably don't want a stolen backup tape to mean the thief can now successfully authenticate on the live system.

  • (Score: 0) by Anonymous Coward on Monday August 06 2018, @09:28AM (2 children)

    by Anonymous Coward on Monday August 06 2018, @09:28AM (#717772)

    If you want to skip to the important bit, what you want to do is:

            ssh-keygen -p -o -f ~/.ssh/id_rsa

    The -o is the magic sauce that saves the key in the new format.

    If you really want your key to be secure you can pipe the output of ssh-keygen to /dev/null

    • (Score: 4, Funny) by driverless on Monday August 06 2018, @10:10AM (1 child)

      by driverless (4770) on Monday August 06 2018, @10:10AM (#717782)

      If you really want your key to be secure you can pipe the output of ssh-keygen to /dev/null

      That's not really a web scale solution though, because /dev/null doesn't support sharding.

      • (Score: 0) by Anonymous Coward on Monday August 06 2018, @05:41PM

        by Anonymous Coward on Monday August 06 2018, @05:41PM (#717925)

        Sure it does, just create another partition:

        mknod /dev/null2 c 1 3
        chmod 666 /dev/null2

  • (Score: 2) by chewbacon on Tuesday August 07 2018, @01:39AM (1 child)

    by chewbacon (1032) on Tuesday August 07 2018, @01:39AM (#718065)

    You don't -b 4096?

    • (Score: 2) by coolgopher on Tuesday August 07 2018, @01:44AM

      by coolgopher (1157) on Tuesday August 07 2018, @01:44AM (#718066)

      Not when I'm just changing the passphrase (and storage format) on an existing key, no...