Arcium LogoArcium TS SDK Docs

Aes192Cipher

AES-192 cipher in Counter (CTR) mode, using SHA3-256 to derive the key from a shared secret. See: https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-38a.pdf (Section 6.5) for details on CTR mode.

Extends

  • AesCtrCipher

Constructors

Constructor

new Aes192Cipher(sharedSecret): Aes192Cipher

Construct an AES-192 cipher instance using a shared secret. The key is derived using SHA3-256.

Parameters

ParameterTypeDescription
sharedSecretUint8ArrayShared secret to derive the AES key from.

Returns

Aes192Cipher

Overrides

AesCtrCipher.constructor

Properties

PropertyModifierTypeInherited from
keyprotectedUint8ArrayAesCtrCipher.key

Methods

decrypt()

decrypt(ciphertext, nonce): Uint8Array

Decrypt the ciphertext array in Counter (CTR) mode.

Parameters

ParameterTypeDescription
ciphertextUint8ArrayData to decrypt.
nonceUint8Array8-byte nonce for CTR mode.

Returns

Uint8Array

Decrypted plaintext as a Uint8Array.

Throws

Error if the nonce is not 8 bytes long.

Inherited from

AesCtrCipher.decrypt


encrypt()

encrypt(plaintext, nonce): Uint8Array

Encrypt the plaintext array in Counter (CTR) mode.

Parameters

ParameterTypeDescription
plaintextUint8ArrayData to encrypt.
nonceUint8Array8-byte nonce for CTR mode.

Returns

Uint8Array

Encrypted ciphertext as a Uint8Array.

Throws

Error if the nonce is not 8 bytes long.

Inherited from

AesCtrCipher.encrypt