Keywords

1 Introduction

The protection of a message typically requires the protection of both confidentiality and authenticity. There are two main approaches to authenticate and encrypt a message. One approach is to treat the encryption and authentication separately. The plaintext is encrypted with a block cipher or stream cipher, and a MAC algorithm is used to authenticate the ciphertext. For example, we may apply AES [17] in CBC mode [18] to the plaintext, then apply AES-CMAC [22] (or Pelican MAC [6] or HMAC [19]) to the ciphertext to generate an authentication tag. This approach is relatively easy to analyze since the security of authentication and encryption can be analyzed almost separately. Bellare and Namprempre have performed a detailed analysis of this type of authenticated encryption for randomized encryption [2]. Another approach is to apply an integrated authenticated encryption algorithm to the message; one can expect that this is more efficient since authentication and encryption can share part of the computation.

There are three approaches to design an integrated authenticated encryption algorithm. The first approach is to use a block cipher in a special mode (the block cipher is treated as a black box). The research on this approach started about ten years ago [9, 12, 14]. There are now two NIST recommended modes of operation for authenticated encryption, namely, CCM [20] and GCM [21]. OCB [15, 24, 25] is a widely known authenticated encryption mode, and OCB2 is an ISO standard. The second approach is to use a stream cipher (the stream cipher is treated as a black box). The keystream is divided into two parts: one part for encryption and another part for authentication. A typical example of this approach is Grain-128a [1]. The third approach is to design dedicated authenticated encryption algorithms. In this approach, a message is used to update the state of the cipher, and message authentication can be achieved almost for free. Two examples of this approach are Helix [8] and Phelix [26]. The attack against Phelix [27] shows that it is unlikely that this type of authenticated encryption algorithm can withstand nonce-reuse attacks if it requires much less computation than a block cipher.

In this paper, we propose a dedicated authenticated encryption algorithm AEGIS following the third approach above. AEGIS is constructed from the AES encryption round function (not the last round). AEGIS-128 processes a 16-byte message block with 5 AES round functions, and AEGIS-256 uses 6 AES round functions. The computational cost of AEGIS is about half that of AES. AEGIS is very fast. On the Intel Sandy Bridge processor Core-i5, the encryption speeds of AEGIS-128 and AEGIS-256 are about 0.66 cpb and 0.70 cpb, respectively. The speeds are close to that of AES in counter (CTR) mode, and are about 8 times that of AES encryption in CBC mode. AEGIS offers a very high security. As long as the nonce is not reused, it is impossible to recover the AEGIS state and key faster than exhaustive key search (under the assumption that a 128-bit authentication tag is used, and the forgery attack cannot be repeated for the same key for more than \(2^{128}\) times). AEGIS is suitable for network communication since it is straightforward to use AEGIS to protect a packet while leaving the packet header (associated data) unencrypted.

This paper is organized as follows. The operations, variables and functions are introduced in Sect. 2. The specifications of AEGIS-128 and AEGIS-256 are given in Sect. 3 and Sect. 4, respectively. Section 5 gives the security analysis of AEGIS-128 and AEGIS-256. The software performance of AEGIS is given in Sect. 6. The design rationale is given in Sect. 7. Section 8 concludes this paper.

2 Operations, Variables and Functions

2.1 Operations

The following operations are used in AEGIS:

\(\oplus \)

: bit-wise exclusive OR

&

: bit-wise AND

\(\parallel \)

: concatenation

\(\lceil x \rceil \)

: ceiling operation, \(\lceil x \rceil \) is the smallest integer not less than \(x\)

2.2 Variables and Constants

The following variables and constants are used in AEGIS:

\(AD \quad \)

: associated data (this data will not be encrypted or decrypted).

\(AD_i\)

: a 16-byte associated data block (the last block may be a partial block).

\(adlen \)

: bit length of the associated data with \(0 \le adlen < 2^{64} \).

\(C \quad \)

: ciphertext.

\(C_i\)

: a 16-byte ciphertext block (the last block may be a partial block).

\(const\)

