1
The Curse of Small Domains
New Attacks on Format-Preserving Encryption
Viet Tung Hoang Florida State University Stefano Tessaro UC Santa Barbara CRYPTO 2018
August 20, 2018
Ni Trieu Oregon State University
The Curse of Small Domains New Attacks on Format-Preserving - - PowerPoint PPT Presentation
The Curse of Small Domains New Attacks on Format-Preserving Encryption Viet Tung Hoang Stefano Tessaro Ni Trieu Florida State University UC Santa Barbara Oregon State University CRYPTO 2018 August 20, 2018 1 Format-Preserving Encryption
1
Viet Tung Hoang Florida State University Stefano Tessaro UC Santa Barbara CRYPTO 2018
August 20, 2018
Ni Trieu Oregon State University
2
disrupting the system
5887 3229 0447 4263
Ciphertexts also look like credit-card numbers
Widely used to encrypt credit-card numbers and fields in legacy databases [FIPS 74, BS97 BR02,BRPS09,…]
3
1234-5678-0000-5555 3147-7312-4216-1319 Dom = set of credit-card numbers , set of PINs, set of SSNs, …
FPE = tweakable blockcipher with a general message space Dom
[FIPS 74, BS97 BR02,BRPS09,…] Key Tweak deterministic
4
Scenario: DB enforces columns to store valid CC numbers.
Customer CC # John Doe 1234-0001-4321-5678 Jane Doe 9876-0004-3133-7311 … … Alice Crypto 9876-0001-1234-1234
CC # 1 1234-0001-4321-5678 2 1234-0001-4321-5678 3 9876-0001-1234-1234 ... … Customer CC # John Doe 4931-3137-3827-5934 Jane Doe 3819-5724-9477-3816 … … Alice Crypto 4820-4728-8439-1872
CC # 1 8431-5938-5229-6788 2 8431-5938-5229-6788 3 3015-0101-5343-3134 ... …
FPE-encrypt with key K and tweak “customer” FPE-encrypt with key K and tweak “transaction”
5
Credit-card numbers: PINs: Even smaller domains: ANSI ASC X9.124 envisions an application for
6
based on Feistel Companies offering FPE HPE Voltage, Veriphone, Ingenico, and
Other FPE solutions from industry:
DTP from Protegrity:
FNR from Cisco:
suspended but likely to get reinstated
7
Paper Recover Time #Msg per tweak Adaptive Known msg vs target Break [BHT16] A single target
3
No Same right half FF1 FF3 [DV17] Entire codebook Yes N/A FF3 Not applicable to generic Feistel Easily fixed by restricting the tweak space unbroken so far Scheme FF1 FF3 FNR Round # r 10 8 9
8
Paper Recover Time #Msg per tweak Adaptive Known msg vs target Break [BHT16] A single target
3
No Same right half FF1 FF3 [DV17] Entire codebook Yes N/A FF3 No None FF1 FF3 FNR Scheme FF1 FF3 FNR Round # r 10 8 9
Multiple targets Ours
9
Log of ciphertext # per target Success rate
10
FF1: start with contracting round functions FF3: start with expanding round functions Domain Our cost (for FF1) Our cost (for FF3) [BHT16]’s cost (for FF1) [BHT16]’s cost (for FF3)
FF3’s design choice is inferior
11
Encoding PIN SSN CCN Decimal 460,000 525,000 575,000 Alphanumeric 46,000 51,000 53,000
#ciphertexts needed to recover target with 90% success against DTP
Scheme Attack type Practical for FF1/FF3/FNR Known-plaintext attack Small domains DTP Ciphertext-only attack Any domain
Protegrity uses alphanumeric encoding to enlarge domains Make DTP actually 10 times weaker
12
Random known msg Targets tweaks FPE
Goal: Recover all targets given all ciphertexts and known msg Assumed to be distinct to avoid trivial attacks, as FPE is deterministic
13
r-round Feistel ( for FF1, for FF3) Round functions are modeled as truly random We consider (abstract) domain and are abelian groups is inverse of
M and N can be very small For FF1/FF3:
14
[Patarin 91, BHT16]
Question: Take two inputs and such that
Same right half
What’s the distribution of ? peak at
15
peak at
[BHT16]
16
Random known msg Target Suppose we can magically select a known msg X s.t
Basically [BHT16] attack
Ciphertexts
likely to peak at
17
Random known msg
Select s.t.
Question: How big is t so that selection is possible w.h.p? Some must have the same right half as the target Classic setting: coupons have truly random types Our setting: known msg are distinct, so coupons are biased towards new types Coupon-Collector problem:
18
For each , plot the frequency histogram of
There’s likely one column beyond the threshold If
19
For each , plot the frequency histogram of
There’s likely no column beyond the threshold If
20
Recovery rate Log (base 2) of q
Theorem: Suppose that we use random distinct known msg under q tweaks, and want to recover p targets. Then the recovery rate is at least
21
Domain # known msg, t # of tweaks, q Recovery rate Time (min) 33 100% 0.9 66% 0.46 31 100% 5.92 86% 3.06 96 100% 8.72 66% 5.3
Empirical results are even better than theoretical analysis
22
Targets Recover all targets given all ciphertexts and known msg
Want:
Random, distinct known msg
23
Can recover every satisfying
Targets Distinct known msg
Select s.t.
distinct right halves To try to recover target :
check if
24
FF1/FF3/FNR on tiny domains DTP on any domains Recommendation:
Protegrity is already moving to FF1