INNER CODE UNIT · TypeScript

AESKW

StableLib/stablelib · packages/aes-kw/aes-kw.ts:16

export class AESKW {
    private _inputBuffer: Uint8Array;
    private _outputBuffer: Uint8Array;
    private _cipher: BlockCipher;
    private _iv: Uint8Array;

    /**
     * Constructs AESKW instance with the given key.
     *
     * @param key: The key encryption key used to wrap and un-wrap
     */
    constructor(key: Uint8Array) {
        // Set the cipher to AES
        this._cipher = new AES(key);

        // Set the initial value to that documented in section 2.2.3.1
        // @see https://tools.ietf.org/html/rfc3394#section-2.2.3.1
        this._iv = new Uint8Array([0xa6, 0xa6, 0xa6, 0xa6, 0xa6, 0xa6, 0xa6, 0xa6]);

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…