: a 32-byte constant in the hexadecimal format; \(const = 00 \parallel 01 \parallel 01 \parallel 02 \parallel 03 \parallel 05 \parallel 08 \parallel 0d \parallel 15 \parallel 22 \parallel 37 \parallel 59 \parallel 90 \parallel e9 \parallel 79 \parallel 62 \parallel db \parallel 3d \parallel 18 \parallel 55 \parallel 6d \parallel c2 \parallel 2f \parallel f1 \parallel 20 \parallel 11 \parallel 31 \parallel 42 \parallel 73 \parallel b5 \parallel 28 \parallel dd\). This is the Fibonacci sequence modulo 256.

\(const_0\)

: first 16 bytes of \(const\).

\(const_1\)

: last 16 bytes of \(const\).

\(\mathop { IV}\nolimits _{128} \quad \)

: 128-bit initialization vector of AEGIS-128.

\(\mathop { IV}\nolimits _{256} \quad \)

: 256-bit initialization vector of AEGIS-256.

\(\mathop { IV}\nolimits _{256,0} \quad \)

: first half of \(\mathop { IV}\nolimits _{256}\).

\(\mathop { IV}\nolimits _{256,1} \quad \)

: second half of \(\mathop { IV}\nolimits _{256}\).

\(K_{128} \quad \)

: 128-bit key of AEGIS-128.

\(K_{256} \quad \)

: 256-bit key of AEGIS-256.

\(K_{256,0} \quad \)

: first half of \(K_{256}\).

\(K_{256,1} \quad \)

: second half of \(K_{256} \).

\(msglen \)

: bit length of the plaintext/ciphertext with \( 0 \le msglen < 2^{64} \).

\(m_i\)

: a 16-byte data block.

\(P \quad \)

: plaintext.

\(P_i\)

: a 16-byte plaintext block (the last block may be a partial block).

\(S_i \quad \)

: state at the beginning of the \(i\)th step.

\(S_{i,j} \)

: \(j\)-th 16-byte element of the state \(S_i \,.\) For AEGIS-128, \(0 \le j \le 4\); for AEGIS-256, \(0 \le j \le 5\).

\(T \quad \)

: authentication tag.

\(t \quad \)

: bit length of the authentication tag with \(64 \le t \le 128\).

\(u \quad \)

: \(u = \lceil {adlen \over 128}\rceil \).

\(v \quad \)

: \(v = \lceil {msglen \over 128}\rceil \).

2.3 Functions

The AES encryption round function (not the last round) is used in AEGIS:

\(AESRound(A,B)\): \(A\) is the 16-byte state, \(B\) is the 16-byte round key. This function mapping 2 16-byte inputs to a 16-byte output can be implemented efficiently on recent x86 processors using the AES instruction _ _m128_aesenc_si128(A, B), where \(A\) and \(B\) are two 128-bit integers _ _m128i.

3 AEGIS-128

In this section, we describe AEGIS-128. With a 128-bit key and a 128-bit initialization vector, AEGIS-128 encrypts and authenticates a message. The associated data length and the plaintext length are less than \(2^{64}\) bits. The authentication tag length is less than or equal to 128 bits. We strongly recommend the use of a 128-bit tag.

3.1 The State Update Function of AEGIS-128

The state update function updates the 80-byte state \(S_i\) with a 16-byte message block \(m_i\). \(S_{i+1}=\mathtt{StateUpdate128}(S_i,m_i)\) is given as follows:

$$\begin{array}{l} S_{i+1,0}=AESRound(S_{i,4},S_{i,0} \oplus m_i); \\ S_{i+1,1} = AESRound(S_{i,0},S_{i,1}); \\ S_{i+1,2}=AESRound(S_{i,1},S_{i,2}); \\ S_{i+1,3} =AESRound(S_{i,2},S_{i,3}); \\ S_{i+1,4} = AESRound(S_{i,3},S_{i,4}). \\ \end{array} $$

The state update function is shown in Fig. 1.

Fig. 1.
figure 1

The state update function of AEGIS-128. R indicates the AES encryption round function without XORing with the round key and \(w\) is a temporary 16-byte word.

3.2 The Initialization of AEGIS-128

