regardless of the key or plaintext values. There are no data-dependent branches or memory accesses that could leak information through timing.
Copyright
Copyright © 2025-2026, DDN (D Developer Network) Members
License
BSD-3-Clause
AES (Rijndael) Block Cipher - Constant-Time Implementation.
This implementation uses a boolean circuit for the S-box computation instead of table lookups, providing resistance against cache-timing side-channel attacks.
Security
regardless of the key or plaintext values. There are no data-dependent branches or memory accesses that could leak information through timing.
Implementation of the AES block cipher (FIPS 197).
Supports 128, 192, and 256-bit keys.
Constant-Time Implementation: This class uses a boolean circuit to compute the S-box, eliminating table lookups that are vulnerable to cache-timing attacks. All operations execute in constant time regardless of the data being processed.
void encrypt(const(ubyte)[] input, ubyte[] output)Encrypts a single 16-byte block.void decrypt(const(ubyte)[] input, ubyte[] output)Decrypts a single 16-byte block.this(const(ubyte)[] key)Constructs a new AES cipher with the given key.