all repos — TinyCrypT @ b782db0b7210e4ed32cab69f8c24b9e5f617a740

Short and sweet classical cryptographic primitives

tinycrypt/chacha20-poly1305.h (view raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
#ifndef TNT_CC20_P1305_H
#define TNT_CC20_P1305_H

#include <stdint.h>

/// Implements the AEAD-ChaCha20-Poly1305 encryption and MAC algorithm defined
/// in RFC 8439
void tct_aead_chacha20_poly1305 (const uint8_t *aad, const uint64_t aad_len,
                                 const uint8_t *key, const uint8_t *nonce,
                                 const uint8_t *plaintext,
                                 const uint64_t plaintext_len,
                                 uint8_t *cipher_out, uint8_t *mac_out);

#endif