The initialization of AEGIS-128 consists of loading the key and \(\mathop { IV}\nolimits \) into the state, and running the cipher for 10 steps with the key and \(\mathop { IV}\nolimits \) being used as message.

  1. 1.

    Load the key and \(\mathop { IV}\nolimits \) into the state as follows:

    $$\begin{array}{l} S_{-10,0}=K_{128} \oplus \mathop { IV}\nolimits _{128}; \\ S_{-10,1} = const_1; \\ S_{-10,2} =const_0; \\ S_{-10,3}=K_{128} \oplus const_0; \\ S_{-10,4} =K_{128} \oplus const_1. \\ \end{array} $$
  2. 2.

    For \(i = -5\) to \(-1\), \(m_{2i} = K_{128}\); \(m_{2i+1} = K_{128} \oplus \mathop { IV}\nolimits _{128}\).

  3. 3.

    For \(i = -10\) to \(-1\), \(S_{i+1} = \mathtt{StateUpdate128}(S_i,m_i)\).

3.3 Processing the Authenticated Data

After the initialization, the associated data \(AD\) is used to update the state.

  1. 1.

    If the last associated data block is not a full block, use 0 bits to pad it to 128 bits, and the padded full block is used to update the state. Note that if \(adlen = 0\), the state will not be updated.

  2. 2.

    For \(i = 0\) to \( \lceil {adlen \over 128}\rceil -1\), we update the state:

    $$\begin{array}{l} S_{i+1} = \mathtt{StateUpdate128 }(S_i,AD_i).\end{array} $$

3.4 The Encryption of AEGIS-128

After processing the associated data, at each step of the encryption, a 16-byte plaintext block \(P_i\) is used to update the state, and \(P_i\) is encrypted to \(C_i\).

  1. 1.

    If the last plaintext block is not a full block, use 0 bits to pad it to 128 bits, and the padded full block is used to update the state. But only the partial block is encrypted. Note that if \(msglen = 0\), the state will not get updated, and there is no encryption.

  2. 2.

    Let \(u = \lceil {adlen \over 128}\rceil \) and \(v = \lceil {msglen \over 128}\rceil \). For \(i = 0\) to \( v-1\), we perform encryption and update the state:

    $$ \begin{aligned} C_i&= P_i \oplus S_{u+i,1} \oplus S_{u + i,4} \oplus (S_{ u + i ,2} \& S_{u + i,3}) ; \\ S_{u+i+1}&= \mathtt{StateUpdate128}(S_{u+i},P_i). \\ \end{aligned} $$

3.5 The Finalization of AEGIS-128

After encrypting all the plaintext blocks, we generate the authentication tag using seven more steps. The length of the associated data and the length of the message are used to update the state.

  1. 1.

    Let \(tmp = S_{u+v,3} \oplus (adlen \parallel msglen)\), where \(adlen\) and \(msglen\) are represented as 64-bit integers.

  2. 2.

    For \(i = u+v\) to \( u + v + 6\), we update the state:

    $$\begin{array}{l} S_{i+1}=\mathtt{StateUpdate128}(S_i,tmp). \\ \end{array} $$
  3. 3.

    We generate the authentication tag from the state \(S_{u + v + 7}\) as follows:

    $$\begin{array}{l} T' = {\bigoplus }_{i = 0}^{4} S_{u + v + 7,i}. \\ \end{array} $$

