LTC_CHACHA_STREAM >> LTC_CHACHA

This commit is contained in:
Karel Miko 2017-04-24 21:55:55 +02:00
parent dd35e86c60
commit 0df0c9b12c
11 changed files with 16 additions and 16 deletions

View File

@ -939,7 +939,7 @@ LTC_MUTEX_PROTO(ltc_cipher_mutex)
/* ---- stream ciphers ---- */ /* ---- stream ciphers ---- */
#ifdef LTC_CHACHA_STREAM #ifdef LTC_CHACHA
typedef struct { typedef struct {
ulong32 input[16]; ulong32 input[16];
@ -957,7 +957,7 @@ int chacha_keystream(chacha_state *st, unsigned char *out, unsigned long outlen)
int chacha_done(chacha_state *st); int chacha_done(chacha_state *st);
int chacha_test(void); int chacha_test(void);
#endif /* LTC_CHACHA_STREAM */ #endif /* LTC_CHACHA */
#ifdef LTC_RC4_STREAM #ifdef LTC_RC4_STREAM

View File

@ -191,7 +191,7 @@
#define LTC_CAMELLIA #define LTC_CAMELLIA
/* stream ciphers */ /* stream ciphers */
#define LTC_CHACHA_STREAM #define LTC_CHACHA
#define LTC_RC4_STREAM #define LTC_RC4_STREAM
#define LTC_SOBER128_STREAM #define LTC_SOBER128_STREAM
@ -518,12 +518,12 @@
#error PK requires ASN.1 DER functionality, make sure LTC_DER is enabled #error PK requires ASN.1 DER functionality, make sure LTC_DER is enabled
#endif #endif
#if defined(LTC_CHACHA20POLY1305_MODE) && (!defined(LTC_CHACHA_STREAM) || !defined(LTC_POLY1305)) #if defined(LTC_CHACHA20POLY1305_MODE) && (!defined(LTC_CHACHA) || !defined(LTC_POLY1305))
#error LTC_CHACHA20POLY1305_MODE requires LTC_CHACHA_STREAM + LTC_POLY1305 #error LTC_CHACHA20POLY1305_MODE requires LTC_CHACHA + LTC_POLY1305
#endif #endif
#if defined(LTC_CHACHA20_PRNG) && !defined(LTC_CHACHA_STREAM) #if defined(LTC_CHACHA20_PRNG) && !defined(LTC_CHACHA)
#error LTC_CHACHA20_PRNG requires LTC_CHACHA_STREAM #error LTC_CHACHA20_PRNG requires LTC_CHACHA
#endif #endif
#if defined(LTC_RC4) && !defined(LTC_RC4_STREAM) #if defined(LTC_RC4) && !defined(LTC_RC4_STREAM)

View File

@ -125,7 +125,7 @@ const char *crypt_build_settings =
" Camellia\n" " Camellia\n"
#endif #endif
"Stream ciphers built-in:\n" "Stream ciphers built-in:\n"
#if defined(LTC_CHACHA_STREAM) #if defined(LTC_CHACHA)
" ChaCha\n" " ChaCha\n"
#endif #endif
#if defined(LTC_RC4_STREAM) #if defined(LTC_RC4_STREAM)

View File

@ -14,7 +14,7 @@
#include "tomcrypt.h" #include "tomcrypt.h"
#ifdef LTC_CHACHA_STREAM #ifdef LTC_CHACHA
#define QUARTERROUND(a,b,c,d) \ #define QUARTERROUND(a,b,c,d) \
x[a] += x[b]; x[d] = ROL(x[d] ^ x[a], 16); \ x[a] += x[b]; x[d] = ROL(x[d] ^ x[a], 16); \

View File

@ -9,7 +9,7 @@
#include "tomcrypt.h" #include "tomcrypt.h"
#ifdef LTC_CHACHA_STREAM #ifdef LTC_CHACHA
/** /**
Terminate and clear ChaCha state Terminate and clear ChaCha state

View File

@ -14,7 +14,7 @@
#include "tomcrypt.h" #include "tomcrypt.h"
#ifdef LTC_CHACHA_STREAM #ifdef LTC_CHACHA
/** /**
Set IV + counter data to the ChaCha state Set IV + counter data to the ChaCha state

View File

@ -14,7 +14,7 @@
#include "tomcrypt.h" #include "tomcrypt.h"
#ifdef LTC_CHACHA_STREAM #ifdef LTC_CHACHA
/** /**
Set IV + counter data to the ChaCha state Set IV + counter data to the ChaCha state

View File

@ -14,7 +14,7 @@
#include "tomcrypt.h" #include "tomcrypt.h"
#ifdef LTC_CHACHA_STREAM #ifdef LTC_CHACHA
/** /**
Generate a stream of random bytes via ChaCha Generate a stream of random bytes via ChaCha

View File

@ -14,7 +14,7 @@
#include "tomcrypt.h" #include "tomcrypt.h"
#ifdef LTC_CHACHA_STREAM #ifdef LTC_CHACHA
static const char * const sigma = "expand 32-byte k"; static const char * const sigma = "expand 32-byte k";
static const char * const tau = "expand 16-byte k"; static const char * const tau = "expand 16-byte k";

View File

@ -14,7 +14,7 @@
#include "tomcrypt.h" #include "tomcrypt.h"
#ifdef LTC_CHACHA_STREAM #ifdef LTC_CHACHA
int chacha_test(void) int chacha_test(void)
{ {

View File

@ -15,7 +15,7 @@ int cipher_hash_test(void)
} }
/* stream ciphers */ /* stream ciphers */
#ifdef LTC_CHACHA_STREAM #ifdef LTC_CHACHA
DO(chacha_test()); DO(chacha_test());
#endif #endif
#ifdef LTC_RC4_STREAM #ifdef LTC_RC4_STREAM