20#ifndef MBEDTLS_CHACHA20_H
21#define MBEDTLS_CHACHA20_H
30#define MBEDTLS_ERR_CHACHA20_BAD_INPUT_DATA -0x0051
36#if !defined(MBEDTLS_CHACHA20_ALT)
46#include "chacha20_alt.h"
94 const unsigned char key[32]);
116 const unsigned char nonce[12],
150 const unsigned char *
input,
151 unsigned char *output);
182 const unsigned char nonce[12],
185 const unsigned char *
input,
186 unsigned char *output);
188#if defined(MBEDTLS_SELF_TEST)
unsigned int uint32_t
Definition acefiex.h:163
unsigned char uint8_t
Definition acefiex.h:161
void mbedtls_chacha20_free(mbedtls_chacha20_context *ctx)
This function releases and clears the specified ChaCha20 context.
int mbedtls_chacha20_crypt(const unsigned char key[32], const unsigned char nonce[12], uint32_t counter, size_t size, const unsigned char *input, unsigned char *output)
This function encrypts or decrypts data with ChaCha20 and the given key and nonce.
int mbedtls_chacha20_setkey(mbedtls_chacha20_context *ctx, const unsigned char key[32])
This function sets the encryption/decryption key.
void mbedtls_chacha20_init(mbedtls_chacha20_context *ctx)
This function initializes the specified ChaCha20 context.
int mbedtls_chacha20_starts(mbedtls_chacha20_context *ctx, const unsigned char nonce[12], uint32_t counter)
This function sets the nonce and initial counter value.
int mbedtls_chacha20_update(mbedtls_chacha20_context *ctx, size_t size, const unsigned char *input, unsigned char *output)
This function encrypts or decrypts data.
size_t size
Definition drm_bridge.h:1299
int mbedtls_chacha20_self_test(int verbose)
Build-time configuration info.
Macro wrapper for struct's members.
size_t MBEDTLS_PRIVATE(keystream_bytes_used)
uint32_t MBEDTLS_PRIVATE(state)[16]
uint8_t MBEDTLS_PRIVATE(keystream8)[64]
struct VirtioInputEvent * input
Definition virtiokbd.c:46