AES
AES block cipher selector.
from oxcrypto.cipher.aes import AES
from oxcrypto.cipher.hazmat import decrypt_block, encrypt_block
cipher = AES.AES256
key = cipher.generate_key()
block = bytes(cipher.block_size)
assert decrypt_block(key, encrypt_block(key, block, cipher=cipher), cipher=cipher) == blockVariants: AES.AES128, AES.AES192, AES.AES256.
Standard: FIPS 197.
The aes crate has one published audit by NCC Group (2020, covering an earlier release than 0.9.2) and is written to execute in constant time. oxcrypto has not verified either property independently.
Pass the selector as cipher= to any mode. Raw single-block functions live in oxcrypto.cipher.hazmat.