Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content
BY-NC-ND 3.0 license Open Access Published by De Gruyter January 11, 2018

A fundamental flaw in the ++AE authenticated encryption mode

  • Hassan Qahur Al Mahri EMAIL logo , Leonie Simpson , Harry Bartlett ORCID logo , Ed Dawson and Kenneth Koon-Ho Wong

Abstract

In this article, we analyse a block cipher mode of operation for authenticated encryption known as ++AE (plus-plus-AE). We show that this mode has a fundamental flaw: the scheme does not verify the most significant bit of any block in the plaintext message. This flaw can be exploited by choosing a plaintext message and then constructing multiple forged messages in which the most significant bit of certain blocks is flipped. All of these plaintext messages will generate the same authentication tag. This forgery attack is deterministic and guaranteed to pass the ++AE integrity check. The success of the attack is independent of the underlying block cipher, key or public message number. We outline the mathematical proofs for the flaw in the ++AE algorithm. We conclude that ++AE is insecure as an authenticated encryption mode of operation.

MSC 2010: 94A60; 68P25

1 Introduction

The ++AE proposal [8] was submitted to the Competition for Authenticated Encryption: Security, Applicability, and Robustness (CAESAR) [2] in 2014. This block cipher mode of operation is intended to provide authenticated encryption with associated data (AEAD). An Authenticated Encryption (AE) scheme is a symmetric-key encryption scheme that provides both data confidentiality and integrity assurance for messages [1]. In Authenticated Encryption with Associated Data (AEAD), some portions of the message (the associated data) do not require confidentiality but still require integrity assurance.

The ++AE cipher design is similar to AE schemes previously proposed by Recacha: IOBC [6] and IOC [7]. All of these designs use a block cipher in Electronic CodeBook (ECB) mode with cross block chaining and a detectable redundancy paradigm for the integrity check, rather than computing a message authentication code (MAC). An integrity check vector (ICV) that is known to both sender and receiver is appended to the plaintext message before encryption and encrypted along with the other plaintext. When the ciphertext is decrypted and the plaintext is recovered, the decryption of the final block is compared to the known ICV to check for possible alterations in the message during transmission. The method used for determining the value of the integrity check vector (ICV) in ++AE is different to that used for IOBC and IOC, although the verification process follows the same concept. If changes to the ciphertext occur, the block chaining mechanism is intended to propagate these errors during decryption so that the recovered ICV is different to the original ICV value, thus revealing the integrity breach.

The block chaining mechanisms used in IOBC and IOC have previously been shown to be flawed. Mitchell presented a known plaintext forgery attack on IOBC in [5] with complexity of 2b/3, where b is the underlying cipher block length. Bottinelli, Reyhanitabar and Vaudenay [3] presented a chosen plaintext forgery attack on IOC with a success rate of 1-3×2-b. The ++AE proposal uses a different block chaining mechanism, which involves repeated use of two types of addition: bitwise XOR and integer addition modulo the block size.

Previously, we identified a weakness in the integrity assurance mechanism of the ++AE mode [4]. We identified certain groups of four consecutive plaintext blocks that cause the internal values of the block cross chaining mechanism to repeat. We demonstrated the exploitation of that weakness in chosen plaintext forgery attacks that were guaranteed to pass the ++AE integrity test regardless of the encryption key, the block cipher used and the block length.

This article reveals a far more serious weakness in the integrity assurance mechanism of ++AE. This flaw is more severe than [4] because it applies to any plaintext message. We show that the integrity mechanism in ++AE does not verify the most significant bit of any plaintext block. Flipping the most significant bit in any plaintext block has no effect on the encryption of subsequent plaintext blocks. Consequently, no error propagates and the final MDC value is not affected.

This article is arranged as follows: Section 2 defines the notation used and briefly describes the ++AE scheme. Section 3 provides the mathematical proofs relating to the basic operations of ++AE. In Section 3 we prove a fundamental flaw in ++AE: that the most significant bit of each plaintext block does not affect the encryption of the integrity check vector. The last section draws a conclusion.

2 Description of ++AE

This section describes the ++AE block cipher mode of operation, based on Recacha’s two submissions [8] to the CAESAR competition: v1.0 in March 2014 and the revised version v1.1 in April 2014. The encryption and decryption procedures for ++AE are identical in both versions, and our analysis applies to both.

2.1 Notations

The following notation will be used consistently throughout this article:

  1. K is the k-bit key used for the block cipher.

  2. b is the block length of the block cipher.

  3. Pi is the ith block of the plaintext message.

  4. Ci is the ith block of the corresponding ciphertext message.

  5. N is the number of blocks in the plaintext message.

  6. M is the number of blocks of associated data.

  7. Qi,Ii are secret b-bit internal chaining vectors at the ith block.

  8. ICV stands for Integrity Check Vector: a secret b-bit value changed for each message.

  9. MDC stands for Modification Detection Code: a b-bit authentication tag, dependent on both the message content and the ICV.

  10. S is the public message number used for initialising vectors Qi and Ii and for calculating the integrity check vector ICV.

  11. eK is the block cipher encryption function under the key K.

  12. dK is the block cipher decryption function under the key K.

  13. [X]i is the ith bit of the bit string X.

  14. a is a2b-1 (the result of complementing the most significant bit of a).

  15. + is the arithmetic addition operation modulo 2b.

  16. - is the arithmetic subtraction operation modulo 2b.

  17. is the bit-wise exclusive OR operation.

