distributed key management and cryptographic agility
play

Distributed Key Management and Cryptographic Agility Tolga Acar - PowerPoint PPT Presentation

Distributed Key Management and Cryptographic Agility Tolga Acar 24 Feb. 2011 1 Overview Distributed Key Lifecycle Problem statement and status quo Distributed Key Manager Typical application scenario and architecture


  1. Distributed Key Management and Cryptographic Agility Tolga Acar 24 Feb. 2011 1

  2. Overview • Distributed Key Lifecycle – Problem statement and status quo – Distributed Key Manager – Typical application scenario and architecture • Hardware Rooted Key Management – How to use TPMs for key management – TPM Key hierarchy • Diving into Cryptographic Theory – Security Definitions – Cryptographic Agility 2

  3. Distributed Key Management Decrypt C 1 Encrypt M 1 M 1 =D(K,C 1 ) C 1 =E(K,M 1 ) C 2 =E( K’ ,M 2 ) Read ciphertext Node 1 Node 2 Node N Save Replication Protocol ciphertext C 1 Storage Storage (Replica) (Replica) Where is the correct key? How is it protected? 3

  4. Key Lifecycle Model • Creation . A key object is created on at least one replica, but its attributes (e.g., key value) are not set. • Initialization . The key object has all its core key attributes set on at least one replica. • Full Distribution . An initialized key is available on all replicas. • Active . An initialized key is available for cryptographic operations on at least one replica. • Inactive . An initialized key is available for some cryptographic operations on all replicas (e.g., decrypt, only). • Termination . An initialized key is permanently deleted from all replicas. 4

  5. Key State Transitions Initialization Creation Active Inactive Termination Full Distribution Cryptographic Create and operations initialize a key 5

  6. DKM Problem Statement • No cross-user and cross-machine data protection – Windows Data Protection API (DPAPI) is single-user, single-machine. – KeyCzar and PKCS#11 uses local keys; no distribution mechanism. • Engineering problem – Ad-hoc key management groups (protection siloes) – Scalability & Availability (10Ks of machines) – Geo-redundancy (multiple data centers) – Key lifecycle management (automation) • Cryptography problem – Protect arbitrary data (broad applicability) – Use existing algorithms (e.g. AES, HMAC-SHA2) – Automatically update group keys (key rollover) – Crypto agile (algorithm and key length changes) 6

  7. DKM Architecture API Protect S e c u r e c o n n e c t i o n Unprotect DKM Container K A Client 1 DKM Group API Container DKM Protect Unprotect K B Client 2 K A Group A ACL DKM Repository API Protect Unprotect K B Group B ACL K A Client 3 Untrusted Storage (DKM-protected data) 7

  8. DKM Approach • Active Directory Approach – Key storage is straightforward • Store group keys in AD objects • Protect keys with AD object ACLs • AD security groups correspond to principals / groups – Rely on Active Directory replication for high availability – Network transport is secure (LDAP with Kerberos) • DKM provides – Auto key update mechanism – Multiple groups and multiple keys per group – Cryptographic policy per domain and per group – Crypto agility 8

  9. Walkthrough: DKM in Hosted E-Mail • Scenario: – Hosting mail for multiple tenants in a datacenter – Product supports message aggregation from other providers for users with multiple email accounts • User signs in once • E-Mail Server fetches and aggregates mail – Tenant Admins must be able to perform Administrative tasks • But should NOT be able to read user credentials 9

  10. Walkthrough: DKM in Hosted E-Mail Tenant Admin can Hosted E-Mail User’s ISP administer Exchange Tenant “ 1 ” Tenant 1 Tenant 2 Active Directory Admin 1 User Settings User Settings DKM Keys Tenant Admin can NOT access DKM keys User 1 Mailbox Stores User’s Mailbox User’s Mailbox User’s DKM User’s DKM Internet encrypted ISP encrypted ISP password password Tenant “ 2 ” ISP Mail Server Admin 2 E-Mail Servers (Hotmail, Yahoo, Gmail, etc) User 2 DKM 10

  11. DKM in Hosted E-Mail Hosted E-Mail User’s ISP Tenant “ 1 ” Tenant 1 Tenant 2 Active Directory Admin 1 User Settings User Settings DKM Keys User 1 Mailbox Stores User’s Mailbox User’s Mailbox Internet User’s DKM User’s DKM encrypted ISP encrypted ISP password password Tenant “ 2 ” ISP Mail Server Admin 2 2 1 E-Mail Servers E-Mail Servers can retrieve (Hotmail, Yahoo, mail from the ISP on behalf Gmail, etc) 3 User 2 DKM of the user 11

  12. DKM-TPM Motivation Secret Protection Technology: TPM - b ased HSM Software Crypto Hardware Security Module Crypto No Hardware Cost: Expensive Moderate Inexpensive Security: Very Secure More Secure Moderate (OS-Dependent) Deployment: Hard Easier Easy • Approach sits between a pure HSM solution and a full software solution.

  13. DKM-TPM Key Hierarchy Keys Storage: TPM EK SRK Processing: TPM (Endorsement Key) (Storage Root Key) Protection: TPM AIK (Attestation Identity Key) Keys Storage: External Processing: TPM Protection: TPM TLSK SK WK (TLS Key) (Signing Key) (Wrapping Key) Keys Storage: External DKMK Seal Processing: Memory (DKM Key)* Protection: TPM * There are one or more DKM Keys.

  14. DKM-TPM Roles 1. Master (Root of Trust) • Root of Trust for TPM public keys • Role assignment to TPM public keys • Push to Stores 2. Store (Repositories) • DKM repository (keys, policies, and metadata) • DKM Responder • Responds to requests from Masters, Stores, and Nodes 3. Node (Application servers) • Cryptographic operations with DKM keys • Client API • Sends requests to Stores

  15. DKM-TPM Roles Node Store Master Node Logic & API Store Logic & API Master Logic & API CommClient CommClient CommServer CommClient Repository KM & Crypto Repository KM & Crypto Repository KM & Crypto TPM TPM TPM Master PK List Master PK List Master PK List Store PK List Store PK List Store PK List Node PK List Node PK List Node PK List DKM Keys Configuration Configuration Configuration Policies

  16. Cryptosystem Security Definitions • Probabilistic Polynomial-Time (PPT) adversaries – Probabilistic randomized algorithm that gives the correct answer with > ½ probability. • Random Oracle Model (RO or ROM) – Black box with a stateful uniform random response Random Oracle y  {0, 1}* x y  Fetch(A,x) If (x in A) y Else Store(x,y) in A Return y 16

  17. Attack Game • Encryption scheme security definitions – IND-R: Indistinguishability from Random – IND-CPA: Indistinguishability under Chosen Plaintext Attack (a.k.a. semantic security) – IND-CCA: Indistinguishability under Chosen Ciphertext Attack IND-CPA ⊂ IND-CCA • Left-Right Oracle m 0 , m 1 b  {0, 1} C C = Enc(K, m b ) Return C Guess b? IND-CPA Game 17

  18. Ciphertext Attacks • IND-CCA2: Indistinguishability under adaptive chosen ciphertext attack – Decryption Oracle access (non-trivial) • Non-adaptive – Query the decryption oracle till the challenge ciphertext is received • Adaptive – Continuous queries to the oracle (max q queries) • IND-CPA ⊂ IND-CCA ⊂ IND-CCA2 18

  19. IND-CCA/CCA2 Game Encrypt Free Oracle Access C = Enc(K, m) Queries {m,C} Responses {C,m} Decrypt m = Dec(K, C) Challenge m 0 , m 1 Left-Right Oracle b  {0, 1} C C = Enc(K, m b ) Adaptive (CCA2) Adversary C Decrypt m m = Dec(K, C) Guess b? 19

  20. Cryptographic Agility • Cryptographic primitives as sets: – PRF = {F : F is a secure pseudorandom function} – AE = {F : F is a secure authenticated encryption scheme} • Assume F 1 and F 2 have the same key space and length • Informal Definition : A primitive Π is agile if any F 1 , F 2 ∈ Π can securely use the same key. K F 1 F 2 20

  21. Pseudo Random Function Agility Facts • PRF: F is a PRF if no efficient adversary can distinguish F(K,.) from a random function. • F 1 (K 1 ,x) and F 2 (K 2 ,x) are not distinguishable from a pair of random functions. • Definition: A set {F 1 ,F 2 } is agile if F 1 (K,x) K and F 2 (K,x) are not distinguishable from a pair of random functions. F 1 F 2 • Question: Are PRFs agile? – Yes, if every {F 1 ,F 2 } is agile. • Answer: No. – Example: F 2 (K,x) = NOT (F 1 (K,x)) x F 1 (K,x) x F 2 (K,x) • Now, what? 21

  22. Agility in Practice • Certain primitives are agile: collision-resistant hash functions • Strong agility is achievable in practice: Authenticated Encryption – Don’t use the key directly in the encryption algorithm <ae> – Use a derived subkey in <ae> • PRF-based security for Authenticated Encryption: CCM, GCM, etc. K – Pick a PRF from a small agile set • Encryption of M with K, with PRF – K ae = PRF(K,<ae>) F 1 F 2 – C = E(K ae , M) • Decryption – K ae = PRF(K,<ae>) – M = D(K ae , C) ⊥ (x,F 1 (K,x)) ⊥ (x,F 1 (K,x)) 22

Recommend


More recommend