The authentication tag \(T\) consists of the first \(t\) bits of \(T'\).

3.6 The Decryption and Verification of AEGIS-128

The exact values of key size, \(\mathop { IV}\nolimits \) size, and tag size should be known to the decryption and verification processes. The decryption starts with the initialization and the processing of authenticated data. Then the ciphertext is decrypted as follows:

  1. 1.

    If the last ciphertext block is not a full block, decrypt only the partial ciphertext block. The partial plaintext block is padded with 0 bits, and the padded full plaintext block is used to update the state.

  2. 2.

    For \(i = 0\) to \( v-1\), we perform decryption and update the state.

    $$ \begin{aligned} P_i&= C_i \oplus S_{u+i,1} \oplus S_{u+i,4} \oplus (S_{u+i,2} \& S_{u+i,3}) ; \\ S_{u+i+1}&= \mathtt{StateUpdate128}(S_{u+i},P_i). \\ \end{aligned} $$

The finalization in the decryption process is the same as that in the encryption process. We emphasize that if the verification fails, the ciphertext and the newly generated authentication tag should not be given as output; otherwise, the state of AEGIS-128 is vulnerable to known-plaintext or chosen-ciphertext attacks (using a fixed \(\mathop { IV}\nolimits \)). This requirement also applies to AEGIS-256.

4 AEGIS-256

In this section, we describe AEGIS-256. With a 256-bit key and a 256-bit initialization vector, AEGIS-256 encrypts and authenticates a message. The associated data length and the plaintext length are less than \(2^{64}\) bits. The authentication tag length is less than or equal to 128 bits. We strongly recommend the use of a 128-bit tag.

4.1 The State Update Function of AEGIS-256

The state update function updates the 96-byte state \(S_i\) with a 16-byte message block \(m_i\). \(S_{i+1}=\mathtt{StateUpdate256}(S_i,m_i)\) is illustrated as follows:

$$\begin{array}{l} S_{i+1,0}=AESRound(S_{i,5},S_{i,0} \oplus m_i ); \\ S_{i+1,1}=AESRound(S_{i,0},S_{i,1}); \\ S_{i+1,2}=AESRound(S_{i,1},S_{i,2}); \\ S_{i+1,3}=AESRound(S_{i,2},S_{i,3}); \\ S_{i+1,4}=AESRound(S_{i,3},S_{i,4}); \\ S_{i+1,5}=AESRound(S_{i,4},S_{i,5}). \\ \end{array} $$

4.2 The Initialization of AEGIS-256

The initialization of AEGIS-256 consists of loading the key and \(\mathop { IV}\nolimits \) into the state, and running the cipher for 16 steps with the key and \(\mathop { IV}\nolimits \) being used as message.

  1. 1.

    Load the key and \(\mathop { IV}\nolimits \) into the state as follows:

    $$\begin{array}{l} S_{-16,0}=K_{256,0} \oplus \mathop { IV}\nolimits _{256,0}; \\ S_{-16,1}=K_{256,1} \oplus \mathop { IV}\nolimits _{256,1} ; \\ S_{-16,2}=const_1; \\ S_{-16,3}=const_0; \\ S_{-16,4}=K_{256,0} \oplus const_0; \\ S_{-16,5}=K_{256,1} \oplus const_1. \\ \end{array} $$
  2. 2.

    For \(i = -4\) to \(-1\),

    $$\begin{aligned}{} m_{4i}&=K_{256,0} ; \\ m_{4i+1}&=K_{256,1} ; \\ m_{4i+2}&=K_{256,0} \oplus \mathop { IV}\nolimits _{256,0} ; \\ m_{4i+3}&=K_{256,1} \oplus \mathop { IV}\nolimits _{256,1}. \end{aligned}$$
  3. 3.

    For \(i = -16\) to \(-1\), \(S_{i+1}=\mathtt{StateUpdate256 }(S_i,m_i).\)

4.3 Processing the Authenticated Data

After the initialization, the associated data \(AD\) is used to update the state.

  1. 1.

    If the last associated data block is not a full block, use 0 bits to pad it to 128 bits, and the padded full block is used to update the state. Note that if \(adlen = 0\), the state will not get updated.

  2. 2.

    For \(i = 0\) to \( \lceil {adlen \over 128}\rceil -1\), we update the state.

    $$\begin{array}{l} S_{i+1} = \mathtt{StateUpdate256}(S_i,AD_i). \end{array} $$

4.4 The Encryption of AEGIS-256

After processing the associated data, at each step of the encryption, a 16-byte plaintext block \(P_i\) is used to update the state, and \(P_i\) is encrypted to \(C_i\).

  1. 1.

    If the last plaintext block is not a full block, use 0 bits to pad it to 128 bits, and the padded full block is used to update the state. But only the partial block is encrypted. Note that if \(msglen = 0\), the state will not get updated, and there is no encryption.

  2. 2.

    Let \(u = \lceil {adlen \over 128}\rceil \) and \(v = \lceil {msglen \over 128}\rceil \). For \(i = 0\) to \( v-1\), we perform encryption and update the state:

    $$ \begin{aligned} C_i&= P_i \oplus S_{u+i,1} \oplus S_{u + i,4} \oplus S_{u + i,5} \oplus (S_{ u + i ,2} \& S_{u + i,3}) ; \\ S_{u+i+1}&= \mathtt{StateUpdate256}(S_{u+i},P_i). \end{aligned} $$

4.5 The Finalization of AEGIS-256

After encrypting all the plaintext blocks, we generate the authentication tag using seven more steps. The length of the associated data and the length of the message are used to update the state.

  1. 1.

    Let \(tmp = S_{u+v,3} \oplus (adlen \parallel msglen)\), where \(adlen\) and \(msglen\) are represented as 64-bit integers.

  2. 2.

    For \(i = u+v\) to \( u + v + 6\), we update the state:

    $$\begin{array}{l} S_{i+1}=\mathtt{StateUpdate256}(S_i,tmp). \end{array} $$
  3. 3.

    We generate the authentication tag from the state \(S_{u + v + 7}\) as follows:

    $$\begin{array}{l} T' = {\bigoplus }_{i = 0}^{5} S_{u + v + 7,i}. \end{array} $$

The authentication tag \(T\) consists of the first \(t\) bits of \(T'\).

5 The Security of AEGIS

The following requirements should be satisfied in order to use AEGIS securely.

  1. 1.

    Each key should be generated uniformly at random.

  2. 2.

    Each key and \(\mathop { IV}\nolimits \) pair should not be used to protect more than one message; and each key and \(\mathop { IV}\nolimits \) pair should not be used with two different tag sizes.

  3. 3.

    If verification fails, the decrypted plaintext and the wrong authentication tag should not be given as output.

If the above requirements are satisfied, we have the following security claims:

Claim 1. :

The success rate of a forgery attack is \(2^{-t}\), where \(t\) is the tag size. If the forgery attack is repeated \(n\) times, the success rate of a forgery attack is about \(n \times 2^{-t}\).

Claim 2. :

The state and key cannot be recovered faster than exhaustive key search if the forgery attack is not successful. We recommend the use of a 128-bit tag size for AEGIS in order to resist repeated forgery attacks. (Note that with 128-bit tag, the state of AEGIS-256 can be recovered faster than exhaustive key search if a forgery attack is repeated for about \(2^{128}\) times for the same key and \(\mathop { IV}\nolimits \) pair.)

5.1 The Security of the Initialization

A difference in \(\mathop { IV}\nolimits \) is the main threat to the security of the initialization of AEGIS. A difference in \(\mathop { IV}\nolimits \) would eventually propagate into the ciphertexts, and thus it is possible to apply a differential attack against AEGIS. In AEGIS-128, there are 50 AES round functions (10 steps) in the initialization. If there is a difference in \(\mathop { IV}\nolimits \), the difference would pass through more than 10 AES round functions. In AEGIS-256, there are 96 AES round functions (16 steps) in the initialization. If there is a difference in \(\mathop { IV}\nolimits \), the difference would pass through more than 16 AES round functions. Furthermore, in order to prevent the difference in the state being eliminated completely in the middle of the initialization, we inject the \(\mathop { IV}\nolimits \) difference repeatedly into the state (5 and 8 times into the state of AEGIS-128 and AEGIS-256, respectively). We expect that a differential attack against the initialization would be more expensive than exhaustive key search.

5.2 The Security of the Encryption Process

We emphasize here that AEGIS encryption is a stream cipher with a large state that is updated continuously. The attacks against a block cipher cannot be applied directly to AEGIS. The state update function involves five AES round functions in AEGIS-128, and six AES round functions in AEGIS-256. We should ensure that \(\mathop { IV}\nolimits \) is not reused for the same key; otherwise, the states of AEGIS can be recovered easily with either known-plaintext attacks or chosen plaintext attacks. For example, if we re-use an \(\mathop { IV}\nolimits \) and inject a difference into \(P_i\), the difference would propagate into \(C_{i+2}\), and part of the state can be attacked by analyzing the difference pair \(( \varDelta P_i, \varDelta C_{i+2})\). If an authenticated encryption algorithm is secure for re-used \(\mathop { IV}\nolimits \)s, we expect that such an algorithm can only be as fast as a block cipher, as pointed out in [27]. This can be argued as follows: once an \(\mathop { IV}\nolimits \) is re-used, the attacks that are relevant for a block cipher can be applied to attack the state.

Statistical Attacks. If the \(\mathop { IV}\nolimits \) is used only once for each key, it is impossible to apply a differential attack to the encryption process. It is extremely difficult to apply a linear attack (or correlation attack) to recover the secret state since the state of AEGIS is updated in a nonlinear way. In general, it would be difficult to apply any statistical attack to recover the secret state due to the nonlinear state update function (the statistical correlation between any two states vanishes quickly as the distance between them increases).

LEX [3, 4] is an AES-based stream cipher that generates keystream from part of the state. We would like to mention here that AEGIS is not vulnerable to the attack against LEX [7]. There is a fundamental reason why LEX is vulnerable to a statistical attack while AEGIS is not: the round keys used in LEX are fixed, while the whole state of AEGIS is updated continuously in a nonlinear way.

5.3 The Security of Message Authentication

There are two main approaches to attack a MAC algorithm. One approach is to recover the secret key or secret state, another approach is to introduce/detect an internal state collision. Besides these two approaches, when we analyze the security of message authentication, we need to consider that the AEGIS encryption may affect the security of message authentication.

Recovering Key or State. From Sect. 5.1, we expect that the secret key cannot be recovered faster than exhaustive search by attacking the initialization. From Sect. 5.2, we expect that the state cannot be recovered faster than exhaustive search by attacking the encryption process if the \(\mathop { IV}\nolimits \) is used only once. Similarly, we expect that the state cannot be recovered faster than exhaustive search by attacking the tag generation process if \(\mathop { IV}\nolimits \) is not reused.

An attacker can still inject a difference into the state in the tag verification process and obtain the decrypted plaintext if the forgery attack is allowed to be repeated for multiple times for the same key and \(\mathop { IV}\nolimits \) pair. In a forgery attack, the decrypted plaintext is known to the attacker with probability \(2^{-t}\) (if the verification is successful). It becomes possible to recover the state if the forgery attack is repeated many times. We recommend the use of 128-bit tag so that recovering the state requires at least \(2^{128}\) forgery attempts.

The security level of the AEGIS-256 state is only 128 bits with a 128-bit tag (if we consider that a forgery attack becomes successful). However, we believe that repeating the forgery attack for around \(2^{128}\) times to recover a state is impractical.

Internal Collisions. A powerful attack against MAC is to introduce and detect internal collisions. A general approach based on the birthday attack was given by Preneel and van Oorschot [23]: an internal collision can be detected after a key is used to generate the authentication tags of about \(2^{n/2}\) chosen messages, where \(n\) is the state size and tag size in bits. The internal collision can be exploited to forge the tags of new messages. The birthday attack was later applied to other MAC algorithms [28]. AEGIS resists this type of attacks due to its large state size. Another approach to introduce internal collision is through differential cryptanalysis. Suppose that the difference cancellation in the state occurs with probability \(2^{-a}\); then we can detect an internal collision after a secret key is used to generate the tags of those \(2^{a}\) message pairs. The resulting internal collision can be used to forge the tags of new messages.

An attacker can inject a difference into the state in the decryption and tag verification process by modifying the ciphertext. However, AEGIS provides an extremely large security margin against this type of attack since differences are introduced into a large state. Obviously the security of AEGIS against forgery attack is stronger than that of Pelican MAC when the message or the tag gets modified. In Pelican MAC, four AES round functions are used to process each 16-byte message block; while in AEGIS, at least five AES round functions are used. Furthermore, the state size of AEGIS-128 is at least 5 times that of Pelican MAC, and it becomes much more difficult to eliminate the difference in the large state. A simple description of our analysis is given below. We notice that the first difference being injected into ciphertext would pass through five round functions without being affected by another ciphertext difference in AEGIS-128, and there are at least 26 active Sboxes being involved. Furthermore, when a difference passes through five AES round functions, the difference would be injected into each 16-byte element in the state. The difference cancellation in the state would involve at least 52 active Sboxes (at least 26 active Sboxes for generating the difference patterns, and 26 active Sboxes for generating the proper differences for difference cancellation). If we consider only a single differential path, the probability of the difference cancellation in the state is less than \(2^{-6 \times 52} = 2^{-312}\). This means that generating a state collision in the verification process requires at least \(2^{312}\) modifications to the ciphertext. Note that the differential attack here is slightly different from that against block cipher since the AEGIS verification process would guarantee that each forgery attack generates only one useful difference pair (the failed forgery attacks would not give outputs). The complexity \(2^{312}\) is significantly larger than that of the forgery based key recovery attack (\(2^{128}\), as illustrated at the beginning of Sect. 5.3). It shows that AEGIS-128 is strong against forgery attack when the ciphertext or tag gets modified. Multiple differential paths would not have a significant effect on the forgery attack here, since each differential path has to cancel its own differences being left in the state. Attacking AEGIS-256 is more difficult since it involves a larger state and more AES round functions.

We now analyze whether the noninvertible AEGIS state update function affects the security of the authentication of AEGIS. In AEGIS, a difference in the state could be eliminated even if there is no difference being introduced to cancel it. However, it would only happen if the difference in every 16-byte element is able to eliminate the difference in the next element after passing through an AES round function. It means that at least 26 active Sboxes are involved in this difference elimination process in AEGIS-128, and generating these particular differences in the state involves more than 26 additional active Sboxes. We consider that this type of weak state difference has a negligible effect on the security of the authentication of AEGIS.

The analysis given above shows that the authentication of AEGIS is very strong.

5.4 Other Attacks

There are weak states in AEGIS. In one type of weak states, all the 16-byte elements in a state are equal: consequently all the 16-byte elements in the next state would be equal (if the message block is 0). However, there are only \(2^{128}\) such states, so this type of weak state appears with probabilities \(2^{-512}\) and \(2^{-640}\) for AEGIS-128 and AEGIS-256, respectively. In another type of weak states, the four columns in each 16-byte element are equal and every 16-byte element has such a property: in this case, the same property would appear in the next state (if the message block also has such a property). However, there are only \(2^{32 \times 5} = 2^{160}\) such states in AEGIS-128 and \(2^{32 \times 6} = 2^{192}\) such states in AEGIS-256, so we expect that this type of weak state appears with probabilities \(2^{-480}\) and \(2^{-608}\) for AEGIS-128 and AEGIS-256, respectively.

6 The Performance of AEGIS

To process a 16-byte message block, AEGIS-128 and AEGIS-256 use five and six AES round functions, respectively. In AEGIS, the critical path for processing a 16-byte message block is about one AES round. The computational cost of AEGIS is about half that of AES for each message block, thus the speed of AEGIS is about twice that of AES when they are implemented using table lookups. For implementations based on bit-slicing techniques (e.g. Käsper and Schwabe [13]), the difference is smaller as AEGIS allows for 5 or 6 parallel AES operations rather than 8. AEGIS is very efficient when it is implemented using the AES new instructions (AES-NI) available on some x86 processors since 2010. With parallel AES round functions at each step, AEGIS can fully utilize the 3-stage pipeline in AES-NI in Intel Westmere processor, and can utilize most of the 8-stage pipeline in the AES-NI on the Intel Sandy Bridge processor. When implemented using AES-NI on the Sandy Bridge processor, the speed of AEGIS is about 8 times that of AES in CBC mode (encryption), and it is slightly faster than AES-CTR.

We implemented AEGIS in C code using AES-NI. We tested the speed on Intel Core i5-2540M 2.6 GHz processor (Sandy Bridge) running 64-bit Ubuntu 11.04 and turning off the Turbo Boost. The compiler being used is gcc 4.5.2, and the options “-O3 -msse2 -maes -mavx” are used. In our test, associated data is not considered, and 128-bit tag is used. The test is performed by processing a message repeatedly and printing out the final message. To ensure that the tag generation is not removed in the compiler optimization process, we use the tag as \(\mathop { IV}\nolimits \) for the next message. To ensure that the tag verification is not removed in the compiler optimization process, we count the number of failed verifications and print out the final result.

The performance is given in Table 1. For 4096-byte messages, the speed of AEGIS is around 0.7 cpb. According to Table 1, the performance of AEGIS is better than that of CCM, GCM and OCB3, ALE [5] and ASC-1 [11]. ALE and ASC-1 are two new authenticated encryption algorithms using AES instructions. In Table 1, the speed for multiple messages is not included since it is a common practice to compare the speeds for a single message. (For multiple long messages, the speeds of ALE and CCM are 1.2 and 3.1 cpb, respectively [5].) Note that the speeds given in Table 1 are for reference only since the ciphers are not evaluated under the same conditions.

Table 1. The speed comparison (in cycles per byte) for different message length. A plus sign (\(+\)) indicates that the data are from the ALE designers and the performance is measured on the Intel i5-2400 microprocessor.

In Table 1, AEGIS decryption-verification is slightly slower than encryption-authentication for two reasons: a ciphertext block needs to be decrypted first before it can be applied to update the state; and the verification process is slightly more expensive than tag generation. AEGIS-128 is only slightly slower than AEGIS-256 for long messages, although the computational cost of AEGIS-256 is about 20 % more than that of AEGIS-128. The reason is that on the Sandy Bridge microprocessor, AES-NI is implemented with an eight-stage pipeline, and both AEGIS-128 and AEGIS-256 do not fully utilize the pipeline, so the performance of AEGIS-128 is close to that of AEGIS-256. On the Intel Westmere microprocessors with a 3-stage AES-NI, AEGIS-256 is about 20 % slower than AEGIS-128.

7 Design Rationale

The goal of AEGIS is to achieve high performance and strong security. To achieve high performance, we use the AES round function which is now implemented on the latest Intel and AMD microprocessors as Intel AES New Instructions (AES-NI). AES-NI is very efficient for achieving diffusion and confusion on a modern microprocessor. In the design of AEGIS, we use several parallel AES round functions in each step so as to use most of the pipeline stages in AES instruction. AES instructions are implemented on Intel Westmere (06_25H, 06_2CH, 06_2FH) microprocessors with a three-stage pipeline (6 clock cycles), and are implemented on Intel Sandy Bridge (06_2AH) microprocessors with an eight-stage pipeline (8 clock cycles) [10]. Using several parallel AES round functions in AEGIS significantly improves its performance by utilizing the pipeline of AES-NI.

To achieve strong encryption security, we ensure that the \(\mathop { IV}\nolimits \) difference is randomized at the initialization stage, and the state cannot be recovered from the ciphertext. There are 10 steps and 16 steps in the initialization of AEGIS-128 and AEGIS-256, so we expect that the initialization of AEGIS is strong. To ensure that the state cannot be recovered from the ciphertext faster than brute force key search, we use a state in the design (80 bytes for AEGIS-128 and 96 bytes for AEGIS-256) in order to ensure that at least 20 and 30 AES round functions are involved in the state recovery attack against AEGIS-128 and AEGIS-256, respectively (the detailed analysis was omitted due to space restrictions). We avoid using a 64-byte state in AEGIS-128 since only 12 AES round functions would be involved in the state recovery attack, and we are not comfortable with its security.

To achieve strong authentication security, we try to ensure that any difference being introduced into the state would result in a particular difference with sufficiently small probability, so that it is difficult to launch a forgery attack. Our design is partly motivated by the design of Pelican MAC [6]. In Pelican MAC, a difference would pass through 4 AES round functions before meeting with another difference, so at least 25 active Sboxes are involved. The security proof against differential forgery attack is very simple for Pelican MAC (however, there is a birthday type attack against Pelican MAC due to its 128-bit size [28]). In AEGIS, the first difference in the state would pass through at least 5 AES round functions before being affected by another difference. In addition, when a difference passes through AES round functions, the differences are injected into every element in the state, so it becomes more difficult to eliminate the difference in the state.

8 Conclusion

In this paper, we introduced a dedicated authenticated encryption algorithm AEGIS. AEGIS is fast for both short and long messages, and it is the fastest authenticated encryption algorithm on the microprocessors with the AES instruction set. We performed a security analysis of the encryption and authentication of AEGIS. Our analysis shows that the encryption and authentication of AEGIS are strong. We welcome the security analysis of this new authenticated encryption algorithm.

Finally we state that AEGIS is not patented and it is freely available for all applications.