Live data from Hacker News

Yubico with new 4096-bit keys and gpg-agent for ssh authentication

trmm.net

41–50 of 51 posts

Re: Yubico with new 4096-bit keys and gpg-agent for ssh authentication

#41
post #38

Earlier quoted context omitted.

I dunno about him, but I do something similar on one of my machines. I use an SCM SPR-532 USB reader with pinpad and an OpenPGP v2 smart card. More info and pictures here - https://grepular.com/Smart_Cards_and_SSH_Authentication

Where did you get the PGP card? Did you donate to become a fellow? I've been thinking about it, but it's a bit confusing figuring out what cards are compatible and donating to the foundation is nice but a bit expensive.

You can get them here: http://shop.kernelconcepts.de/

Re: Yubico with new 4096-bit keys and gpg-agent for ssh authentication

#42
Just so it's clear, the previous Yubikey NEO also supports gpg-agent for SSH authentication, not just the new Yubikey 4. I've been using one for months. It presents a standard smarcard CCID interface and runs an OpenPGP applet.

The source to the actual Javacard applet that implements is available on Github: https://github.com/Yubico/ykneo-openpgp

Re: Yubico with new 4096-bit keys and gpg-agent for ssh authentication

#44
post #38

Earlier quoted context omitted.

I dunno about him, but I do something similar on one of my machines. I use an SCM SPR-532 USB reader with pinpad and an OpenPGP v2 smart card. More info and pictures here - https://grepular.com/Smart_Cards_and_SSH_Authentication

Where did you get the PGP card? Did you donate to become a fellow? I've been thinking about it, but it's a bit confusing figuring out what cards are compatible and donating to the foundation is nice but a bit expensive.

I got it from kernelconcepts as tokenizerrr said. They seem to have a newer version of the card now which does 4096, so I might have to buy another. Mine only does 2048

Re: Yubico with new 4096-bit keys and gpg-agent for ssh authentication

#45
post #9

Nitrokey[1] is about the same price as Yubico but has open source firmware & hardware . You might also know them as CryptoStick[2]. [1] https://www.nitrokey.com/ [2] https://blog.mozilla.org/security/2013/02/13/using-cryptosti...

This looks really neat. Anyone also use these? Thoughts? I might get myself one. Edit: Also, does this have gpg-agent / ssh support?

Can confirm what bruo said. I use my Yubikey Neo with gpg-agent with "--enable-ssh-support" enabled for ssh agent support.

Re: Yubico with new 4096-bit keys and gpg-agent for ssh authentication

#46
post #6

Is there any way to store an ssh server key in it, or an https server's key? Basically turning this into a mini-HSM ?

Sure! There are a lot of ways you can do this. One is to use PIV mode, which exposes a PKCS#11 interface that can be used by OpenSSL. Yubico has some nice docs on using a Yubikey as an HSM to store CA keys: https://developers.yubico.com/yubico-piv-tool/Certificate_Au... Note that (at least in the method described in that document), the Yubikey does not _generate_ the private key, it merely stores it securely. You nee…

Actually, in PIV mode it's my understanding that you can have the Yubikey generate the private key if you want it to.

Note that the key is intended to be difficult to extract from the device and there is not intended to be an interface for doing so.

If you are using it with RSA key, you need to decide if you trust that it is generating the key properly. Keep in mind Yubikeys are built on GlobalPlatform/JavaCard which is an extremely high value target. There would definitely be the economic incentive for a well-funded adversary to backdoor the RNG system.

If you are using a Yubikey with EC cryptography, the security analysis gets even more complicated. The curve used need to be a safe one.

And, if the RNG has been tampered with or incorrectly designed, EC signatures can actually leak the private key.

Which is to say that if there is a flaw in the Yubikey, JavaCard, GlobalPlatform, or the specific chips they are using, and you are either (A) having it generate the private RSA keys, or (B) using it with elliptic curves, then there is the potential that the device is not at all secure.

Note that backdooring crypto-specific chips is a thing. TPM and other special-purpose crypto chips have been discovered to have been both backdoored and vulnerable to implementation issues.

Which is completely unacceptable - "you had one job".

Re: Yubico with new 4096-bit keys and gpg-agent for ssh authentication

#47
post #2

I'm surprised that more folks haven't just gone to 8,192-bit keys, out of an abundance of caution.

According to Werner Koch: [0]

"8192 bit keys are horrible insane from all POVs: There is no extra security because the security is based on the weakest link and this is definitely not the length of the RSA modulus, they make encryption really slow and thereby reducing the likeliness of widespread encryption use, they only help spreading FUD about the security of the RSA or other algorithms."

[0]: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=137824#10

Re: Yubico with new 4096-bit keys and gpg-agent for ssh authentication

#48
post #9

Nitrokey[1] is about the same price as Yubico but has open source firmware & hardware . You might also know them as CryptoStick[2]. [1] https://www.nitrokey.com/ [2] https://blog.mozilla.org/security/2013/02/13/using-cryptosti...

My colleague Guillaume Destuynder wrote that blog post. We still use CryptoSticks at Mozilla, with sops[1] to securely store backup keys of some of our secrets files.

[1] https://github.com/mozilla/sops

Re: Yubico with new 4096-bit keys and gpg-agent for ssh authentication

#49
post #6

Is there any way to store an ssh server key in it, or an https server's key? Basically turning this into a mini-HSM ?

Yubico have a product specifically for that use case: https://www.yubico.com/products/yubihsm/

As best I can tell, the YubiHSM is basically only useful with their Yubico Validation Server for their proprietary 2FA solution.

Re: Yubico with new 4096-bit keys and gpg-agent for ssh authentication

#50

Are the github keys they sold cheaply compatible with 4096 bit keys? I'm loathe to buy another, considering i've got 3 already...

I picked up two of the github keys. Never did get them working under OS X. Plug them in and nothing, not recognized by any of their tools, no new keyboard recognized prompt, nothing. Anyone else have trouble with them on OS X?

Does it light up when you try logging in or registering it with Github/Dropbox/Google in Chrome?
Post reply on HN