Hot answers tagged

36

Trusted Platform Modules A Trusted Platform Module (TPM) is a hardware chip on the computer’s motherboard that stores cryptographic keys used for encryption. Many laptop computers include a TPM, but if the system doesn’t include it, it is not feasible to add one. Once enabled, the Trusted Platform Module provides full disk encryption ...


28

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 and look at the TPM modules cards for MSI, Asus, and other motherboards HSMs are typically removed or network attached : False. HSMs can be embedded in a range ...


19

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). As you figured out, the proper way to do this is to have the HSM do all the crypto operations internally so that no keys ever leave the device - as you point out,...


15

In many HSM, there is very little capacity for safe storage (say, a few kilobytes). Therefore, what the HSM really stores in its entrails is some master key K (symmetric). The key pairs that applications use are stored externally, but encrypted with K; they get decrypted and used only within the HSM. In such a setup, keys are both "logically" inside the HSM, ...


10

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 be brute-forced even with a high cost hash like bcrypt, then you're relying entirely on the secrecy of the "pepper" to prevent brute-forcing. In this case, you ...


10

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 execution. They generally have some properties in common: They are isolated environment with a degree of tamper resistance. They're designed to make it hard to extract ...


10

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: Understanding Hardware Security Modules (HSMs): The hardware security module (HSM) is a special “trusted” network computer performing a variety of cryptographic operations:...


7

The point of a key server or HSM is to isolate the application from the storage (and potentially usage) of the key. Ideally, you would want to offload and rate limit all cryptography operations to the HSM or Key Server so that the application never has access to the decryption key. This allows you to do intrusion detections such as rate limits and such ...


7

You've asked several questions here, so I'm going to provide several answers, and a couple of clarifications. I will be storing the AES key (DEK) in a HSM-based key management service (ie. Azure Key Vault / AWS KMS) and will retrieve the key to encrypt/decrypt data on my Nodejs server. This is not generally what you want to do. If you're using an HSM,...


7

[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 are at least 6 months out of date when you get them, and cannot be patched in the case of a vulnerability. Getting something FIPS / CC certified costs $$$, ...


7

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 devices depends on the threat scenario. Threat scenario 1: Both remote and physical attacks. Threat scenario 2: Only remote attacks. ------------ The best ...


6

The following is a possible series of steps you could take. I'm considering that you have a secondary, online HSM for the period during which the affected HSM is removed from service for repair. Destroy all key material on the HSM Notify vendor of device problem and serial number Return device in tamper evident packaging to vendor address using secure ...


6

Creating a certificate is NOT signing the CSR, or even the CSR body. You need to create a cert body containing data that is partly the same as the CSR and partly different, and sign that. First, do you have a CA cert (root or otherwise) matching the key in your HSM? If not, any cert(s) you do manage to create with that key won't be useful because software ...


6

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 push the button for the HSM to do anything. Then you have a whole range of different access protection, ranging from verifying the software in the host server "...


5

Your question seems peculiarly obscure to me, so I'll write here some explanation about the meaning of the terms you employ, under the hope that it will reduce confusion and lead to either an answer or at least a clearer question. PKCS#11 is an Application Programming Interface: it is a set of functions, that applications use, and that are provided by a ...


5

Some HSM are configurable enough to allow adding functionality within the HSM. However, this will not be doable through PKCS#11, which is an API meant for invocation of cryptographic algorithm on externally provided data. What PKCS#11 offers and is closest to your problem is C_UnwrapKey() that can take as input an encrypted key (key is encrypted with another ...


5

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 generate a new private key. Please give me the public key associated with your stored private key. Please use your stored key to sign or encrypt this data. Please use ...


4

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: Setup CloudHSM and generate private key using the CLI utility. Install and configure the CloudHSM OpenSSL library. Check if engine works openssl engine -t cloudhsm ...


4

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. These are keys which are encrypted/wrapped using a specific AES-256 (for example) key, derived from some other key. This 'master' key derivation key remains in ...


4

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 Authorities HSM's are common for CA applications, typically when a company is running there own internal CA and they need to protect the root CA Private Key, ...


4

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 announcement for asymmetric keys on KMS, many regions did not get the functionality on day 1. Also, the two regions in China are somewhat special, in that they're ...


3

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 (less than $2.00). The purpose is to serve as a ‚root of trust‘ on a platform. Also they are tested and certified to withstand a defined level of side-channel/...


3

In short, no, because the LMK is a single key. The Hardware Security Module (HSM) has it's own master key called the LMK, and this is generally not dealt with in the clear. Any keys you generate will be done so using that LMK. The functions you mentioned are used to encrypt and decrypt to/from ciphertext from/to plaintext, both procedures of which use the ...


3

In most cases, you would install the driver/engine software in your servers and would do PKCS#11 over TLS. Be aware that some vendors' offering may not be a true HSM; specifically it may be the software and management around an HSM delivered as a virtual appliance. These are not meant to provide the same level of resilience to attack as a true HSM. The key-...


3

@thomas-pornin and @PwdRsch have explained what an HSM can do, but you've clarified that you want to know what they're used for in payment processing. The short version is - they are used to strengthen the encryption protections that processors use. Let's assume you mean credit card processors. The PCI HSM Security Requirements suggests a number of places ...


3

If the encryption/decryption of the data is taking place on the HSM, the KEK will decrypt the DEK for performing encryption/decryption operations. All key management, key storage and crypto takes place within the HSM. If the encryption/decryption of the data is taking place in the application, you could interface with the HSM to extract the DEK and do your ...


3

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 subverting those systems. Typically, you'd log and alert on any logons, and maintain an audit log of all actions taken on the system. To protect those logs from ...


3

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 data length and different data will result in different hash. Encrypt the hash with the private key. The result of this operation is the actual signature. ...


3

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 in PKCS#11. If you want to do that, you need to construct it from the basic function calls yourself: Generate a symmetric key (on the HSM to use its entropy ...


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