Skip to contents

Phase 3JJJ1. Inverse of morie_crypto_chacha20_poly1305_encrypt(). Accepts the full ciphertext || tag buffer (concatenate as c(ct, tag)).

Usage

morie_crypto_chacha20_poly1305_decrypt(key, nonce, ct_with_tag, aad = raw(0))

Arguments

key

32-byte raw vector.

nonce

12-byte raw vector.

ct_with_tag

Raw vector containing ciphertext appended with the 16-byte tag.

aad

Optional raw vector of additional authenticated data.

Value

Decrypted plaintext as raw vector.