News for hackers. Stuff that matters.
Re:The default OpenSSH key encryption is worse than plaintext by pvg on Friday August 03, 2018 @04:04PM (#17683166)
Beside compatibility, is there any reason not to use Ed25519 keys for everything?
Re:The default OpenSSH key encryption is worse than plaintext by lvh on Friday August 03, 2018 @04:21PM (#17683303)
Nope! Ed25519 is great and honestly I think the compatibility concerns are overblown. It was introduced in 2014. If you are running four year old SSH you have other problems, like probably RHEL or some nonsense.

That said: Ed25519 is a local optimum: the bigger win is to not have long-held credentials at all, and instead use an SSH CA or something like Gravitational Teleport. Doesn't work for GitHub though.

Re:The default OpenSSH key encryption is worse than plaintext by glenjamin on Friday August 03, 2018 @04:32PM (#17683382)
In a world where you don’t have long held credentials - how do you get the short term credentials?
Re:The default OpenSSH key encryption is worse than plaintext by xyzzy123 on Friday August 03, 2018 @04:48PM (#17683488)
We do this:

Master user records in an identity/SSO system. We use ADFS.

Use a protocol which provides a portable “signed”, temporary credential. We use SAML but OIDC also works.

Have a command-line client which auths to the SSO and then relays an identity proof to a trusted component (lambda, cloud function, dedicated instance, whatever your policy says is ok). The identity proof is just a saml assertion or oidc token.

Have trusted component validate the identity proof from SSO and generate time limited credentials (we issue ssh, kube and iam). Our client then auto-xfers those creds up to jumpbox but you could drop them on workstation instead if your policy allows.

Re:The default OpenSSH key encryption is worse than plaintext by tptacek on Friday August 03, 2018 @05:26PM (#17683768)
This is roughly what I'm talking about when I bring up SSH CA short-lived credential workflows.
Re:The default OpenSSH key encryption is worse than plaintext by wvh on Friday August 03, 2018 @08:36PM (#17684686)
I currently work in academic environments and I don't have much faith in the SSO systems. I thought about this, but often the SSO credentials are also the email password – the one password that gets entered and stored just about everywhere for the average user. I'm not willing to bet the security on a user's main login/email password, which seems to be a common setup. With that password or even just access to a user's main mailbox, a smart attacker might get through multiple layers of security by simply convincing services or staff to reset credentials.

Though it might work with a second, more limited (not-so-)SSO system for specific users and environments.

Re:The default OpenSSH key encryption is worse than plaintext by lvh on Friday August 03, 2018 @09:11PM (#17684836)
You're right that shitty systems train users to be phishable -- by typing their password all over the place -- all the time, not even counting the poor default password hygiene most users have. This is one of the reasons U2F/WebAuthn is so incredibly valuable.
Re:The default OpenSSH key encryption is worse than plaintext by angry_octet on Saturday August 04, 2018 @12:21PM (#17687418)
Agree, SSO failures train people to type their domain password everywhere. Also used for proxy login, sent out via SMBv1 etc.

A jumpbox with 2FA might be workable. Servers only accept logins from the jumpboxes, but you don't have to get 2FA working on them. Essentially it's an internal VPN gateway. (Be on the lookout for the knobheads in IT that set up parallel login mechanisms without 2FA, like mounting the file share, virtual desktop logins from the hypervisor, Kerberos auth.)

Re:The default OpenSSH key encryption is worse than plaintext by amaccuish on Friday August 03, 2018 @09:30PM (#17684893)
I love SAML (not the XML part), it gives me one place where I can concentrate. My SSO first tries kerberos (if they've logged into their Windows machine using AD), x509 for smartcards, and if all that fails, username+password+totp. Password login is blocked without a TOTP token provisioned. Also it's one place I can stick fail2ban rules.
Re:The default OpenSSH key encryption is worse than plaintext by cbhl on Friday August 03, 2018 @04:45PM (#17683469)
If I understand correctly: with long-held credentials.

Basically, you use long-held credentials to generate short-term credentials, and then use the short-term credentials themselves to access whatever server or service you need.

Re:The default OpenSSH key encryption is worse than plaintext by guelo on Friday August 03, 2018 @05:14PM (#17683670)
You could have a key rotation process where you use the old key to install the new key and delete the old key. But it seems sketchy because if you don't rotate in time the old key expires and you're locked out. I think in practice you'll always end up with a super-duper secret, rarely used, long term key. Or have some other backdoor like root password, LDAP/Kerberos, ADFS, etc.
Re:The default OpenSSH key encryption is worse than plaintext by jakobdabo on Friday August 03, 2018 @04:25PM (#17683339)
RHEL 7 (and derivatives) do support Ed25519 keys.
Re:The default OpenSSH key encryption is worse than plaintext by leonlag on Friday August 03, 2018 @04:22PM (#17683309)
The only thing I can think of is that no smartcard/usb-key that I know of support them. Please if someone knows of any, let me know.
Re:The default OpenSSH key encryption is worse than plaintext by amaccuish on Friday August 03, 2018 @09:34PM (#17684903)
The OpenPGP 3.3 card has ECC but not Ed25519 :(

FYI it supports [0]: ansix9p256r1, ansix9p384r1, ansix9p521r1 and brainpoolP256r1, brainpoolP384r1, brainpoolP512r1

[0] https://gnupg.org/ftp/specs/OpenPGP-smart-card-application-3...

Re:The default OpenSSH key encryption is worse than plaintext by wahern on Friday August 03, 2018 @04:55PM (#17683533)
I think some OpenPGP smartcards like the GnuK might support it, but no PIV mode cards AFAIK. And I don't know if the components higher up the stack (gpg-agent, ssh-agent, PKCS#11 drivers, etc) can make use of those keys. Each new key type requires protocol support up and down the stack.
Re:The default OpenSSH key encryption is worse than plaintext by garmaine on Friday August 03, 2018 @07:09PM (#17684319)
Yes, Ed25519/Curve25519 has weird cryptographic choices that make it difficult to do certain things. I wouldn't use it for anything other than the specific use case it was designed for: key agreement and single signature authorization/verification.
Re:The default OpenSSH key encryption is worse than plaintext by tatersolid on Saturday August 04, 2018 @12:21PM (#17687421)
Elaborate? I thought Ed25519 was a general deterministic signature scheme, and Curve25519 a general key agreement scheme.
Re:The default OpenSSH key encryption is worse than plaintext by garmaine on Saturday August 04, 2018 @02:56PM (#17688023)
And yet people have used it for ring signature authorization schemes (CryptoNote/Monero) which has directly led to inflation bugs (permitted double-spends) and an inability to have key derivation for secure long lived wallets.

That’s due to Curve25519 having a non-unit co factor. There’s a half dozen other weird properties of the curve chosen for smal efficiency gains or whatnot which also might lead to security holes in any application which is not the single signer or 2 party key agreement use case.

Re:The default OpenSSH key encryption is worse than plaintext by tptacek on Friday August 03, 2018 @04:09PM (#17683210)
No, you should use Ed25519 keys wherever you can.