Paper 2024/1554

Breaking, Repairing and Enhancing XCBv2 into the Tweakable Enciphering Mode GEM

Amit Singh Bhati, COSIC, KU Leuven, Belgium, 3MI Labs, Belgium
Michiel Verbauwhede, COSIC, KU Leuven, Belgium
Elena Andreeva, TU Wien, Austria
Abstract

Tweakable enciphering modes (TEMs) provide security in a variety of storage and space-critical applications like disk and file-based encryption, and packet-based communication protocols, among others. XCB-AES (known as XCBv2) is specified in the IEEE 1619.2 standard for encryption of sector-oriented storage media and it comes with a proof of security for block-aligned input messages. In this work, we demonstrate the $\textit{first}$ and most efficient plaintext recovery attack on XCBv2. We show that XCBv2 is $\textit{insecure}$ also for full block messages by recovering the plaintext (all except the final block) using minimal number of queries namely $\textit{only}$ two. We demonstrate that our attack further applies to the HCI and MXCB TEMs, which follow a similar design approach to XCBv2. Following the responsible disclosure process, we communicated the attack details to IEEE and the authors of XCB-AES. The authors have confirmed the validity of our attack on 02/09/2024. Our next contribution is to strengthen the provable security of XCB-AES (claimed $n/3$ bits in queried blocks). We propose a new modular TEM called GEM which can be seen as a generalization of the Hash-CTR-Hash approach as used in XCB-style and HCTR-style TEMs. We are able to prove that GEM achieves full $n$-bit security using $\textit{only}$ $n$-bit PRP/PRF. We also give two concrete GEM instantiations: $\mathsf{KohiNoor}$ and $\mathsf{DaryaiNoor}$, both of which are based on AES-128 and GHASH-256, and internally use variants of the CTR-based weak pseudorandom functions GCTR-3 and SoCTR, respectively. SoCTR uses AES-128 and GCTR-3 is based on $\mathsf{ButterKnife}$-256. Our security proofs show that both $\mathsf{KohiNoor}$ and $\mathsf{DaryaiNoor}$ provide full $n$-bit security. From applications perspective, $\mathsf{DaryaiNoor}$ addresses the need for reusing classical components, while $\mathsf{KohiNoor}$ enhances performance by leveraging a more modern primitive based on the AES/Deoxys round function. Our implementation demonstrate competitive performance: For typical 4KiB sector size, $\mathsf{KohiNoor}$'s performance is on par with AES$_6$-CTET+, yet achieving higher standard security guarantees. $\mathsf{DaryaiNoor}$ is on par with AES-CTET+ performance-wise while also maintaining higher security with standard components. Our GEM instances triple the security margin of XCB-AES and double that of HCTR2 at the cost of performance loss of only $12\%$ ($\mathsf{KohiNoor}$) and $68\%$ ($\mathsf{DaryaiNoor}$) for 4KiB messages.

Note: Revised the text in response to Wang et al.'s recent work (How to Recover the Full Plaintext of XCB, https://eprint.iacr.org/2024/1527) and included a discussion in Appendix E, where we -- 1) present a generalized version of their attack 2 to improve its strength from breaking the STPRP security to even breaking the basic SPRP security of all targeted XCB variants. 2) discuss the relation between this generalized attack and our shared difference attack. 3) apply the generalized attack to XCBv3 (a variant of XCBv1) to point out the exact flaw. 4) clarify that GEM mode remains unaffected by these attacks.

Metadata
Available format(s)
PDF
Category
Secret-key cryptography
Publication info
Preprint.
Keywords
tweakable enciphering modesVIL-STPRPXCBv2HCIIEEE 1619.2disk-sector encryptionGCTRSoCTR
Contact author(s)
amitsingh bhati @ esat kuleuven be
michiel verbauwhede @ esat kuleuven be
elena andreeva @ tuwien ac at
History
2024-10-12: last of 3 revisions
2024-10-03: received
See all versions
Short URL
https://ia.cr/2024/1554
License
Creative Commons Attribution
CC BY

BibTeX

@misc{cryptoeprint:2024/1554,
      author = {Amit Singh Bhati and Michiel Verbauwhede and Elena Andreeva},
      title = {Breaking, Repairing and Enhancing {XCBv2} into the Tweakable Enciphering Mode {GEM}},
      howpublished = {Cryptology {ePrint} Archive, Paper 2024/1554},
      year = {2024},
      url = {https://eprint.iacr.org/2024/1554}
}
Note: In order to protect the privacy of readers, eprint.iacr.org does not use cookies or embedded third party content.