AEAD

interface AEAD(source)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
abstract val aeadId: Int

RFC 9180 aead_id

Link copied to clipboard
abstract val Nk: BitLength

The length in bytes of a key for this algorithm.

Link copied to clipboard
abstract val Nn: BitLength

The length in bytes of a nonce for this algorithm.

Link copied to clipboard
abstract val Nt: BitLength

The length in bytes of the authentication tag for this algorithm.

Functions

Link copied to clipboard
abstract fun Open(key: ByteArray, nonce: ByteArray, aad: ByteArray?, ct: ByteArray): ByteArray

Decrypt ciphertext and tag ct using associated data aad with symmetric key key and nonce nonce, returning plaintext message pt. This function can raise an OpenError or MessageLimitReachedError upon failure.

Link copied to clipboard
abstract fun Seal(key: ByteArray, nonce: ByteArray, aad: ByteArray?, pt: ByteArray): ByteArray

Encrypt and authenticate plaintext pt with associated data aad using symmetric key key and nonce nonce, yielding ciphertext and tag ct. This function can raise a MessageLimitReachedError upon failure.