37 votes

What are the differences between TPM and HSM?

Sorry, but I think there are some gaps in this conversation: TPMs can't be added later : False. Many modern motherboards include a header to which a TPM can be added after the fact. Visit Amazon ...
Paul Vilevac's user avatar
19 votes

Designing my own HSM using an Arduino

First, Apple's Secure Enclave is a module which ensures that the boot loader only runs code signed by Apple. That's not what you're doing, you are trying to build a Hardware Security Module (HSM). ...
Mike Ounsworth's user avatar
11 votes
Accepted

What are the differences between HSM and SE?

A hardware security module (HSM), a secure element (SE), a smart card, a trusted execution environment (TEE) and a secure enclave (SE again) are all computing environments designed for secure ...
Gilles 'SO- stop being evil''s user avatar
10 votes
Accepted

Securing hashes of short enumerated values

The salt must be common for all the records. This is known as a "pepper", not a salt. the attacker could easily iterate all the possible values If the search space is small enough that it could ...
AndrolGenhald's user avatar
9 votes

Why is YubiHSM an HSM?

Size and performance don't matter, as a hardware security module (HSM) is defined by its functions to perform cryptographic operations and protection. From Peter Smirnoff on Cryptomathic: ...
Esa Jokinen's user avatar
  • 18.9k
8 votes
Accepted

What's the difference between the same model with and without FIPS 140 certification?

[Disclaimer: I'm a developer on a FIPS 140-2 Level 2 software module, and I'm a little disgruntled about the whole process] The main difference I've seen is that things that are FIPS 140-2 certified ...
Mike Ounsworth's user avatar
8 votes

TLS private key storage for embedded systems. Are there any best practices?

I was hoping there were best practices available from some reputable source. Lacking that, I am posting this as a suggestion, and welcome any input on it. Methods for secure key storage in embedded ...
Timmy Brolin's user avatar
6 votes

How is HSM access gated?

This can be accomplished in many ways. The most simple access control to a HSM is a physical button. So if a malware compromises the host computer, somebody still needs to be physically present to ...
sebastian nielsen's user avatar
6 votes

Does / Can a HSM or TPM encrypt my private keys

Let's do a thought-experiment. Imagine a device whose purpose in life is to hold a private key. There are a couple of things it will do for you; you can ask it: Please wipe your own memory and ...
Mike Ounsworth's user avatar
5 votes

What are the differences between TPM and HSM?

TPMs are very exactly specified parts wrt to function and security level they provide (https://www.trustedcomputinggroup.org). It has fixed function, is a rather low cost and yet high security chip (...
Scott McCoy's user avatar
5 votes
Accepted

Why is an HSM required to protect CA certificates (rather than a regular USB token)?

Hardware Security Modules's (HSM's) are used in systems where a company has determined that the risk involved requires a higher level of control that a personal key. The Use of HSM's for Certificate ...
Shane Andrie's user avatar
  • 3,840
4 votes

Nginx and HSM integration to hold private keys

I've never done this before. But here are some suggestive pointers. These points are NOT concrete steps to get it working. From the documentation for the new AWS CloudHSM (not classic) offering: ...
eternaltyro's user avatar
4 votes
Accepted

RAID on HSM network

Yeah, don't. That is to say, don't assume you will be storing 1m+ keys on an HSM, regardless of who made it. HSMs are not hard drives. Don't use them like one. Some HSMs support external keys. ...
rip...'s user avatar
  • 281
4 votes

RSA insensitive and extractable private key export from SoftHSM 2