2.2 ++AE specification

Suppose that P=(P1,P2,,PN) is an N-block plaintext message to be ++AE encrypted, using the symmetric key K and the public value S previously shared between sender and receiver. Note that S should be different for each message. To begin, two secret b-bit values, denoted IVa and IVb, are computed as follows:

IVa=eK(S),IVb=eK(IVa).

Integrity is assured by appending an integrity check vector ICV to the end of the plaintext message. The value of ICV is computed as follows:

ICV=(IVaS)+(IVb(N+M)).

The encrypted ICV block is referred to as a Modification Detection Code (MDC). ++AE uses pairs of internal chaining vectors, Qi and Ii. Changes in the ciphertext should propagate through the chaining vectors to the last block during decryption, resulting in an incorrect decryption of MDC to ICV. Only messages with the expected ICV are accepted as authentic. The ++AE encryption and decryption operations are described in Table 1 and illustrated in Figure 1.

Table 1

++AE encryption and decryption algorithms.

Algorithm 1: ++AE encryptionAlgorithm 2: ++AE decryption
𝐄𝐧𝐜𝐫𝐲𝐩𝐭K(S,P)𝐃𝐞𝐜𝐫𝐲𝐩𝐭K(S,CMDC)
01. Q0IVa01. Q0IVa
02. I0IVb02. I0IVb
03. fori1toNdo03. fori1toNdo
04.  IiPiQi-104.  XidK(Ci)
05.  QiIi+Ii-1+Qi-105.  QiXiIi-1
06.  XiQiIi-106.  IiQi-(Ii-1+Qi-1)
07.  CieK(Xi)07.  PiIiQi-1
08. end for08. end for
09. QN+1(ICVQN)+IN+QN09. QN+1dK(MDC)IN
10. MDCeK(QN+1IN)10. IN+1QN+1-IN-QN
11. returnCMDC11. ICVIN+1QN
12. ifICV=ICVthen
13.  returnP={P1,,PN}
14. else
15.  return INVALID
16. end if
Figure 1 ++AE encryption and decryption operations.
Figure 1

++AE encryption and decryption operations.

3 Fundamental flaw in ++AE

This section explains how the chaining mechanism in ++AE results in a fundamental flaw in the integrity assurance mechanism. We provide the mathematical foundations before explaining the flaw.

Lemma 3.1.

Let a be a b-bit binary number. Then

a2b-1a±2b-1(mod 2b).

Proof.

Let j=0b-1[a]j.2j be the binary representation of a. Then, since 2b-1-2b-1(mod 2b),

a2b-1=j=0b-2[a]j.2j+([a]b-11)2b-1
=j=0b-2[a]j.2j+(1-[a]b-1)2b-1
j=0b-1[a]j.2j+2b-1-[a]b-1.2b
a±2b-1(mod 2b).

Theorem 3.2.

Suppose a plaintext block Pj is submitted for ++AE encryption, resulting in the ciphertext block Cj and the inner vectors Qj and Ij. If Pj is replaced by Pj=Pj2b-1, then

  1. Ij will be replaced by Ij=Ij2b-1,

  2. Qj will be replaced by Qj=Qj2b-1,

  3. Xj will be replaced by Xj=Xj2b-1.

Proof.

We use Ij, Qj and Xj to denote the new values of Ij, Qj and Xj, respectively. Using Lemma 3.1 and Algorithm 1, we have

Ij=PjQj-1=PjQj-12b-1=Ij2b-1=Ij,
Qj=(Ij+2b-1)+Ij-1+Qj-1=(Ij+Ij-1+Qj-1)+2b-1=Qj,
Xj=QjIj-1=Qj2b-1Ij-1=Xj.

Theorem 3.3.

Suppose a plaintext block Pj is submitted for ++AE encryption, resulting in the ciphertext block Cj. If Pj is submitted for encryption a second time, but with either or both of Qj-1 and Ij-1 replaced by Qj-1 and Ij-1, respectively, then

  1. If Ij-1 is replaced by Ij-1, then Ij=Ij, Qj=Qj, Xj=Xj,

  2. If Qj-1 is replaced by Qj-1, then Ij=Ij, Qj=Qj, Xj=Xj,

  3. If both Ij-1 and Qj-1 are replaced by Ij-1 and Qj-1, then Ij=Ij, Qj=Qj, Xj=Xj,

  4. for any of cases (a) to (c), Xi=Xi for all ij.

Proof.

We again apply Lemma 3.1 to the ++AE algorithm.

(a) If Ij-1 is replaced by Ij-1, then

