Live data from Hacker News

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

devever.net

31–40 of 139 posts

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

#31
I'd like to address the difference between a SmartCard and an HSM as I feel like the author doesn't acknowledge some of the practical differences. While at the core they are both "hardware security", i.e. a physical chip that implements security, an "HSM" as I have commonly seen the term used is a completely different thing in most other ways.

An HSM is typically a 1-2U server, that is designed to provide high throughput of cryptographic operations. It is ultimately a collection of a few high performance servers networked together, with some custom ICs - not just a small chip. As a result, you pay up to tens of thousands of dollars for one, because it's a piece of critical infrastructure that is made to high tolerances. It's akin to buying hardware load balancers or firewalls appliances.

In addition to this, the validation process of an HSM is long. An HSM company will likely have teams of hardware engineers, software engineers, and specialised cryptography teams. There are audits for things like FIPS compliance, as well as extensive pentesting by external companies. All of this is expensive, to create a device that will never be mass market.

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

#32
post #30
post #7

The issue of affordable HSM/TPM for general purpose use is something my research group is trying to solve. We have most of the theory down, but the implementation is a work in progress. The key point is trying to maintain full physical isolation from the CPU and OS, while also providing general low-level computing capabilities. Do you guys think something like this could be patented and/or commercialized?

I think Intel has done something similar to what you are looking for: http://www.intel.com/content/www/us/en/architecture-and-tech...

No, that's different. The crypto is done in hardware, yes, but keys and plaintext are still seen in software, and software is inherently untrusted. Our aim is to support use cases where you do not want software to handle anything.

I think Intel's SGX is a better solution for hardware-supported software isolation, but it still isn't widespread and has a number of weaknesses.

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

#33
post #7

The issue of affordable HSM/TPM for general purpose use is something my research group is trying to solve. We have most of the theory down, but the implementation is a work in progress. The key point is trying to maintain full physical isolation from the CPU and OS, while also providing general low-level computing capabilities. Do you guys think something like this could be patented and/or commercialized?

Since you're doing research in this area, have you taken a look at something like https://www.dyadicsec.com/ at all? I looked at the whitepaper a while ago, and it seemed to make sense, though I was way out of my depth.

No, I have not actually. I will definitely check the whitepaper out. Thanks!

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

#34
HSMs are shit.

In a previous role we used a major vendor's HSM to protect our private keys. VERY expensive kit, more expensive than the load balancers and servers combined.

We needed to use Elliptic Curve keys for a particular customer - so it got even more expensive as we had to buy:

1. A license from the LB vendor to use the HSM

2. A licence from the HSM vendor to use EC with the LB.

... even though they trumpeted these announcements of how radically great they were together we found:

1. The integration didn't work, full stop.

2. The version of OpenSSL we had to use (supplied) was about 18 months out of date

3. The specially b0rked version of OpenSSL supplied didn't support EC via a HSM

Even better - when Heartbleed came out I had a patch from RedHat on day 1. The load balancer?

Nope - nothing on their website - I had to create a ticket which said 'we are aware of the issue', at which point the ticket was closed. I questioned this and was told they couldn't keep it open, I had to create a new ticket every few weeks to find out whether they'd actually deigned to assign a bug id to the issue.

The HSM vendor just said nothing, zero, until a new version of the firmware was silently released 4 months later.

The whole industry is shit. I'd rather have a farm of Yubikeys than one of those HSMs.

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

#35

I'd like to address the difference between a SmartCard and an HSM as I feel like the author doesn't acknowledge some of the practical differences. While at the core they are both "hardware security", i.e. a physical chip that implements security, an "HSM" as I have commonly seen the term used is a completely different thing in most other ways. An HSM is typically a 1-2U server, that is designed to provide high throug…

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 advanced authentication capabilities, such as M-of-N access control and/or hardware authenticators (e.g. you need 3 of 5 smart cards to use the HSM). 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.

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

#36
post #21
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…

I even have a ring that runs JavaCard software on its JVM, they are sold for cheap, and I bought one just for fun and history, there is an eBay listing here: http://www.ebay.co.uk/itm/JAVA-RING-RARE-Sun-Microsystems-JA...

I think I still have one somewhere from that JavaOne.

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

#39

HSMs are shit. In a previous role we used a major vendor's HSM to protect our private keys. VERY expensive kit, more expensive than the load balancers and servers combined. We needed to use Elliptic Curve keys for a particular customer - so it got even more expensive as we had to buy: 1. A license from the LB vendor to use the HSM 2. A licence from the HSM vendor to use EC with the LB. ... even though they trumpeted…

Want to (please) name the vendor?

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

#40

HSMs are shit. In a previous role we used a major vendor's HSM to protect our private keys. VERY expensive kit, more expensive than the load balancers and servers combined. We needed to use Elliptic Curve keys for a particular customer - so it got even more expensive as we had to buy: 1. A license from the LB vendor to use the HSM 2. A licence from the HSM vendor to use EC with the LB. ... even though they trumpeted…

Why do you have your HSM where Heartbleed matters?
Post reply on HN