Block mode family

AES-XTS

The tweakable disk-encryption mode of IEEE 1619 and NIST SP 800-38E

standard 2 variants IEEE 1619; NIST SP 800-38E

Overview

XTS is a tweakable block cipher mode designed for encrypting data on storage devices, where each sector must be encrypted in place without expanding its size. It is standardised in IEEE 1619 and approved by NIST in SP 800-38E.

XTS uses two AES keys. The first encrypts the sector number to create a tweak; the tweak is multiplied by successive powers of α in GF(2^128) to give a distinct mask for each 16-byte block in the sector. Each block is XORed with its mask, encrypted with the second key, and XORed with the mask again (the XEX construction). Sectors whose length is not a multiple of 16 bytes are handled with ciphertext stealing.

NextSSL includes AES-128-XTS and AES-256-XTS, which use 256-bit and 512-bit combined keys. XTS is used by BitLocker, FileVault 2, LUKS/dm-crypt, VeraCrypt and self-encrypting drives. XTS keeps sector size unchanged, which is essential for block devices. It is also standardised for self-encrypting drives through the TCG Opal specifications, and is the most widely deployed storage encryption mode.

History

2007–2018
  1. AES-XTS published

  2. Specified in NIST SP 800-38E

  3. Specified in IEEE 1619-2018

How it works

  1. Encrypt the sector number with key 2 to get the tweak
  2. Multiply the tweak by α for each successive block
  3. XOR mask, encrypt with key 1, XOR mask again
  4. Use ciphertext stealing for a partial last block

Security notes

XTS provides confidentiality but not integrity: an attacker with write access can replace blocks with earlier versions or randomise them. Because it is deterministic per sector and position, it reveals when the same data is written to the same location. The two keys must be different.

Typical uses

Full-disk and block-device encryptionEncrypting fixed-size storage sectors

Variants in NextSSL

2
AlgorithmTierSizes (bytes)StandardsAPI
AES-128-XTS
aes-128-xts
standard FIPS key 32 · nonce 16 · block 16 IEEE 1619-2018, NIST SP 800-38E safe
AES-256-XTS
aes-256-xts
standard FIPS key 64 · nonce 16 · block 16 IEEE 1619-2018, NIST SP 800-38E safe

Frequently asked questions

Which AES-XTS variants does NextSSL include?

NextSSL registers 2 AES-XTS variants: aes-128-xts, aes-256-xts.