XEX (XOR-Encrypt-XOR) is a tweakable block cipher construction that forms the foundation of the XTS disk encryption mode. It uses a simple but effective approach: XOR the plaintext with a tweak-derived mask, encrypt with a standard block cipher, then XOR again with the same mask. This provides strong tweakable encryption suitable for disk encryption.
| Property | Value |
|---|---|
| Category | Cipher Modes |
| Sub-category | Tweakable Block Cipher |
| Security status | π‘οΈ Secure |
| Complexity | Intermediate |
| Inventor | Phillip Rogaway |
| Year | 2004 |
| Origin | πΊπΈ United States |
| Source | algorithms/modes/xex.js |
| Flag | Value |
|---|---|
RequiresIV |
No |
Status: π‘οΈ Secure
| Issue | Description | Mitigation |
|---|---|---|
| Superseded by XTS | XEX is now primarily used as the foundation for XTS mode rather than directly. XTS provides additional security improvements. | β |
| Single-Key Weakness | Pure XEX with a single key has some theoretical weaknesses that XTS addresses by using two independent keys. | β |
1 vector ship with this algorithm and run in the test suite. Byte values are hexadecimal.
Vector 1 β XEX round-trip test - single block
| Field | Value |
|---|---|
key |
2b7e151628aed2a6abf7158809cf4f3c |
tweakKey |
603deb1015ca71be2b73aef0857d7781 |
tweak |
000102030405060708090a0b0c0d0e0f |
input |
6bc1bee22e409f96e93d7e117393172a |
expected |
(empty) |