Ij=PjQj-1=Ij,
Qj=Ij+Ij-1+Qj-1=Ij+Ij-1+2b-1+Qj-1=(Ij+Ij-1+Qj-1)+2b-1=Qj,
Xj=QjIj-1=Qj2b-1Ij-12b-1=Xj.

(b) Similarly, if Qj-1 is replaced by Qj-1, then

Ij=PjQj-1=PjQj-12b-1=Ij2b-1=Ij,
Qj=Ij+Ij-1+Qj-1=Ij+2b-1+Ij-1+Qj-1-2b-1=Qj,
Xj=QjIj-1=QjIj-1=Xj.

The proof of case (c) follows similarly, while the proof of (d) follows by repeated application of (a), (b) or (c) as relevant. ∎

From Theorem 3.2, complementing the most significant bit of a plaintext block Pj will complement the most significant bit of the internal values Ij, Qj and Xj. From Theorem 3.3, if the values for Ij and/or Qj are complemented, the encryption of the subsequent plaintext Pj+1 is not affected. Theorems 3.2 and 3.3 show that the MDC is unaffected by any change in the most significant bit of any plaintext block, except for the last block (PN+1=ICV). Consequently, the decryption of this MDC will give the correct ICV for the altered message. In other words, the integrity mechanism in ++AE does not verify the most significant bit of any plaintext block.

The purpose of the integrity assurance mechanism is to detect alterations to the received data either due to accidental or intentional modification. However, the integrity assurance mechanism in ++AE does not detect alterations to the most significant bit in any plaintext block. This is a fundamental flaw. This weakness allows a malicious sender or receiver to dispute the content of a validly sent message by claiming that the message is different in the most significant bit of any subset of the message blocks.

Based on this flaw, a straightforward chosen plaintext forgery attack would also be possible, except that the ++AE specification requires a different public value S to be used for each message encrypted. If nonce-reuse is possible, then plaintext forgeries are easily constructed.

4 Conclusion

In this article, we analysed the security of the ++AE authenticated encryption mode against forgery attacks and revealed a serious flaw in the integrity mechanism of ++AE: it does not verify the most significant bit of any plaintext block except the last block (PN+1=ICV). This is a fundamental flaw in the authentication mechanism, which could be maliciously exploited by either sender or receiver. Flaws in ++AE have been previously reported [4], but this is far more serious.

Note that this flaw is based on the properties of the cross chaining structure used in ++AE. It applies regardless of the choice of the underlying block cipher and independently of the chosen key or the message. This mode should not be considered suitable for authenticated encryption.


Communicated by Otokar Grosek


Funding statement: Hassan Qahur Al Mahri is supported by a scholarship funded by the Government of the Sultanate of Oman.

References

[1] M. Bellare and C. Namprempre, Authenticated encryption: Relations among notions and analysis of the generic composition paradigm, Advances in Cryptology – ASIACRYPT 2000, Springer, Berlin (2000), 531–545. 10.1007/3-540-44448-3_41Search in Google Scholar

[2] D. Bernstein, Cryptographic competitions: CAESAR, preprint (2014), http://competitions.cr.yp.to/caesar-submissions.html. Search in Google Scholar

[3] P. Bottinelli, R. Reyhanitabar and S. Vaudenay, Breaking the IOC authenticated encryption mode, Progress in Cryptology – AFRICACRYPT 2014, Springer, Berlin (2014), 126–135. 10.1007/978-3-319-06734-6_8Search in Google Scholar

[4] H. Q. A. Mahri, L. Simpson, H. Bartlett, E. Dawson and K.-H. Wong, Forgery attacks on ++AE authenticated encryption mode, Proceedings of the Australasian Computer Science Week Multiconference – ACSW ’16. ACM, New York (2016), Article No. 33. 10.1145/2843043.2843355Search in Google Scholar

[5] C. Mitchell, Analysing the IOBC authenticated encryption mode, Information Security and Privacy – ACISP 2013, Springer, Berlin (2013), 1–12. 10.1007/978-3-642-39059-3_1Search in Google Scholar

[6] F. Recacha, IOBC: A new chaining method for block ciphering (in Spanish), Proceedings: IV Reunion Espanola de Cryptologia, Valladolid (1996), 85–92. Search in Google Scholar

[7] F. Recacha, IOC: The most lightweight authenticated encryption mode?, preprint (2013), http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.298.1691&rep=rep1&type=pdf. Search in Google Scholar

[8] F. Recacha, ++AE v1.1, preprint (2014), http://competitions.cr.yp.to/caesar-call.html. Search in Google Scholar

Received: 2016-6-28
Revised: 2017-10-24
Accepted: 2017-12-15
Published Online: 2018-1-11
Published in Print: 2018-3-1

© 2018 Walter de Gruyter GmbH, Berlin/Boston

This article is distributed under the terms of the Creative Commons Attribution Non-Commercial License, which permits unrestricted non-commercial use, distribution, and reproduction in any medium, provided the original work is properly cited.

Downloaded on 1.3.2025 from https://www.degruyter.com/document/doi/10.1515/jmc-2016-0037/html
Scroll to top button