Live data from Hacker News

Why I don't like smartcards, HSMs, YubiKeys, etc.

devever.net

101–110 of 139 posts

Re: Why I don't like smartcards, HSMs, YubiKeys, etc.

#101
post #44
post #6

The author brings up many reasonable points but seems to mix issues of HSMs & Smart Cards not providing a generic open hardware platform with possible security problems of a platform. There is no question that there would be value in having a hardware platform that has certain security features, but that alone doesn't meet the requirements of most users of HSMs and Smart cards. The primary use cases I've seen are all…

"A hardware platform only solves half the problem that most purchasers of HSMs and smart cards are asking vendors to solve." A hardware platform alone solves less than half the problem for many HSM buyers, myself included. There's also software, then there's support. HSMs, at least the kind we use, are niche products because relatively few people have reasons to operate them (they're not cheap either). There aren't a…

These are valid concerns, but they're not good reasons not to provide general-purpose compute HSMs. If you want an external company to have certified the software, the policy which goes on a general-purpose HSM, that may be entirely sensible from a business perspective; I'm sure if general-purpose HSMs were a thing, with standard HSM platforms, such certified programs would be available on the market. Many would probably be made by the manufacturers of the HSMs themselves, providing a vertically integrated solution, support-wise.

Fulfilling this market, with the need for the outsourcing of liability, etc. is not mutually exclusive with providing general-purpose HSMs.

Re: Why I don't like smartcards, HSMs, YubiKeys, etc.

#102
post #8

The author is not thinking about why these things are built and marketed as they are. The use case for the smart card is different than a HSM with FIPS 140-2 level 3 or 4 validation. The whole point is to operate in a tested, known valid state while resisting tampering. The higher level devices are filled with epoxy and have other anti-tampering features. A smartcard is most often a form of MFA. It can be used as an…

Yes, I know. I want those anti-tamper features, and I want to be able to take advantage of them to secure cryptographic policies designed and coded by myself or other people in the open source community. And of course I would be free to audit that code before making use of it.

And if you don't think a secure tamperproof general-purpose Turing-complete execution environment in a compact form factor with contactless induction-powered interface isn't an interesting opportunity for innovation, I really don't know what to say.

Re: Why I don't like smartcards, HSMs, YubiKeys, etc.

#103
post #16

Odd -- JavaCard smartcards are available for under $5, have crypto co-processors, and certainly support general-purpose code. See for example my project for KeePass, http://code.lardcave.net/2016/08/06/1/ . After programming, you can choose to lock down the card (which means you can only erase the card, not modify it). I'm using NXP chips and although I haven't investigated completely I would be highly surprised if i…

What I don't get is why they're all virtual machine based, though I think someone posted a brief explanation for that in response to me last time this came up. Moreover it doesn't help that I am violently allergic to Java. But when it comes down to it, the smartcard industry giving people JavaCard is the same as not giving them actual, full access to the chip. It's probably the best thing going with regard to my article, but there's still something amiss there.

Re: Why I don't like smartcards, HSMs, YubiKeys, etc.

#104
post #79

Earlier quoted context omitted.

Is there any way to do what a HSM does, in software? (Maybe with OS support)

If your definition of an HSM is just "hides my key material from my application server", then sure. This is basically the idea behind HashiCorp's Vault. However, you'd still be vulnerable to someone gaining root access on your Vault server. A true HSM uses physically secure memory and a dedicated cryptoprocessor to make it impossible for the secret to ever be leaked, even if the host OS is compromised. This isn't rea…

take a look at my post from earlier: https://news.ycombinator.com/item?id=13031870 . I'd be interested to hear your (and others') thoughts.

Re: Why I don't like smartcards, HSMs, YubiKeys, etc.

#105
post #16

Odd -- JavaCard smartcards are available for under $5, have crypto co-processors, and certainly support general-purpose code. See for example my project for KeePass, http://code.lardcave.net/2016/08/06/1/ . After programming, you can choose to lock down the card (which means you can only erase the card, not modify it). I'm using NXP chips and although I haven't investigated completely I would be highly surprised if i…

What I don't get is why they're all virtual machine based, though I think someone posted a brief explanation for that in response to me last time this came up. Moreover it doesn't help that I am violently allergic to Java. But when it comes down to it, the smartcard industry giving people JavaCard is the same as not giving them actual, full access to the chip. It's probably the best thing going with regard to my arti…

Why are you violently allergic to Java?

Re: Why I don't like smartcards, HSMs, YubiKeys, etc.

#107

What about the FST-01? It's what I use and it works pretty well in my experience. http://wiki.seeedstudio.com/wiki/FST-01

FST-01 is an STM32F1-based board, which according to [1] can be dumped fairly cheaply.

[1] - https://news.ycombinator.com/item?id=13031484

Re: Why I don't like smartcards, HSMs, YubiKeys, etc.

#108
post #16

Odd -- JavaCard smartcards are available for under $5, have crypto co-processors, and certainly support general-purpose code. See for example my project for KeePass, http://code.lardcave.net/2016/08/06/1/ . After programming, you can choose to lock down the card (which means you can only erase the card, not modify it). I'm using NXP chips and although I haven't investigated completely I would be highly surprised if i…

Can I get something that would allow me to unlock an SSH key by tapping a card to my phone?

https://grepular.com/An_NFC_PGP_SmartCard_For_Android

I believe you would still have to write most of the software involved yourself. A discussion of smart card login with SSH as of five years ago:

https://grepular.com/Smart_Cards_and_SSH_Authentication

And a useful discussion on SSH and 2FA last year here on HN: https://news.ycombinator.com/item?id=10885654

Re: Why I don't like smartcards, HSMs, YubiKeys, etc.

#109
post #97

So FWIW, I asked about how Redhat signs their packages some time ago (about 6-7 years ago!) and was introduced to Fedora's "Signing Server" service, which is entirely open source. The email in full is: Hi Jeff, good to hear from you. There's really two parts to our signing server; the first is the separation of signing to a separate machine with the associated client/server and ACL controls, and the second is the int…

A blog post by Mozilla on the topic of package signing with an HSM:

https://blog.mozilla.org/security/2013/02/13/using-cryptosti...

Re: Why I don't like smartcards, HSMs, YubiKeys, etc.

#110
post #50
post #35

Earlier quoted context omitted.

Both Smart Cards and HSMs can (and frequently do) contain FIPS validated cryptographic modules and can be USB devices. What seems to set them apart is content capacity and speed. A "HSM" can usually store dozens, hundreds, or even tens of thousands of keys and can do numerous cryptographic operations per second. Most "smart cards" can only store a few keys and frequently 1-2 operations per second. Many HSMs also add…

> The other key feature usually found in HSMs but not smart cards is backup/cloning without exporting the key (in PKCS#11 terms). This means that the key can be moved between HSMs with all the protections in place. I've yet to see a smart card that does this. How does this work? Can an attacker buy an identical HSM, back up the key, and restore it onto the new HSM?

It sounds like that's exactly how it works (two months ago):

https://news.ycombinator.com/item?id=12069784

The NitroKey HSM requires all previous setup (DKEK?) passwords and PINs. Anecdotal random unnamed vendor? Not so much:

They did, with undocumented commands, export the key from the device in an unencrypted format and loaded it into the other model

Post reply on HN