27 #ifndef WOLF_CRYPT_CHACHA_H 28 #define WOLF_CRYPT_CHACHA_H 39 #define CHACHA_IV_WORDS 3 40 #define CHACHA_IV_BYTES (CHACHA_IV_WORDS * sizeof(word32)) 43 #define CHACHA_CHUNK_WORDS 16 44 #define CHACHA_CHUNK_BYTES (CHACHA_CHUNK_WORDS * sizeof(word32)) 46 #ifdef WOLFSSL_X86_64_BUILD 47 #if defined(USE_INTEL_SPEEDUP) && !defined(NO_CHACHA_ASM) 48 #define USE_INTEL_CHACHA_SPEEDUP 49 #define HAVE_INTEL_AVX1 54 CHACHA_ENC_TYPE = WC_CIPHER_CHACHA,
55 CHACHA_MAX_KEY_SZ = 32,
59 word32 X[CHACHA_CHUNK_WORDS];
61 #ifdef HAVE_INTEL_AVX1 WOLFSSL_API int wc_Chacha_Process(ChaCha *ctx, byte *cipher, const byte *plain, word32 msglen)
This function processes the text from the buffer input, encrypts or decrypts it, and stores the resul...
Definition: chacha.c:314
WOLFSSL_API int wc_Chacha_SetKey(ChaCha *ctx, const byte *key, word32 keySz)
This function sets the key for a ChaCha object, initializing it for use as a cipher. It should be called before setting the nonce with wc_Chacha_SetIV, and before using it for encryption with wc_Chacha_Process.
Definition: chacha.c:146
WOLFSSL_API int wc_Chacha_SetIV(ChaCha *ctx, const byte *inIv, word32 counter)
This function sets the initialization vector (nonce) for a ChaCha object, initializing it for use as ...
Definition: chacha.c:111