AWS Builder Center
TPM, HSM, and SHE: Understanding Hardware-Backed Security

TPM, HSM, and SHE: Understanding Hardware-Backed Security

Modern systems increasingly rely on hardware-backed security to protect cryptographic keys, verify platform integrity, and establish trust. This article explores TPM, HSM, and Secure Hardware Extension (SHE), their differences, use cases, and how these concepts connect to AWS technologies such as NitroTPM, AWS KMS, and AWS CloudHSM.

TPM, HSM, and SHE: Understanding Hardware-Backed Security

Modern applications rely heavily on software for authentication, encryption, and access control. But an important question remains:
How do we trust the software itself?
If an operating system or application is compromised, software-based security controls may no longer be enough. This is where hardware-backed security becomes important.
Technologies such as Trusted Platform Module (TPM), Hardware Security Module (HSM), and Secure Hardware Extension (SHE) provide hardware-based mechanisms for establishing trust and protecting cryptographic material.
Although they are related, they solve different security problems.

TPM: Establishing Platform Trust

A Trusted Platform Module (TPM) is a security component that provides hardware-backed cryptographic functions and helps establish the integrity of a computing platform.
One of its important capabilities is measured boot.
During the boot process, components such as firmware and bootloaders can be measured using cryptographic hashes. These measurements are stored in Platform Configuration Registers (PCRs).
Firmware
↓
Measurement
↓
PCR
↓
Bootloader
↓
Measurement
↓
PCR
↓
Operating System
The resulting PCR values provide evidence about the software state of the platform.
This enables remote attestation, where another system can verify whether a machine booted with an expected configuration.
TPMs can also protect secrets using mechanisms such as sealing, where access to a secret can depend on specific platform measurements.

TPM in AWS

AWS brings this concept to Amazon EC2 through NitroTPM.
NitroTPM is a virtual TPM 2.0 device provided by the AWS Nitro System. It supports capabilities such as measured boot, PCRs, cryptographic operations, and attestation.
An EC2 instance can generate a signed NitroTPM Attestation Document containing platform measurements. These measurements can then be verified against expected reference measurements.
This allows a system to consider not only the identity of a workload, but also the state of the platform running that workload.

HSM: Protecting Cryptographic Keys

A Hardware Security Module (HSM) focuses on a different problem: protecting cryptographic keys and performing cryptographic operations inside a protected hardware boundary.
Instead of storing a sensitive private key directly on an application server, an application can request an HSM to perform an operation using the protected key.
Application
|
| Sign / Encrypt / Decrypt
↓
HSM
|
| Protected key
↓
Result
This model is useful for protecting high-value keys such as:
  • Code-signing keys
  • Certificate authority keys
  • Encryption keys
  • TLS private keys
  • Digital-signing keys
The application uses the cryptographic service without needing direct access to the protected key material.

HSM in AWS

AWS provides hardware-backed cryptographic protection through services such as AWS Key Management Service (AWS KMS) and AWS CloudHSM.
AWS KMS is a managed key-management service. The cryptographic material for KMS keys is protected using FIPS 140-3 Security Level 3 validated HSMs, and KMS keys are used through AWS KMS APIs rather than direct access to the underlying HSMs.
AWS CloudHSM provides HSMs in the AWS Cloud where customers have greater control over the HSM environment and cryptographic operations.
The distinction is therefore straightforward:
AWS KMS provides managed key management.
AWS CloudHSM provides customer-controlled HSM infrastructure.

SHE: Hardware Security for Embedded Systems

Secure Hardware Extension (SHE) addresses a different environment: embedded systems, particularly automotive microcontrollers.
SHE is an AUTOSAR specification that moves cryptographic key protection from the software domain into hardware. It includes protected key storage, AES-based cryptographic functionality, and control logic connecting the security functionality to the microcontroller.
A simplified view is:
+------------------------------+
| Microcontroller |
| |
| CPU ←→ SHE |
| | |
| +-- Secure Keys |
| +-- AES |
| +-- Crypto Logic |
| |
+------------------------------+
This is particularly useful in automotive systems, where electronic control units need to protect firmware, cryptographic keys, and communications while operating with constrained hardware resources.
SHE is not intended to replace more sophisticated security technologies such as TPMs or tamper-resistant HSMs.

TPM vs HSM vs SHE

The easiest way to distinguish the three is by their primary purpose:
Technology
Primary Focus
Typical Environment
TPM
Platform integrity and attestation
PCs, servers, cloud instances
HSM
Cryptographic key protection
Cloud and data centers
SHE
Embedded cryptographic security
Automotive and embedded systems
In simple terms:
TPM: Can I trust the platform?
HSM: Can I protect the cryptographic key?
SHE: Can I protect cryptographic functions inside an embedded controller?

Bringing Platform Trust and Key Protection Together

The most interesting part is what happens when these concepts work together.
Consider an EC2 workload that needs access to sensitive data encrypted with AWS KMS.
NitroTPM can provide evidence about the platform's measured state, while AWS KMS can use that evidence as part of its authorization decision.
EC2 Instance
|
NitroTPM
|
Attestation
|
↓
AWS KMS
|
Verify measurements
|
↓
Allow / Deny access
AWS KMS supports attestation-based key policies that can restrict cryptographic operations based on NitroTPM measurements. The request is allowed only when the measurements in the attestation document match the values specified in the KMS key policy.
This creates a stronger security model.
Instead of asking only:
"Does this workload have permission?"
we can also ask:
"Is this workload running in an expected trusted state?"
That combination of identity + platform state + cryptographic key protection is particularly useful for zero-trust architectures.

Hardware Security Is One Layer of Defense

Hardware-backed security provides a strong security foundation, but it does not eliminate the need for secure software and good architecture.
A protected cryptographic key cannot fix:
  • Vulnerable application code
  • Incorrect IAM policies
  • Compromised credentials
  • Insecure key provisioning
  • Vulnerable firmware
Hardware security should therefore be combined with identity management, least privilege, secure software development, monitoring, and other security controls.

Conclusion

TPM, HSM, and SHE represent three different approaches to hardware-backed security.
TPM focuses on establishing trust in a platform through mechanisms such as measured boot and attestation.
HSM focuses on protecting cryptographic keys and performing sensitive cryptographic operations within a hardware security boundary.
SHE brings hardware-backed cryptographic protection to embedded and automotive systems.
In AWS, these concepts can be seen through technologies such as NitroTPM, AWS KMS, and AWS CloudHSM.
The larger lesson is simple:
Security should not depend entirely on software.
Modern architectures increasingly need to answer not only "Who are you?", but also:
"What are you running, and can I prove that the environment is trustworthy?"
Hardware-backed security provides an important foundation for answering that question
Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article