Go to the source code of this file.
|
| 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 a cipher. It should be called after the key has been set, using wc_Chacha_SetKey. A difference nonce should be used for each round of encryption. More...
|
| |
| 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 result in the buffer output. More...
|
| |
| 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. More...
|
| |
Initial value:{
#endif
#define CHACHA_IV_WORDS 3
#define CHACHA_IV_BYTES (CHACHA_IV_WORDS * sizeof(word32))
#define CHACHA_CHUNK_WORDS 16
#define CHACHA_CHUNK_BYTES (CHACHA_CHUNK_WORDS * sizeof(word32))
#ifdef WOLFSSL_X86_64_BUILD
#if defined(USE_INTEL_SPEEDUP) && !defined(NO_CHACHA_ASM)
#define USE_INTEL_CHACHA_SPEEDUP
#define HAVE_INTEL_AVX1
#endif
#endif
enum {
CHACHA_ENC_TYPE = WC_CIPHER_CHACHA,
CHACHA_MAX_KEY_SZ = 32,
}