Supported algorithms
| Algorithm | Key size | Block size | Rounds | Status (2025) |
|---|---|---|---|---|
| AES-128 | 128-bit | 128-bit | 10 | Acceptable — good for most applications |
| AES-192 | 192-bit | 128-bit | 12 | Strong — exceeds most requirements |
| AES-256 | 256-bit | 128-bit | 14 | Excellent — NIST recommended, quantum-resistant symmetric |
| DES | 56-bit | 64-bit | 16 | Broken — brute-forceable in seconds. Never use. |
| 3DES (Triple DES) | 112–168-bit | 64-bit | 48 | Deprecated (NIST 2023) — vulnerable to Sweet32 attack |
| Twofish | 256-bit | 128-bit | 16 | Strong — AES finalist, no known practical attacks |
| Serpent | 256-bit | 128-bit | 32 | Excellent — highest security margin of any AES finalist |
What is a side-channel attack?
A side-channel attack exploits physical information leaked by a cryptographic implementation — not weaknesses in the algorithm's mathematics. The most common types are:
- Timing attacks — variations in execution time between different inputs leak key-dependent branches or data-dependent table lookups.
- Power analysis (SPA / DPA) — measuring a device's power consumption during encryption reveals key bits through correlations with intermediate values.
- Cache-timing attacks — the CPU cache behaviour during AES T-table lookups can leak the key to a co-resident attacker (e.g. on shared cloud infrastructure).
- Differential fault analysis — deliberately introducing hardware faults during computation and comparing faulty and correct outputs to recover the key.
Why ECB mode is insecure
ECB (Electronic Code Book) mode encrypts each block independently using the same key. Identical plaintext blocks always produce identical ciphertext blocks, which leaks patterns in the data. The famous "ECB penguin" — an image of a penguin that remains clearly visible after ECB encryption — illustrates this perfectly. Always use AES-GCM (authenticated encryption) or at minimum AES-CBC with a random IV and HMAC-SHA256 for authentication.
References
- NIST FIPS 197 — Advanced Encryption Standard (AES)
- NIST SP 800-131A Rev 2 — Transitioning Cryptographic Algorithms (2019) — Triple DES deprecated
- D. J. Bernstein — "Cache-timing attacks on AES" (2005)
- Kaliski & Yin — "On Differential and Linear Cryptanalysis of the RC5 Encryption Algorithm"
- B. Schneier et al. — "Twofish: A 128-Bit Block Cipher" (1998)
- R. Anderson et al. — "Serpent: A Proposal for the Advanced Encryption Standard" (1998)
