Interface CounterIvOptions

Options for Initialization Vectors using fixed+random+counter structure.

IVs following this construction method have three parts:

  1. fixed bits, specified in options.
  2. random bits, different for each key and in each session.
  3. counter bits, monotonically increasing for each plaintext/ciphertext block.
interface CounterIvOptions {
    blockSize: number;
    counterBits: number;
    fixed?: bigint | Uint8Array<ArrayBufferLike>;
    fixedBits?: number;
    ivLength: number;
}

Hierarchy (View Summary)

Properties

blockSize: number

Crypto algorithm block size in octets. If plaintext and ciphertext have different lengths, the longer length is considered.

counterBits: number

Number of counter bits.

fixed?: bigint | Uint8Array<ArrayBufferLike>

Fixed portion.

Required if fixedBits is positive. This may be specified as a bigint or a Uint8Array. If it's a Uint8Array, it must have at least fixedBits bits. The least significant bits are taken.

fixedBits?: number

Number of fixed bits.

0

ivLength: number

IV length in octets.