Live data from Hacker News

Native Secure Enclave backed SSH keys on macOS

gist.github.com

191–200 of 204 posts

Re: Native Secure Enclave backed SSH keys on macOS

#191
post #177

Earlier quoted context omitted.

Which is why you don't have to export it.

If the key is marked as exportable the malware will happily export it for you. The only way to defend against that is to make the key non-exportable to begin with.

Yes, that's what I meant.

Re: Native Secure Enclave backed SSH keys on macOS

#192
post #189

Earlier quoted context omitted.

> The best you can do is use the SE to decrypt the key and then use the clear text key for encryption/decryption. AFAIK this is what "secretive" was doing all the time.

I'm pretty sure it creates SE resident keys, which can't be unwrapped by either userspace or the macOS kernel.

Then I'm wrong.

Re: Native Secure Enclave backed SSH keys on macOS

#193

Earlier quoted context omitted.

I don't trust the NIST curves: they were generated in a dubious way which has been written about extensively elsewhere (the coefficients for P-256 were generated by hashing the unexplained seed c49d360886e704936a6678e1139d26b7819f7e90). I always avoid them unless I have to use them. It makes me sad when hardware forces me to use them. > I've heard people make the point before that EdDSA is not great for secure enclav…

https://romailler.ch/project/eddsa-fault/ I think this can be solved by using hedged eddsa (Signal does this)

[deleted]

Re: Native Secure Enclave backed SSH keys on macOS

#194
post #13

If I understand correctly, this means you can't back up the private key, correct? It's in the Secure Enclave, so if you lose your laptop, you also lose the key? Since it looks like export only really exports the public key not the private one? Probably not the worst thing, you most likely have another way to get into the remote machine, or an admin who can reset you, but still feels like a hole. Or am I missing somet…

I had being using krypton, with the private key being on my iPhone, and am now using secretive. Never had much of an issue with not having access to my private key. We made rolling out public keys to the servers very easy by using the gitlab key file. So when I get a new Macbook I'd just need to create a new key and upload it to gitlab. We have multiple devops that can run the playbook to roll it out to the servers. And if they have a new Macbook I roll it out for them. And we don't have that many Macbook upgrades anyway.

Re: Native Secure Enclave backed SSH keys on macOS

#195

How can I get such a key into my iPhone too, so that I can sign emails and file and such with the same private key when I'm on my phone, and my public key is valid for all such operations ? Will iCloud take care of that ? And then I want it all usable from my (multiple) email clients...

Clearly I'm hazy on this stuff. But if I can export the private key from my Mac, is there any use for it on my iPhone, and any way to get it in there ?

I guess it would depend on having an SSH app with the right feature ? (import private key, transfered in encrypted form)

Re: Native Secure Enclave backed SSH keys on macOS

#196

Earlier quoted context omitted.

No. There is no way to import an existing key into the Secure Enclave. Only Apple is allowed to do that. The best you can do is use the SE to decrypt the key and then use the clear text key for encryption/decryption. This also means that passkeys on macOS/iOS are (at some point) exposed as clear text.

> The best you can do is use the SE to decrypt the key and then use the clear text key for encryption/decryption. AFAIK this is what "secretive" was doing all the time.

I certainly remember that they had support for the resident keys, with all the limitations.

Re: Native Secure Enclave backed SSH keys on macOS

#197

I would not trust it personally, specially since the Chip Security Act is looming https://www.centerforcybersecuritypolicy.org/insights-and-re...

-2 after France admitted Apple and Google devices are backdoored

classic hackernewers

Re: Native Secure Enclave backed SSH keys on macOS

#198
post #170

Earlier quoted context omitted.

> How can the "cartel" "blacklist" anyone? All they have to do is publish a "best practices" statement or some RP certification program mandating attestation to be used (and some PR around how only "certified" RPs are secure) and job done. The only reason they didn't do that yet is that Apple is refusing to play ball and support attestation (but this may change). The threat was clearly there in the original Github is…

> Having to dump authenticator state at regular intervals [...] Again, you don't inherently have to do this if you only use non-resident keys (which many sites allow; my hardware authenticator does not even support resident keys). Synchronized resident keys are not the only possible WebAuthN implementation, even though they are getting currently heavily pushed by big stakeholders. The big advantage they come with, th…

AFAIK you do , because the hardware key must keep internal state which is also tracked by the server (a monotonically increasing nonce). Offering u2f without this afaik is not compliant and the only way to achieve that would be a central server which keeps state somehow. It’s really fundamentally unsolvable .

Re: Native Secure Enclave backed SSH keys on macOS

#199
This seems really cool. I use Secretive and would like to switch to this native solution. The one thing holding me back is that I like that Secretive allows you to create keys that don't require TouchID, yet still notifies you when they are used.

I use an external keyboard, so reaching for the fingerprint reader isn't as easy as it would be if I just used the internal keyboard. Fine, ControlMaster is a good compromise. Except when git signing (every commit) is a requirement, you have to touch the reader every, single, time. That's fine when making routine commits, not so when rebasing. Ideally, I could tell the SecureEnclave to notify me, but don't require biometrics for the next 30 seconds or so, but since that's not a thing, that I'm aware of, I'd at least like to know when my git signing key is being used.

Post reply on HN