130 research outputs found

    Generic Round-Function-Recovery Attacks for Feistel Networks over Small Domains

    Get PDF
    Feistel Networks (FN) are now being used massively to encrypt credit card numbers through format-preserving encryption. In our work, we focus on FN with two branches, entirely unknown round functions, modular additions (or other group operations), and when the domain size of a branch (called NN) is small. We investigate round-function-recovery attacks. The best known attack so far is an improvement of Meet-In-The-Middle (MITM) attack by Isobe and Shibutani from ASIACRYPT~2013 with optimal data complexity q=rN2q=r \frac{N}{2} and time complexity Nr42N+o(N)N^{ \frac{r-4}{2}N + o(N)}, where rr is the round number in FN. We construct an algorithm with a surprisingly better complexity when rr is too low, based on partial exhaustive search. When the data complexity varies from the optimal to the one of a codebook attack q=N2q=N^2, our time complexity can reach NO(N11r2)N^{O \left( N^{1-\frac{1}{r-2}} \right) }. It crosses the complexity of the improved MITM for qNe3r2r3q\sim N\frac{\mathrm{e}^3}{r}2^{r-3}. We also estimate the lowest secure number of rounds depending on NN and the security goal. We show that the format-preserving-encryption schemes FF1 and FF3 standardized by NIST and ANSI cannot offer 128-bit security (as they are supposed to) for N11N\leq11 and N17N\leq17, respectively (the NIST standard only requires N10N \geq 10), and we improve the results by Durak and Vaudenay from CRYPTO~2017

    Best Effort and Practice Activation Codes

    Get PDF
    Activation Codes are used in many different digital services and known by many different names including voucher, e-coupon and discount code. In this paper we focus on a specific class of ACs that are short, human-readable, fixed-length and represent value. Even though this class of codes is extensively used there are no general guidelines for the design of Activation Code schemes. We discuss different methods that are used in practice and propose BEPAC, a new Activation Code scheme that provides both authenticity and confidentiality. The small message space of activation codes introduces some problems that are illustrated by an adaptive chosen-plaintext attack (CPA-2) on a general 3-round Feis- tel network of size 2^(2n) . This attack recovers the complete permutation from at most 2^(n+2) plaintext-ciphertext pairs. For this reason, BEPAC is designed in such a way that authenticity and confidentiality are in- dependent properties, i.e. loss of confidentiality does not imply loss of authenticity.Comment: 15 pages, 3 figures, TrustBus 201

    Attacks Only Get Better: How to Break FF3 on Large Domains

    Get PDF
    We improve the attack of Durak and Vaudenay (CRYPTO\u2717) on NIST Format-Preserving Encryption standard FF3, reducing the running time from O(N5)O(N^5) to O(N17/6)O(N^{17/6}) for domain ZN×ZNZ_N \times Z_N. Concretely, DV\u27s attack needs about 2502^{50} operations to recover encrypted 6-digit PINs, whereas ours only spends about 2302^{30} operations. In realizing this goal, we provide a pedagogical example of how to use distinguishing attacks to speed up slide attacks. In addition, we improve the running time of DV\u27s known-plaintext attack on 4-round Feistel of domain ZN×ZNZ_N \times Z_N from O(N3)O(N^3) time to just O(N5/3)O(N^{5/3}) time. We also generalize our attacks to a general domain ZM×ZNZ_M \times Z_N, allowing one to recover encrypted SSNs using about 2502^{50} operations. Finally, we provide some proof-of-concept implementations to empirically validate our results

    Breaking The FF3 Format-Preserving Encryption Standard Over Small Domains

    Get PDF
    The National Institute of Standards and Technology (NIST) recently published a Format-Preserving Encryption standard accepting two Feistel structure based schemes called FF1 and FF3. Particularly, FF3 is a tweakable block cipher based on an 8-round Feistel network. In CCS~2016, Bellare et. al. gave an attack to break FF3 (and FF1) with time and data complexity O(N5log(N))O(N^5\log(N)), which is much larger than the code book (but using many tweaks), where N2N^2 is domain size to the Feistel network. In this work, we give a new practical total break attack to the FF3 scheme (also known as BPS scheme). Our FF3 attack requires O(N116)O(N^{\frac{11}{6}}) chosen plaintexts with time complexity O(N5)O(N^{5}). Our attack was successfully tested with N29N\leq2^9. It is a slide attack (using two tweaks) that exploits the bad domain separation of the FF3 design. Due to this weakness, we reduced the FF3 attack to an attack on 4-round Feistel network. Biryukov et. al. already gave a 4-round Feistel structure attack in SAC~2015. However, it works with chosen plaintexts and ciphertexts whereas we need a known-plaintext attack. Therefore, we developed a new generic known-plaintext attack to 4-round Feistel network that reconstructs the entire tables for all round functions. It works with N32(N2)16N^{\frac{3}{2}} \left( \frac{N}{2} \right)^{\frac{1}{6}} known plaintexts and time complexity O(N3)O(N^{3}). Our 4-round attack is simple to extend to five and more rounds with complexity N(r5)N+o(N)N^{(r-5)N+o(N)}. It shows that FF1 with N=7N=7 and FF3 with 7N107\leq N\leq10 do not offer a 128-bit security. Finally, we provide an easy and intuitive fix to prevent the FF3 scheme from our O(N5)O(N^{5}) attack

    Breaking the FF3 Format Preserving Encryption

    Get PDF
    The NIST standard FF3 scheme (also known as BPS scheme) is a tweakable block cipher based on a 8-round Feistel Network. We break it with a practical attack. Our attack exploits the bad domain separation in FF3 design. The attack works with chosen plaintexts and tweaks when the message domain is small. Our FF3 attack requires O(N116)O(N^{\frac{11}{6}}) chosen plaintexts with time complexity N5N^{5}, where N2N^2 is domain size to the Feistel Network. Due to the bad domain separation in 8-round FF3, we reduced the FF3 attack to an attack on 4-round Feistel Networks. In our generic attack, we reconstruct the entire codebook of 4-round Feistel Network with N32(N2)16N^{\frac{3}{2}} \left( \frac{N}{2} \right)^{\frac{1}{6}} known plaintexts and time complexity N4N^{4}

    Cryptanalysis of Feistel-Based Format-Preserving Encryption

    Get PDF
    Format-Preserving Encryption (FPE) is a method to encrypt non-standard domains, thus allowing for securely encrypting not only binary strings, but also special domains, e.g., social security numbers into social security numbers. The need for those resulted in a few standardized constructions such as the NIST standardized FF1 and FF3-1 and the Korean Standards FEA-1 and FEA-2. Moreover, there are currently efforts both in ANSI and in ISO to include such block ciphers to standards (e.g., the ANSI X9.124 discussing encryption for financial services). Most of the proposed FPE schemes, such as the NIST standardized FF1 and FF3-1 and the Korean Standards FEA-1 and FEA-2, are based on a Feistel construction with pseudo-random round functions. Moreover, to mitigate enumeration attacks against the possibly small domains, they all employ tweaks, which enrich the actual domain sizes. In this paper we present distinguishing attacks against Feistel-based FPEs. We show a distinguishing attack against the full FF1 with data complexity of 2602^{60} 20-bit plaintexts, against the full FF3-1 with data complexity of 2402^{40} 20-bit plaintexts. For FEA-1 with 128-bit, 192-bit and 256-bit keys, the data complexity of the distinguishing attack is 2322^{32}, 2402^{40}, and 2482^{48} 8-bit plaintexts, respectively. The data complexity of the distinguishing attack against the full FEA-2 with 128-bit, 192-bit and 256-bit is 2562^{56}, 2682^{68}, and 2802^{80} 8-bit plaintexts, respectively. Moreover, we show how to extend the distinguishing attack on FEA-1 and FEA-2 using 192-bit and 256-bit keys into key recovery attacks with time complexity 21362^{136} (for both attacks)

    The Curse of Small Domains: New Attacks on Format-Preserving Encryption

    Get PDF
    Format-preserving encryption (FPE) produces ciphertexts which have the same format as the plaintexts. Building secure FPE is very challenging, and recent attacks (Bellare, Hoang, Tessaro, CCS\u2716; Durak and Vaudenay, CRYPTO\u2717) have highlighted security deficiencies in the recent NIST SP800-38G standard. This has left the question open of whether practical schemes with high security exist. In this paper, we continue the investigation of attacks against FPE schemes. Our first contribution are new known-plaintext message recovery attacks against Feistel-based FPEs (such as FF1/FF3 from the NIST SP800-38G standard) which improve upon previous work in terms of amortized complexity in multi-target scenarios, where multiple ciphertexts are to be decrypted. Our attacks are also qualitatively better in that they make no assumptions on the correlation between the targets to be decrypted and the known plaintexts. We also surface a new vulnerability specific to FF3 and how it handles odd length domains, which leads to a substantial speedup in our attacks. We also show the first attacks against non-Feistel based FPEs. Specifically, we show a strong message-recovery attack for FNR, a construction proposed by Cisco which replaces two rounds in the Feistel construction with a pairwise-independent permutation, following the paradigm by Naor and Reingold (JoC,\u2799). We also provide a strong ciphertext-only attack against a variant of the DTP construction by Brightwell and Smith, which is deployed by Protegrity within commercial applications. All of our attacks show that existing constructions fall short of achieving desirable security levels. For Feistel and the FNR schemes, our attacks become feasible on small domains, e.g., 8 bits, for suggested round numbers. Our attack against the DTP construction is practical even for large domains. We provide proof-of-concept implementations of our attacks that verify our theoretical findings

    Three Third Generation Attacks on the Format Preserving Encryption Scheme FF3

    Get PDF
    Format-Preserving Encryption (FPE) schemes accept plaintexts from any finite set of values (such as social security numbers or birth dates) and produce ciphertexts that belong to the same set. They are extremely useful in practice since they make it possible to encrypt existing databases or communication packets without changing their format. Due to industry demand, NIST had standardized in 2016 two such encryption schemes called FF1 and FF3. They immediately attracted considerable cryptanalytic attention with decreasing attack complexities. The best currently known attack on the Feistel construction FF3 has data and memory complexity of O(N11/6){O}(N^{11/6}) and time complexity of O(N17/6){O}(N^{17/6}), where the input belongs to a domain of size N×NN \times N. In this paper, we present and experimentally verify three improved attacks on FF3. Our best attack achieves the tradeoff curve D=M=O~(N2t)D=M=\tilde{O}(N^{2-t}), T=O~(N2+t)T=\tilde{O}(N^{2+t}) for all t0.5t \leq 0.5. In particular, we can reduce the data and memory complexities to the more practical O~(N1.5)\tilde{O}(N^{1.5}), and at the same time, reduce the time complexity to O~(N2.5)\tilde{O}(N^{2.5}). We also identify another attack vector against FPE schemes, the related-domain attack. We show how one can mount powerful attacks when the adversary is given access to the encryption under the same key in different domains, and show how to apply it to efficiently distinguish FF3 and FF3-1 instances

    Related-Key Analysis of Generalized Feistel Networks with Expanding Round Functions

    Get PDF
    We extend the prior provable related-key security analysis of (generalized) Feistel networks (Barbosa and Farshim, FSE 2014; Yu et al., Inscrypt 2020) to the setting of expanding round functions, i.e., n-bit to m-bit round functions with n < m. This includes Expanding Feistel Networks (EFNs) that purely rely on such expanding round functions, and Alternating Feistel Networks (AFNs) that alternate expanding and contracting round functions. We show that, when two independent keys K1,K2K_1,K_2 are alternatively used in each round, (a) 2mn+22\lceil\frac{m}{n}\rceil+2 rounds are sufficient for related-key security of EFNs, and (b) a constant number of 4 rounds are sufficient for related-key security of AFNs. Our results complete the picture of provable related-key security of GFNs, and provide additional theoretical support for the AFN-based NIST format preserving encryption standards FF1 and FF3
    corecore