ACE: an Authenticated Encryption and Hash Algorithm Submission to the NIST LWC Competition
Total Page:16
File Type:pdf, Size:1020Kb
ACE: An Authenticated Encryption and Hash Algorithm Submission to the NIST LWC Competition Submitters/Designers: Mark Aagaard, Riham AlTawy, Guang Gong, Kalikinkar Mandal, and Raghvendra Rohit∗ ∗Corresponding submitter: Email: [email protected] Tel: +1-519-888-4567 x45650 Communication Security Lab Department of Electrical and Computer Engineering University of Waterloo 200 University Avenue West Waterloo, ON, N2L 3G1, CANADA http://comsec.uwaterloo.ca/ March 29, 2019 Contents 1 Introduction4 1.1 Notations..................................5 1.2 Outline....................................6 2 Specification7 2.1 Parameters.................................7 2.1.1 ACE AEAD algorithm.......................7 2.1.2 ACE Hash algorithm........................8 2.2 Recommended Parameter Set.......................8 2.3 The ACE Permutation...........................8 2.3.1 The nonlinear function SB-64 ...................8 2.3.2 Round and step constants.....................9 2.4 AEAD Algorithm: ACE- -128 ...................... 10 2.4.1 Rate and capacityAE part of state.................. 12 2.4.2 Padding............................... 12 2.4.3 Loading key and nonce....................... 13 2.4.4 Initialization............................. 13 2.4.5 Processing associated data..................... 13 2.4.6 Encryption............................. 13 2.4.7 Finalization............................. 14 2.4.8 Decryption............................. 14 2.5 Hash Algorithm: ACE- -256 ........................ 14 2.5.1 Message paddingH.......................... 15 2.5.2 Loading initialization vector.................... 15 2.5.3 Initialization............................. 15 2.5.4 Absorbing and squeezing...................... 15 3 Security Claims 17 4 Security Analysis 18 4.1 Diffusion................................... 18 4.2 Differential and Linear Cryptanalysis................... 18 ii ACE: Submission to the NIST LWC competition 4.2.1 Expected bounds on the maximum probabilities of differential and linear characteristics...................... 19 4.3 Algebraic Properties............................ 19 4.4 Self Symmetry-based Distinguishers.................... 21 4.5 Security of ACE- -128 and ACE- -256 ................. 22 AE H 5 Design Rationale 23 5.1 Choice of the Mode: sLiSCP Sponge Mode................ 23 5.2 ACE State Size............................... 24 5.3 ACE Step Function............................. 25 5.4 Nonlinear Layer: Simeck box (SB-64)................... 25 5.5 Linear Layer: π = (3; 2; 0; 4; 1)....................... 26 5.6 Round and Step Constants......................... 26 5.6.1 Rationale.............................. 26 5.6.2 Generation of round and step constants.............. 26 5.7 Number of Rounds and Steps....................... 28 5.8 Choice of Rate Positions.......................... 29 5.9 Statement.................................. 29 6 Hardware Design and Analysis 30 6.1 Hardware Design Principles........................ 30 6.2 Interface and Top-level Module...................... 31 6.3 The ACE module .............................. 32 6.3.1 ACE datapath............................ 32 6.3.2 ACE FSM and lfsr c........................ 34 6.4 Hardware Implementation Results..................... 34 6.4.1 Hardware tools configuration.................... 34 6.4.2 Performance results......................... 35 7 Efficiency Analysis in Software 36 7.1 Software: High-performance CPU..................... 36 7.2 Software: Microcontroller.......................... 39 A Other NIST-LWC Submissions 45 B Test Vectors 46 B.1 Simeck Sbox................................. 46 B.2 ACE Permutation.............................. 47 B.3 ACE- -128 ................................. 47 B.4 ACE-AE-256 ................................. 47 H C Constants: Sequence to Hex Conversion 48 iii Chapter 1 Introduction ACE, often known as one of the strongest cards in a deck of cards, is an 320-bit lightweight permutation. It is designed to achieve a balance between hardware cost and software efficiency for both Authenticated Encryption with Associated Data (henceforth \AEAD") and hashing functionalities, while providing sufficient security margins. To accomplish these goals, ACE components and its mode of operation are adopted from well known and analyzed cryptographic primitives. In a nutshell, the design of ACE, its security, functionalities and the features it offers are described as follows. ACE core operations. Bitwise XORs and ANDs, left cyclic shifts and 64-bit word • shuffles ACE nonlinear layer. Unkeyed round-reduced Simeck block cipher [27] with block- • size of 64-bits, which provides good cryptographic properties and low hardware cost ACE linear layer. Five 64-bit words are shuffled in an (3; 2; 0; 4; 1) order, which • offers good resistance against differential and linear cryptanalysis ACE security. Simple analysis and good bounds for security using automated tools • such as CryptoSMT solver [22] and Gurobi [1] Functionality. All-in-one primitive, provides both AEAD and hashing functionali- • ties using the same hardware circuit ACE mode of operation. Unified sponge duplex mode [4] with keyed initialization • and finalization phases forthe AEAD algorithm Security of ACE modes. 128-bit security • Hardware performance. Achieves a throughput of 476 Mbps and has an area of • 4286 GE in CMOS 65 nm ASIC Software performance. Bit-sliced implementation of ACE permutation achieves a • speed of 9.97 cycles/byte. 4 ACE: Submission to the NIST LWC competition 1.1 Notations Notation Description X Y; X Y; X Y bitwise AND, XOR and concatenation of X and Y ⊕ jj X length of X in bits j j 0; 1 n, 0; 1 ?, φ length n bitstring, variable length bitstring, empty string f g f g 1n, 0n length n bitstring with all 1's, 0's Li left cyclic shift operator, i.e., for x 0; 1 n, i 2 f g L (x) = (xi; xi+1; : : : ; xn 1; x0; x1; : : : ; xi 1) − − word a 64-bit binary string S 320 bit state of ACE Sr;Sc r-bit rate part and c-bit capacity part of S (r = 64; c = 256) A; B; C; D; E Five 64-bit words of S, i.e., S = A B C D E jj jj jj jj Si state at i-th iteration (also step) of ACE permutation A[j] j-th byte of word A starting from right i i i A1;A0 upper and lower half of word A K; N; T key, nonce and tag k; n; t length of key, nonce and tag in bits (k = n = t = 128) AD; M; C associated data, plaintext and ciphertext (in blocks ADi;Mi;Ci) IV; iv fixed initialization vector and its length in bits H; h message digest (in blocks Hi) and its length, h = 256 ` length of X in words where X AD; M; C; H X 2 f g step one round of ACE permutation (see Figure 2.1) round one round of Simeck unkeyed function (see Figure 2.2) SB-64 nonlinear operation of ACE permutation u number of rounds, u = 8 s number of steps, s = 16 i i i rc0; rc1; rc2 8-bit round constants i i i sc0; sc1; sc2 8-bit step constants ACE- -k ACE AEAD algorithm (k = 128) AE ACE- -h ACE Hash algorithm (h = 256) H 5 ACE: Submission to the NIST LWC competition 1.2 Outline The rest of the document is organized as follows. In Chapter2, we present the com- plete specification of the ACE permutation, ACE AEAD and ACE hash algrithms. We summarize the security claims of our submission in Chapter3 and provide the detailed security analyis in Chapter4. In Chapter5, we present the rationale behind our design and justify the parameter choices. The details of our hardware implementations and performance results in CMOS 65 nm ASIC and FPGA are provided in Chapter6. In Chapter7, we discuss the efficiency of ACE in software including bit-sliced and micro- controller implementations. Finally, we conclude with references and test vectors in AppendixB. 6 Chapter 2 Specification 2.1 Parameters ACE is an 320-bit permutation that operates in an unified duplex sponge mode [4] and offers both AEAD and hashing functionalities in a single hardware circuit. The AEAD algorithm (ACE- -k) and the hash algorithm (ACE- -h) are parameterized by the size k of the secretAE key and the length of the messageH digest h in bits, respectively. Both the algorithms process the same amount of data per permutation call (i.e, rate r is same) and hence r value is ignored in the individual parameters' description. 2.1.1 ACE AEAD algorithm The AEAD algorithm ACE- -k is a combination of two algorithms, an authenticated encryption algorithm ACE- AEand the verified decryption algorithm ACE- . An authenticated encryptionE algorithm ACE- takes as input a secret keyD K of length k bits, a public message number N (nonce) ofE size n bits, a block header AD (a.k.a, associated data) and a message M. The output of ACE- is an authenticated ciphertext C of same length as M, and an authentication tag T Eof size t bits. Mathematically, ACE- is defined as E k n t ACE- : 0; 1 0; 1 0; 1 ∗ 0; 1 ∗ 0; 1 ∗ 0; 1 E f g × f g × f g × f g ! f g × f g with ACE- (K; N; AD; M) = (C; T ): E The decryption and verification algorithm takes as input the secret key K, nonce N, associated data AD, ciphertext C and tag T , and outputs the plaintext M of same length as C only if the verification of tag is correct, and if the tag verification fails. More formally, ? ACE- (K; N; AD; C; T ) M; : D 2 f ?g 7 ACE: Submission to the NIST LWC competition 2.1.2 ACE Hash algorithm A hash algorithm takes as input a message M, and the standard initialization vector IV of length iv bits, and returns a fixed size output H, called hash or message digest. Formally, the hash algorithm using ACE permutation is specified by iv h ACE- -h : 0; 1 ∗ 0; 1 0; 1 H f g × f g ! f g with H = ACE- -h(M; IV ). H Note that IV and N refer to two different things. IV is for a hash function and is fixed, while N is for an AEAD algorithm and never repeated for a fixed key. 2.2 Recommended Parameter Set In Table 2.1, we list the recommended parameter set for the AEAD and hash fuction- alities using the ACE permutation.