29
!"# $ " HSM Hardware Security Modules Jakob Schlyter – [email protected] 1

HSM - Internetstiftelsen · Residual risk • Keys can still be misused ‣ If you can use a key, you can also misuse it • Garbage in 㱺 Garage out ‣ If you feed it a bad zone

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: HSM - Internetstiftelsen · Residual risk • Keys can still be misused ‣ If you can use a key, you can also misuse it • Garbage in 㱺 Garage out ‣ If you feed it a bad zone

!"#$"

HSMHardware Security Modules

Jakob Schlyter – [email protected]

1

Page 2: HSM - Internetstiftelsen · Residual risk • Keys can still be misused ‣ If you can use a key, you can also misuse it • Garbage in 㱺 Garage out ‣ If you feed it a bad zone

!"#$"

What is an HSM?

2

Page 3: HSM - Internetstiftelsen · Residual risk • Keys can still be misused ‣ If you can use a key, you can also misuse it • Garbage in 㱺 Garage out ‣ If you feed it a bad zone

!"#$"

What is an HSM?

• Protected keystore

‣ Private keys can never be extracted in clear

• Crypto hardware

‣ Sometimes increases speed (but not always)

• Well-defined software interface

3

Page 4: HSM - Internetstiftelsen · Residual risk • Keys can still be misused ‣ If you can use a key, you can also misuse it • Garbage in 㱺 Garage out ‣ If you feed it a bad zone

!"#$"

Protected Keystore

• Keys stored in tamperproof memory

‣ If you mess with the chip, the device will (try to) detect it and zeroize

• Implemented using

‣ Covering components in epoxy

‣ Thin wires covering sensitive components

4

Page 5: HSM - Internetstiftelsen · Residual risk • Keys can still be misused ‣ If you can use a key, you can also misuse it • Garbage in 㱺 Garage out ‣ If you feed it a bad zone

!"#$"

Crypto Hardware

• Hardware to assist accelerate symmetric and asymmetric crypto

‣ RSA, DSA, AES, 3DES

• Good random number generator

• Hashing is often implemented in the host

5

Page 6: HSM - Internetstiftelsen · Residual risk • Keys can still be misused ‣ If you can use a key, you can also misuse it • Garbage in 㱺 Garage out ‣ If you feed it a bad zone

!"#$"

API

• PKCS#11 (aka Cryptoki)

• OpenSSL Engine

• Microsoft CAPI

• Java Cryptography Extension

6

Page 7: HSM - Internetstiftelsen · Residual risk • Keys can still be misused ‣ If you can use a key, you can also misuse it • Garbage in 㱺 Garage out ‣ If you feed it a bad zone

!"#$"

Stacked APIs are possible…

PKCS#11

Engine

Native

Engine

Application

Crypto Device CPU

OpenSSL

EVP Crypto Library

PKCS#11 Library

7

Page 8: HSM - Internetstiftelsen · Residual risk • Keys can still be misused ‣ If you can use a key, you can also misuse it • Garbage in 㱺 Garage out ‣ If you feed it a bad zone

!"#$"

Why use a HSM?

8

Page 9: HSM - Internetstiftelsen · Residual risk • Keys can still be misused ‣ If you can use a key, you can also misuse it • Garbage in 㱺 Garage out ‣ If you feed it a bad zone

!"#$"

What is the risk?

• Keys can be comprimised by…

‣ Compromised hosts

‣ Disgruntled staff

‣ Math

9

Page 10: HSM - Internetstiftelsen · Residual risk • Keys can still be misused ‣ If you can use a key, you can also misuse it • Garbage in 㱺 Garage out ‣ If you feed it a bad zone

!"#$"

How do we lower the risk?

• Protect the host itself

‣ But some sort of remote management is usually needed anyway

• Protect the private keys

‣ Move keys to HSM

10

Page 11: HSM - Internetstiftelsen · Residual risk • Keys can still be misused ‣ If you can use a key, you can also misuse it • Garbage in 㱺 Garage out ‣ If you feed it a bad zone

!"#$"

Residual risk

• Keys can still be misused

‣ If you can use a key, you can also misuse it

• Garbage in ⇒ Garage out

‣ If you feed it a bad zone – the result is still a signed bad zone

11

Page 12: HSM - Internetstiftelsen · Residual risk • Keys can still be misused ‣ If you can use a key, you can also misuse it • Garbage in 㱺 Garage out ‣ If you feed it a bad zone

!"#$"

Increase trust?

• Using an HSM increases trust – Why?

‣ Standards compliance

‣ Verifiable security – e.g. FIPS 140-2

• Also provides a clean cut between keystore and signing software

‣ You know where your keys are (and not are)

12

Page 13: HSM - Internetstiftelsen · Residual risk • Keys can still be misused ‣ If you can use a key, you can also misuse it • Garbage in 㱺 Garage out ‣ If you feed it a bad zone

!"#$"

The Buyer’s Guide to Hardware Security Modules

13

Page 14: HSM - Internetstiftelsen · Residual risk • Keys can still be misused ‣ If you can use a key, you can also misuse it • Garbage in 㱺 Garage out ‣ If you feed it a bad zone

!"#$"

Types of HSMs

• Local interface – e.g. PCI cards

• Remote interface – e.g. Ethernet

‣ Sharable between multiple hosts

• Smart cards

• USB tokens

‣ usually a smart card with integrated reader

14

Page 15: HSM - Internetstiftelsen · Residual risk • Keys can still be misused ‣ If you can use a key, you can also misuse it • Garbage in 㱺 Garage out ‣ If you feed it a bad zone

!"#$"

Algorithms and key sizes

• What algorithms are supported

