News for hackers. Stuff that matters.
Re:Secretive – macOS native app to store SSH keys in the Sec... by pqdbr on Saturday June 27, 2020 @04:47PM (#23664559)
From the FAQ:

> Q: How do I import my current SSH keys, or export my Secretive Keys?

> A: The secure enclave doesn't allow import or export of private keys. For any new computer, you should just create a new set of keys. If you're using a smart card, you might be able to export your private key from the vendor's software.

I don't get it. If so, how am I supposed to back up my keys in case of a hardware failure or hardware theft?

Re:Secretive – macOS native app to store SSH keys in the Sec... by GekkePrutser on Saturday June 27, 2020 @05:02PM (#23664666)
Like the others have said: You just use multiple. You can just add multiple keys to the authorized_keys file.

This is actually the perfect scenario because an attacker can never get hold of the private key. That means that the key is unique: If it's in your hands, it means an attacker doesn't have it. Most smart cards work this way, they generate the private key inside and it can never leave the hardware, you can only prove you have it by using it to sign or encrypt something.

This is very different from SSH keyfiles on disk which can be stolen in many ways, and as such can be compromised without you ever knowing about it.

It's really cool that we can now use this functionality for SSH too. I currently use Yubikeys in OpenPGP mode for this but I might switch to this once I get a T2-enabled Mac.

Re:Secretive – macOS native app to store SSH keys in the Sec... by folmar on Saturday June 27, 2020 @07:29PM (#23665547)
"now" is at least 16 years now (with PKCS11 and opensc)
Re:Secretive – macOS native app to store SSH keys in the Sec... by pqdbr on Saturday June 27, 2020 @05:13PM (#23664729)
By "you just use multiple", you mean I would have to generate extra private keys, add them to authorized_keys, and store them somewhere other than my mac, right?

Because just by using multiple keys I would still be locked out if all of them were stored in this 'Secretive' app.

Re:Secretive – macOS native app to store SSH keys in the Sec... by zymhan on Saturday June 27, 2020 @05:17PM (#23664762)
If you only have a single SSH key as the only method of authenticating somewhere, you already have a dangerous single point of failure.
Re:Secretive – macOS native app to store SSH keys in the Sec... by comex on Saturday June 27, 2020 @06:55PM (#23665350)
Not if you have multiple copies of the private key. But yes, there are advantages to having any given key only exist in one place.
Re:Secretive – macOS native app to store SSH keys in the Sec... by NovemberWhiskey on Saturday June 27, 2020 @08:36PM (#23665866)
If you are making multiple copies of a private key in different places, why wouldn't you just keep a different private key in each of those places along with its corresponding public key though?

That way, you can remove trust from just one of them if you (e.g.) have your computer stolen.

Re:Secretive – macOS native app to store SSH keys in the Sec... by GekkePrutser on Saturday June 27, 2020 @06:57PM (#23665356)
Well, not exactly, I use multiple physical keys. Yubikeys and OpenPGP smartcards in my case. I use multiple different types too (the OpenPGP cards are quite cheap too).
Re:Secretive – macOS native app to store SSH keys in the Sec... by jooize on Saturday June 27, 2020 @05:08PM (#23664688)
Is there a convenient way to manage and maintain those keys? Keeping the public key of each device and easily select which ones to place on servers.
Re:Secretive – macOS native app to store SSH keys in the Sec... by GekkePrutser on Saturday June 27, 2020 @06:59PM (#23665379)
Very good question. I've been thinking about a central way to manage keys. There doesn't really seem to be one, and it would be a big point of attack because an attacker might abuse it to add their own key.

Right now what I do is I just log into my servers and copy the list :P I don't have that many anyway.

The openssh people are also advocating certificates now, which means you'll have to set up a PKI, which will take care of revocation and such.

Re:Secretive – macOS native app to store SSH keys in the Sec... by acdha on Saturday June 27, 2020 @05:15PM (#23664741)
In the case of SSH keys, when you export the key fingerprint you can edit the comment. I like the convention of email address & hostname to disambiguate the entries in a centrally-managed authorized keys list – when you get a new device, update the list and push the new version out.
Re:Secretive – macOS native app to store SSH keys in the Sec... by Metus on Saturday June 27, 2020 @04:48PM (#23664574)
You aren't. It is the same with Yubikeys, if you use them. You are supposed to generate a certificate per user and device they are using for authentication, which is not a big deal at least for remote login on servers, as you can set an arbitrary number of valid SSH keys.
Re:Secretive – macOS native app to store SSH keys in the Sec... by corty on Saturday June 27, 2020 @05:08PM (#23664693)
You are supposed, yes, but it is not necessary with Yubikeys. You can still import private keys into your Yubikey. At work we are using this for group access to some appliances that annoyingly limit the number of SSH authorized keys you can teach them.
Re:Secretive – macOS native app to store SSH keys in the Sec... by namibj on Sunday June 28, 2020 @02:02AM (#23667014)
Also, there are arguments against generating RSA keys with closed-source software (don't tell me that's all pure hardware in a smartcard). For one, generating keys that are vulnerable to something exotic is very much a viable threat, and yubikeys in particular had an issue where some accidentally created very weak keys.

Sure, you need to make sure the key doesn't leak on it's way, but that's not really the issue.

Re:Secretive – macOS native app to store SSH keys in the Sec... by Xylakant on Sunday June 28, 2020 @06:52AM (#23667955)
> and yubikeys in particular had an issue where some accidentally created very weak keys.

So did Debian between 2006 and 2008 https://certlogik.com/debian-weak-key-check/

Re:Secretive – macOS native app to store SSH keys in the Sec... by namibj on Wednesday July 01, 2020 @02:35PM (#23704834)
In OpenSSL. Not in GnuPG. I'm not claiming the latter necessarily has better code, but the former's bad code quality is known.
Re:Secretive – macOS native app to store SSH keys in the Sec... by corty on Sunday June 28, 2020 @03:56PM (#23671568)
Yes, but software is easier to fix and the problem is easier and more probable to find.
Re:Secretive – macOS native app to store SSH keys in the Sec... by namibj on Wednesday July 01, 2020 @02:36PM (#23704844)
More importantly: you can check the key generator to not include a Dual_EC_DRBG.
Re:Secretive – macOS native app to store SSH keys in the Sec... by drewbug on Saturday June 27, 2020 @04:49PM (#23664584)
Keep a separate spare set of keys