import type { WasmSource } from '../wasm-source.js'; /** * Load and initialise the AES WASM module from `source`. * Must be called before constructing any AES class. * @param source WASM binary, gzip+base64 string, URL, ArrayBuffer, Uint8Array, * pre-compiled WebAssembly.Module, Response, or Promise */ export declare function aesInit(source: WasmSource): Promise; export type { WasmSource }; export { isInitialized } from '../init.js'; /** * Low-level AES block cipher, raw ECB encrypt + decrypt. * * AES-128/192/256 supported. `loadKey` accepts 16, 24, or 32 byte keys; * Nr (10, 12, or 14) is derived and persisted in WASM memory between * `loadKey` and the cipher calls. * * Decrypt uses the FIPS 197 §5.3.5 Equivalent Inverse Cipher: the round * loop mirrors encrypt, and round keys 1..Nr-1 are pre-transformed by * InvMixColumns inside `loadKey`. * * Atomic (stateless): each method call is independent. Does not hold * exclusive module access. Call `dispose()` after use to wipe WASM key * material. */ export declare class AES { private readonly x; constructor(); /** * Expand `key` into the WASM key schedule (forward + EqInvCipher * inverse round keys). Must be called before `encryptBlock` or * `decryptBlock`. * @param key 16, 24, or 32 bytes (AES-128 / 192 / 256) */ loadKey(key: Uint8Array): void; /** * Encrypt one 128-bit block with the previously loaded key schedule. * FIPS 197 §5.1 Algorithm 1, Nr ∈ {10, 12, 14}. * @param plaintext 16-byte plaintext block * @returns 16-byte ciphertext block */ encryptBlock(plaintext: Uint8Array): Uint8Array; /** * Decrypt one 128-bit block with the previously loaded key schedule. * FIPS 197 §5.3.5 Equivalent Inverse Cipher, Nr ∈ {10, 12, 14}. * @param ciphertext 16-byte ciphertext block * @returns 16-byte plaintext block */ decryptBlock(ciphertext: Uint8Array): Uint8Array; /** Wipe WASM key material and intermediate buffers. */ dispose(): void; } export { AESCbc } from './aes-cbc.js'; export { AESCtr } from './aes-ctr.js'; export { AESGCM } from './aes-gcm.js'; export { AESGCMSIV } from './aes-gcm-siv.js'; export { AESGenerator } from './generator.js'; export { AESGCMSIVCipher } from './cipher-suite.js';