Live data from Hacker News

The Backbone of Cybersecurity: Hardware Security Modules

join.tech

31–38 of 38 posts

Re: The Backbone of Cybersecurity: Hardware Security Modules

#31
post #26

If anyone wants their own HSM, Nitrokey and Yubikey sell them: * https://shop.nitrokey.com/shop/nkhs2-nitrokey-hsm-2-7 * https://www.yubico.com/product/yubihsm-2-series/yubihsm-2/ Consider buying two to have backups ((encrypted) export/import-backup/restore is supported). Creating your own CA: * https://docs.nitrokey.com/hsm/mac/certificate-authority Considering using 'helper software' for running a CA: * https://git…

* https://www.nordicsemi.com/Products/Development-hardware/nRF... Only 10 bucks and can run OpenSK/Tock, FIDO2 code, among other things. This way you save money and learn something.

This is interesting.

Newb question, how do use opensk/tock as an hsm? A quick search points back at this thread.

Re: The Backbone of Cybersecurity: Hardware Security Modules

#32
post #6

if anyone wants an open source HSM on the cheap based on a raspberry pi that is pkcs11 compatible, check out the picohsm project https://www.picokeys.com/pico-hsm/

This definitely seems useful, but it's arguably not an HSM. It's literally downloadable software! (You wouldn't download an HSM.)

HSMs of course also run software, but they usually provide at least some level of hardening against physical attacks. In other words, it shouldn't be possible to just extract key from them. Is that the case here?

I think it would be more honest to call this a (possibly hardened) key server/service. Often, that's all people want from an HSM! But sometimes it isn't (whether for compliance or other reasons).

Re: The Backbone of Cybersecurity: Hardware Security Modules

#33
post #7

I see many people here recommending products without the caveats included in the article such as tamper-resistant features. It is a warning for 1-Click [1] users. [1] https://en.wikipedia.org/wiki/1-Click

I don't think I get the 1-Click reference here – could you please elaborate?

Re: The Backbone of Cybersecurity: Hardware Security Modules

#34
post #7

I see many people here recommending products without the caveats included in the article such as tamper-resistant features. It is a warning for 1-Click [1] users. [1] https://en.wikipedia.org/wiki/1-Click

Yeah, there is one flaw that I recently noted: how does the HSM authenticate legitimate users? Like "I am an app, dear HSM, please perform following crypto operation for me." If an attacker can pretend to be a legitimate HSM user, then she does not need key access, she just asks the HSM to perform a crypto operation on her behalf. On the other hand, if the HSM needs secrets in order to authenticate legitimate users,…

You're absolutely right: If a HSM is just used as a signing/decryption oracle, it doesn't add much value.

They're most useful if they can perform high-level operations, such as "please validate whether the entered card PIN here matches , given ". The output of that example operation would only be a single bit of information (yes or no), rather than e.g. leaking the entire correct PIN, or even just the decrypted PIN that was entered at the POS.

But even just a signing/decryption oracle can be a step up from just storing long-lived private and secret keys on your application servers, where you'll never know for sure whether they were exfiltrated at some point.

Re: The Backbone of Cybersecurity: Hardware Security Modules

#35

Earlier quoted context omitted.

Yeah, there is one flaw that I recently noted: how does the HSM authenticate legitimate users? Like "I am an app, dear HSM, please perform following crypto operation for me." If an attacker can pretend to be a legitimate HSM user, then she does not need key access, she just asks the HSM to perform a crypto operation on her behalf. On the other hand, if the HSM needs secrets in order to authenticate legitimate users,…

It's a whole "chain of trust" kind of problem just like X.509.

Not really, since that would just be kicking the can down the road. Yes, you can have authentication between application servers and HSMs, but ultimately, whatever credential is used for that can be stolen from the application server, and then whoever has it can talk to the HSM.

The real benefit of HSMs is that they can make low-level keys accessible via a high-level interface that restricts the type of operations that can be performed at all. For example, an HSM will never just hand raw keys to application servers, but rather only let them perform various operations (based on their permissions). The higher level and specific these permissions are, the better.

Re: The Backbone of Cybersecurity: Hardware Security Modules

#36
post #10

Two small notes on definitions: --- "Secure Elements / Hardware Roots of Trust: Embedded within chips, these elements provide a secure base for trusted operations and are often used in mobile devices and IoT applications." SEs (Secure Elements) are discrete components. Smartcards and SIM cards are examples of SEs. They are different from a root of trust. When talked about in a cryptographic context a 'hardware root o…

> Not necessarily within a CPU.

Arguably especially not within a CPU. When I hear "isolated execution environments in a CPU", I think TEE (e.g. ARM TrustZone), not Secure Enclaves.

Re: The Backbone of Cybersecurity: Hardware Security Modules

#37
post #28

security starts at the shipping port Just seeing a flood of comments of everyones cheap $10 dollar devices got me thinking… How do you actually check the integrity of the HSM, both at the software level and hardware level? The companies hosted open source repo is only worth a shit if you can verify the integrity of the software on the device. Do any vendors ship with verifiable Hardware Bill of Materials and Software…

There's no way around trusting your hardware vendor (and often the software they ship it with as well; at least the OS is usually closed source and not user-installable, at least in the case of smart cards, which are arguably just HSMs in a different form factor).

Traditionally, the industry has been addressing this via audits and commercial agreements.

Re: The Backbone of Cybersecurity: Hardware Security Modules

#38
post #26

Earlier quoted context omitted.

* https://www.nordicsemi.com/Products/Development-hardware/nRF... Only 10 bucks and can run OpenSK/Tock, FIDO2 code, among other things. This way you save money and learn something.

This is interesting. Newb question, how do use opensk/tock as an hsm? A quick search points back at this thread.

If you have to ask that question it's probably better to start here: https://www.picokeys.com/pico-hsm/
Post reply on HN