Constant-Time Crypto
Definition
Implementation techniques that avoid secret-dependent timing and memory-access patterns under a specified model. They do not automatically eliminate physical power or electromagnetic leakage.
- Field
- Symmetric cryptosystem implementation
- Defends against
- Timing, cache, and power side channels
- Hardware example
- AES-NI is constant-time by design
- Vulnerable example
- Software AES using T-tables
Common questions
Why does a T-table AES implementation leak the key through timing?+
T-tables are lookup tables indexed by intermediate cipher values that depend on the secret key, and CPU cache access time differs depending on whether a value is cached, so an attacker who measures execution time or cache state across many operations can infer which table entries were accessed and recover key bits.
Why does a forensic examiner care whether an encryption implementation is constant-time?+
A non-constant-time implementation can sometimes be attacked to recover keys without ever obtaining the plaintext or the key file directly, which matters when assessing whether an encrypted device or container was realistically breakable by a given adversary, or when evaluating a vendor's claim of security.
Related terms
- AEAD
- Authenticated encryption with associated data. It protects confidentiality and integrity under its assumptions and can authenticate unencrypted context.
- AES-NI
- An x86 instruction-set extension for AES operations. Acceleration can avoid classic table-lookup leakage without proving the whole application immune to side channels.
- Block Cipher
- A keyed permutation of fixed-size blocks; AES uses 128-bit blocks and DES/Blowfish use 64-bit blocks. A construction handles larger data.
- Mode of Operation
- A defined way to use a block cipher for a security task. Padding, IVs and authentication depend on the chosen mode.
- Stream Cipher
- A construction generating keystream for combination with plaintext. Key/nonce/counter rules are essential; encryption alone need not authenticate.