‣ RSA recommended, DSA optional

• What key sizes are supported

‣ Minimum key size ≤ 1024 bits recommended

‣ Maximum key size ≥ 2048 bits recommended

15

Page 16: HSM - Internetstiftelsen · Residual risk • Keys can still be misused ‣ If you can use a key, you can also misuse it • Garbage in 㱺 Garage out ‣ If you feed it a bad zone

!"#$"

Capacity

• How many keys can be stored?

• Where are the keys stored?

‣ Internal keystore

‣ External keystore (encrypted by master key)

16

Page 17: HSM - Internetstiftelsen · Residual risk • Keys can still be misused ‣ If you can use a key, you can also misuse it • Garbage in 㱺 Garage out ‣ If you feed it a bad zone

!"#$"

API

• What API do you need?

‣ PKCS#11, OpenSSL, MS-CAPI, JCE

• What platforms are supported?

‣ Mind details like Linux kernel versions, distributions etc.

17

Page 18: HSM - Internetstiftelsen · Residual risk • Keys can still be misused ‣ If you can use a key, you can also misuse it • Garbage in 㱺 Garage out ‣ If you feed it a bad zone

!"#$"

Speed

• Signing speed – RSA

‣ Usually measured in 1024-bit signing operations (with public exponent 3 or 65537) per second.

• Key generation speed – RSA

‣ Usually the average key generation time for 1024-bit and 2048-bit keys per second.

18

Page 19: HSM - Internetstiftelsen · Residual risk • Keys can still be misused ‣ If you can use a key, you can also misuse it • Garbage in 㱺 Garage out ‣ If you feed it a bad zone

!"#$"

Security Certifications

• FIPS 140-2

‣ Federal Information Processing Standard

• CC-EAL

‣ Common Criteria Evaluation Assurance Levels

19

Page 20: HSM - Internetstiftelsen · Residual risk • Keys can still be misused ‣ If you can use a key, you can also misuse it • Garbage in 㱺 Garage out ‣ If you feed it a bad zone

!"#$"

FIPS 140-2Level Requirement

1 Basic security requirements

2 Tamper evidence, user authentication

3Tamper detection/resistance, data zeroisation,

splitting user roles

4Very high tamper detection/resistance,

Enviromental protection

20

Page 21: HSM - Internetstiftelsen · Residual risk • Keys can still be misused ‣ If you can use a key, you can also misuse it • Garbage in 㱺 Garage out ‣ If you feed it a bad zone

!"#$"

CC-EAL

• What Protection Profile (PP) has been used for the Target of Evalation (ToE)?

‣ CMCKG-PP – Key Generation

‣ CMCSO-PP – Signing Operations

21

Page 22: HSM - Internetstiftelsen · Residual risk • Keys can still be misused ‣ If you can use a key, you can also misuse it • Garbage in 㱺 Garage out ‣ If you feed it a bad zone

!"#$"

Key Backup

• How do you backup your keystore?

• Can you restore a backup elsewhere?

‣ e.g. on a hot-standby site

• Split key backup possible?

• Well-known backup format?

22

Page 23: HSM - Internetstiftelsen · Residual risk • Keys can still be misused ‣ If you can use a key, you can also misuse it • Garbage in 㱺 Garage out ‣ If you feed it a bad zone

!"#$"

Examples of HSMs

23

Page 24: HSM - Internetstiftelsen · Residual risk • Keys can still be misused ‣ If you can use a key, you can also misuse it • Garbage in 㱺 Garage out ‣ If you feed it a bad zone

!"#$"

SCA 6000Sun Crypto Accelerator 6000

Interface PCI-Express x8

Certification FIPS 140-2 level 3

PerformanceRSA-1024

13,000 sign/s

System Support Solaris, Linux

Approx price € 960

24

Page 25: HSM - Internetstiftelsen · Residual risk • Keys can still be misused ‣ If you can use a key, you can also misuse it • Garbage in 㱺 Garage out ‣ If you feed it a bad zone

!"#$"

AEP Keyper 9720

Interface Ethernet

Certification FIPS 140-2 level 4

PerformanceRSA-1024

1,200 sign/s

System Support Solaris, Linux, Windows

Approx price € 17,500

25

Page 26: HSM - Internetstiftelsen · Residual risk • Keys can still be misused ‣ If you can use a key, you can also misuse it • Garbage in 㱺 Garage out ‣ If you feed it a bad zone

!"#$"

IBM 4764 PCIXCC

Interface PCI-X

Certification FIPS 140-2 level 4

PerformanceRSA-1024

1,200 sign/s

System Support Solaris, Linux, Windows, AIX, i5/OS

Approx price € 6,600

26

Page 27: HSM - Internetstiftelsen · Residual risk • Keys can still be misused ‣ If you can use a key, you can also misuse it • Garbage in 㱺 Garage out ‣ If you feed it a bad zone

!"#$"

SoftHSM

Interface software

Certification none

PerformanceRSA-1024

CPU-dependent

System Support Unix

Approx price € 0Note: Not really a HSM – just looks like one…

27

Page 28: HSM - Internetstiftelsen · Residual risk • Keys can still be misused ‣ If you can use a key, you can also misuse it • Garbage in 㱺 Garage out ‣ If you feed it a bad zone

!"#$"

Other vendors

• Thales (formerly nCipher)

‣ netHSM, nShield

• SafeNet

‣ Luna SP, Luna CA, Luna PCI

28

Page 29: HSM - Internetstiftelsen · Residual risk • Keys can still be misused ‣ If you can use a key, you can also misuse it • Garbage in 㱺 Garage out ‣ If you feed it a bad zone

!"#$"

[email protected]

29