diff --git a/src/headers/tomcrypt_cipher.h b/src/headers/tomcrypt_cipher.h index cff4e7c..fc5b652 100644 --- a/src/headers/tomcrypt_cipher.h +++ b/src/headers/tomcrypt_cipher.h @@ -939,7 +939,7 @@ LTC_MUTEX_PROTO(ltc_cipher_mutex) /* ---- stream ciphers ---- */ -#ifdef LTC_CHACHA_STREAM +#ifdef LTC_CHACHA typedef struct { 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_test(void); -#endif /* LTC_CHACHA_STREAM */ +#endif /* LTC_CHACHA */ #ifdef LTC_RC4_STREAM diff --git a/src/headers/tomcrypt_custom.h b/src/headers/tomcrypt_custom.h index 831c541..83c76d2 100644 --- a/src/headers/tomcrypt_custom.h +++ b/src/headers/tomcrypt_custom.h @@ -191,7 +191,7 @@ #define LTC_CAMELLIA /* stream ciphers */ -#define LTC_CHACHA_STREAM +#define LTC_CHACHA #define LTC_RC4_STREAM #define LTC_SOBER128_STREAM @@ -518,12 +518,12 @@ #error PK requires ASN.1 DER functionality, make sure LTC_DER is enabled #endif -#if defined(LTC_CHACHA20POLY1305_MODE) && (!defined(LTC_CHACHA_STREAM) || !defined(LTC_POLY1305)) - #error LTC_CHACHA20POLY1305_MODE requires LTC_CHACHA_STREAM + LTC_POLY1305 +#if defined(LTC_CHACHA20POLY1305_MODE) && (!defined(LTC_CHACHA) || !defined(LTC_POLY1305)) + #error LTC_CHACHA20POLY1305_MODE requires LTC_CHACHA + LTC_POLY1305 #endif -#if defined(LTC_CHACHA20_PRNG) && !defined(LTC_CHACHA_STREAM) - #error LTC_CHACHA20_PRNG requires LTC_CHACHA_STREAM +#if defined(LTC_CHACHA20_PRNG) && !defined(LTC_CHACHA) + #error LTC_CHACHA20_PRNG requires LTC_CHACHA #endif #if defined(LTC_RC4) && !defined(LTC_RC4_STREAM) diff --git a/src/misc/crypt/crypt.c b/src/misc/crypt/crypt.c index 9787c13..cfe2606 100644 --- a/src/misc/crypt/crypt.c +++ b/src/misc/crypt/crypt.c @@ -125,7 +125,7 @@ const char *crypt_build_settings = " Camellia\n" #endif "Stream ciphers built-in:\n" -#if defined(LTC_CHACHA_STREAM) +#if defined(LTC_CHACHA) " ChaCha\n" #endif #if defined(LTC_RC4_STREAM) diff --git a/src/stream/chacha/chacha_crypt.c b/src/stream/chacha/chacha_crypt.c index d1c691c..de42a10 100644 --- a/src/stream/chacha/chacha_crypt.c +++ b/src/stream/chacha/chacha_crypt.c @@ -14,7 +14,7 @@ #include "tomcrypt.h" -#ifdef LTC_CHACHA_STREAM +#ifdef LTC_CHACHA #define QUARTERROUND(a,b,c,d) \ x[a] += x[b]; x[d] = ROL(x[d] ^ x[a], 16); \ diff --git a/src/stream/chacha/chacha_done.c b/src/stream/chacha/chacha_done.c index 06afbd2..4d6e278 100644 --- a/src/stream/chacha/chacha_done.c +++ b/src/stream/chacha/chacha_done.c @@ -9,7 +9,7 @@ #include "tomcrypt.h" -#ifdef LTC_CHACHA_STREAM +#ifdef LTC_CHACHA /** Terminate and clear ChaCha state diff --git a/src/stream/chacha/chacha_ivctr32.c b/src/stream/chacha/chacha_ivctr32.c index 5602f6d..9884a1e 100644 --- a/src/stream/chacha/chacha_ivctr32.c +++ b/src/stream/chacha/chacha_ivctr32.c @@ -14,7 +14,7 @@ #include "tomcrypt.h" -#ifdef LTC_CHACHA_STREAM +#ifdef LTC_CHACHA /** Set IV + counter data to the ChaCha state diff --git a/src/stream/chacha/chacha_ivctr64.c b/src/stream/chacha/chacha_ivctr64.c index 9780e09..82d39fb 100644 --- a/src/stream/chacha/chacha_ivctr64.c +++ b/src/stream/chacha/chacha_ivctr64.c @@ -14,7 +14,7 @@ #include "tomcrypt.h" -#ifdef LTC_CHACHA_STREAM +#ifdef LTC_CHACHA /** Set IV + counter data to the ChaCha state diff --git a/src/stream/chacha/chacha_keystream.c b/src/stream/chacha/chacha_keystream.c index 5ea3b57..b45323f 100644 --- a/src/stream/chacha/chacha_keystream.c +++ b/src/stream/chacha/chacha_keystream.c @@ -14,7 +14,7 @@ #include "tomcrypt.h" -#ifdef LTC_CHACHA_STREAM +#ifdef LTC_CHACHA /** Generate a stream of random bytes via ChaCha diff --git a/src/stream/chacha/chacha_setup.c b/src/stream/chacha/chacha_setup.c index 5dc5d72..69a1483 100644 --- a/src/stream/chacha/chacha_setup.c +++ b/src/stream/chacha/chacha_setup.c @@ -14,7 +14,7 @@ #include "tomcrypt.h" -#ifdef LTC_CHACHA_STREAM +#ifdef LTC_CHACHA static const char * const sigma = "expand 32-byte k"; static const char * const tau = "expand 16-byte k"; diff --git a/src/stream/chacha/chacha_test.c b/src/stream/chacha/chacha_test.c index c22e09b..914a48c 100644 --- a/src/stream/chacha/chacha_test.c +++ b/src/stream/chacha/chacha_test.c @@ -14,7 +14,7 @@ #include "tomcrypt.h" -#ifdef LTC_CHACHA_STREAM +#ifdef LTC_CHACHA int chacha_test(void) { diff --git a/testprof/cipher_hash_test.c b/testprof/cipher_hash_test.c index 9f36c8d..d5a1793 100644 --- a/testprof/cipher_hash_test.c +++ b/testprof/cipher_hash_test.c @@ -15,7 +15,7 @@ int cipher_hash_test(void) } /* stream ciphers */ -#ifdef LTC_CHACHA_STREAM +#ifdef LTC_CHACHA DO(chacha_test()); #endif #ifdef LTC_RC4_STREAM