Browse Source

LTC_CHACHA_STREAM >> LTC_CHACHA

Karel Miko 8 years ago
parent
commit
0df0c9b12c

+ 2 - 2
src/headers/tomcrypt_cipher.h

@@ -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
 
 

+ 5 - 5
src/headers/tomcrypt_custom.h

@@ -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))
-   #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
 #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
 #endif
 
 
 #if defined(LTC_RC4) && !defined(LTC_RC4_STREAM)
 #if defined(LTC_RC4) && !defined(LTC_RC4_STREAM)

+ 1 - 1
src/misc/crypt/crypt.c

@@ -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)

+ 1 - 1
src/stream/chacha/chacha_crypt.c

@@ -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); \

+ 1 - 1
src/stream/chacha/chacha_done.c

@@ -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

+ 1 - 1
src/stream/chacha/chacha_ivctr32.c

@@ -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

+ 1 - 1
src/stream/chacha/chacha_ivctr64.c

@@ -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

+ 1 - 1
src/stream/chacha/chacha_keystream.c

@@ -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

+ 1 - 1
src/stream/chacha/chacha_setup.c

@@ -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";

+ 1 - 1
src/stream/chacha/chacha_test.c

@@ -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)
 {
 {

+ 1 - 1
testprof/cipher_hash_test.c

@@ -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