First of all, the template you are using in EJBCA is kind of strange. I assume that this template is used to generate a key pair for a Certificate Authority. attributes(*, CKO_PUBLIC_KEY, *) = { ...
Jean-Julien Alvado's user avatar
4 votes
Accepted

Reason for lack of asymmetric cryptography in AWS KMS for regions in China

Asymmetric encryption was only introduced to AWS KMS in 2019. Prior to that, only symmetric encryption was available regardless of which region you were using. Even when AWS made the official ...
keithRozario's user avatar
  • 3,711
4 votes
Accepted

Open-Source Hardware Security Modules (HSM)

There are several open-source HSMs on the market. Nitrokey Nitrokey (formerly known as CryptoStick) sells the open-source NetHSM https://www.nitrokey.com/products/nethsm The CryptoStick has been ...
Michael Altfield's user avatar
4 votes
Accepted

Examples of custom key restriction policies for HSMs

There are a couple of enterprise GP HSMs that provide for the capability of running use-case specific, custom firmware inside the hardware of the HSM. For my street cred: I'm the principal member of ...
rip...'s user avatar
  • 281
3 votes

Offloading hashing and symmetric encryption to HSM

I have not seen a "encrypt random session key with RSA and use it to AES" operation in PKCS#11, so this expected protection does not exist. Or am I missing something? No, there is no such operation ...
mat's user avatar
  • 1,272
3 votes

What is the limit of the number of keys an HSM supports?

I talked to our HSM expert in house. His answer was: Errhmm, that's not what HSMs are designed for. The use-case that engineers had in mind when designing them is like a root certificate authority ...
Mike Ounsworth's user avatar
3 votes
Accepted

What is sent between an HSM and an application?

Signing a CRL is like signing any other data and involves several steps: Read the data you want to sign. Compute a hash from the data you want to sign. This hash has the same length no matter initial ...
WhiteWinterWolf's user avatar
3 votes
Accepted

Useless 2FA in case of inside attacker

Auditing and alerting is the general approach to insider threats. If you make sure that activity on sensitive systems is heavily logged and monitored, you dramatically increase the difficulty of ...
HopelessN00b's user avatar
  • 3,407
3 votes
Accepted

Are there any limits to what a HSM will sign?

A HSM does not provide much more than protecting the private key. This is already a strong protection since it means that the private key cannot be simply and unnoticed stolen (and thus misused): If ...
Steffen Ullrich's user avatar
3 votes

Why is an HSM required to protect CA certificates (rather than a regular USB token)?

[This is speculation based on vendor website -- I have no direct experience with these devices] My speculation is that a specialized HSM version of the device is not required, but since it is ...
Mike Ounsworth's user avatar
3 votes
Accepted

How to configure more than one same Hardware Security Module (HSM)

I don't know the HSM Let's Encrypt is using. But all major vendors have different mechanisms for doing backup and recovery to an encrypted medium. One vendor-specific example: If you setup nCipher/...
Michael Ströder's user avatar
3 votes
Accepted

Exposing HSM to a WAN via VPN

A VPN over the internet is secure if it's set up properly, plus any connections to the HSM should be encrypted as well. The big concern I would have is that you are letting an external organization ...
GdD's user avatar
  • 17.4k
3 votes

Conceptual question regarding signing with Yubikey/Solokey/Nitrokey using GnuPG

GnuPG signatures will sign a digest of a file, not the file itself. When you attempt to sign a large file, GnuPG will create that file's digest (generally by using a hash) and then sign only that. We ...
Kaz Wolfe's user avatar
  • 382
3 votes
Accepted

Is it (under FIPS) possible to generate a CSR for an asymmetric key with usage=WRAP?

A certificate request is signed so that the CA knows you have the private key corresponding to the public key you wish certified. The traditional way of doing this in PKCS#10 is to sign your request ...
garethTheRed's user avatar
  • 1,594
3 votes

How do RSA smartcards prevent key exfiltration?

No common modern ciphers or MAC constructions - certainly none of the ones that a smartcard or other HSM will even support - are known to be vulnerable to any cryptanalysis where chosen-plaintext or ...
CBHacking's user avatar
  • 48.4k
2 votes

Useless 2FA in case of inside attacker

Perhaps you are overthinking this. When you say: Now imagine a malicious inside attacker changes the application code... You are then trying to guess what the application code will be changed to,...
TTT's user avatar
  • 9,212
2 votes

Public Key Encryption vs HSM for storing encryption keys

There are two different, but related problems here. One is the security of the key; the other is the security of the data decrypted by the key. An HSM and "a separate server" are essentially the ...
John Deters's user avatar
  • 34.2k

Only top scored, non community-wiki answers of a minimum length are eligible