AWS Key Management Service (KMS) Handlin ing cry ryptographic ic bounds for use of AES-GCM
Matthew Campagna
Amazon Web Services
Shay Gueron
Amazon Web Services University of Haifa
1
AWS Key Management Service (KMS) Handlin ing cry ryptographic ic - - PowerPoint PPT Presentation
AWS Key Management Service (KMS) Handlin ing cry ryptographic ic bounds for use of AES-GCM Matthew Campagna Shay Gueron Amazon Web Services Amazon Web Services University of Haifa 1 Outline The AWS Key Management Service
1
2
3
4
AWS KMS
Encrypt(keyId, plaintext) CreateKey ciphertext Generate new Customer Master Key (CMK) Access Control Policy keyId Store CMK and return keyId Authenticate command against account and key policy Retrieve CMK by keyId Encrypt requested data and return ciphertext Authenticate command against account policy
5
6
Each encryption is an invocation of AES256-GCM with a random 96-bit IV
Durable Storage Distributed HSMs
EncCMK1 EncCMKU CMK1 ciphertext1,1 ciphertext1,2 ciphertext1,Q CMKU ciphertextU,1 ciphertextU,2 ciphertextU,Q
7
(without rotation) to 232 encryptions.
A (key, iv)-collision results in loss of authentication of all ciphertexts encrypted with that key, and exposes plaintexts of corresponding ciphertexts with the (key, iv)-collision
8
Context: a nonce based encryption scheme Π(𝑂, 𝐵, 𝑁) Setup key: K Input: N, A, M Step 1: Apply a KDF to derive a new (per-nonce) key 𝑙𝑂 = 𝐿𝐸𝐺
𝐿 𝑂
Step 2: Use 𝑙𝑂with Π(𝑂, 𝐵, 𝑁)
9
Gueron Lindell CCS 2017
#1 depends on how the per-nonce keys are derived #2 depends on what we are willing to assume on the block cipher #3 depends on the scheme
10
Gueron Lindell CCS 2017
11
CTR: advantage:
𝑪𝟑 𝟑𝟐𝟑𝟘
Derive-Key CTR: advantage dominated by
𝑶⋅𝑪𝐧𝐛𝐲𝟑 𝟑𝟐𝟑𝟗
Gueron Lindell CCS 2017
|𝐵𝐵𝐸| = 𝑒 ≤ 512 |𝑁| = 𝑞 ≤ 256 KDF: NIST SP800-108 KDF (in Counter Mode with PRF HMAC_SHA256)
12
13
$
128 bits 256 bits 512 blocks 256 blocks
$
96 bits IV
14
(assumed to be a good approximation of a pseudorandom-permutation), from a pseudorandom-function?
15
Prob (10 keys get repeated ) < 2-32
for encrypting a single message (256B plaintext + 512B AAD blocks)
16
𝑅 can be as large as 264, before remotely approaching NIST probability requirement on (derived-key, IV) collisions
𝐵𝑒𝑤 ≤ 2572/2129 ≤ 1 2113
𝐵𝑒𝑤 ≤ 5142/2129< 1/2111
𝐵𝑒𝑤 ≤ 10 ∗ 1 2111 + 𝑅 – 20 ∗ 1 2113 = 5 ∗ 1 2111 + 𝑅 2113
17
Up to 𝑅 < 264 the indistinguishability advantage is less than 1/232
18
Forgery is not a concern
2320 5!∗2384
19
Up to 𝑅 < 264 the key recovery probability (multi key scenario) is negligible
pseudorandom-permutations, from a pseudorandom-function across all user’s (derived-key, iv)-pairs?
different than the customer perspective.
20
21
𝑉 ∗ 𝑅 2/2385
𝑉 ∗ 𝑅 2/2257
22
23
encrypting 𝑅 files) ≤
𝑉𝑅 16 16!∗21440 = 1 16!
24
Multi user & multi-key: key recovery is not a concern
25