@hackbg/miscreant-esm
Version:
(ESM port) Misuse resistant symmetric encryption library providing AES-SIV (RFC 5297), AES-PMAC-SIV, and STREAM constructions
20 lines (19 loc) • 685 B
TypeScript
import { ICTRLike } from "../../interfaces.dist";
import SoftAes from "./aes.dist";
/**
* AES-CTR (counter) mode of operation.
*
* Uses a non-constant-time (lookup table-based) software AES implementation.
* See soft/aes.ts for more information on the security impact.
*
* Note that CTR mode is malleable and generally should not be used without
* authentication. Instead, use an authenticated encryption mode, like AES-SIV!
*/
export default class SoftAesCtr implements ICTRLike {
private _counter;
private _buffer;
private _cipher;
constructor(cipher: SoftAes);
clear(): this;
encryptCtr(iv: Uint8Array, plaintext: Uint8Array): Promise<Uint8Array>;
}