Browse Source

Minor fixes

Signed-off-by: Steffen Jaeckel <[email protected]>
Steffen Jaeckel 1 month ago
parent
commit
5dbdaff16b
3 changed files with 5 additions and 3 deletions
  1. 3 1
      src/ciphers/aes/aesni.c
  2. 2 1
      src/misc/crypt/crypt_find_hash_any.c
  3. 0 1
      tests/no_prng.c

+ 3 - 1
src/ciphers/aes/aesni.c

@@ -29,7 +29,7 @@ const struct ltc_cipher_descriptor aesni_desc =
 #define temp_update(t, k) _mm_insert_epi32(t, k, 3)
 #define temp_update(t, k) _mm_insert_epi32(t, k, 3)
 #define temp_invert(k) _mm_aesimc_si128(*((__m128i*)(k)))
 #define temp_invert(k) _mm_aesimc_si128(*((__m128i*)(k)))
 
 
-
+#define rcon aesni_rcon
 static const ulong32 rcon[] = {
 static const ulong32 rcon[] = {
     0x01UL, 0x02UL, 0x04UL, 0x08UL, 0x10UL, 0x20UL, 0x40UL, 0x80UL, 0x1BUL, 0x36UL
     0x01UL, 0x02UL, 0x04UL, 0x08UL, 0x10UL, 0x20UL, 0x40UL, 0x80UL, 0x1BUL, 0x36UL
 };
 };
@@ -370,5 +370,7 @@ int aesni_keysize(int *keysize)
    return CRYPT_OK;
    return CRYPT_OK;
 }
 }
 
 
+#undef rcon
+
 #endif
 #endif
 
 

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

@@ -12,7 +12,8 @@
    @param name        The name of the hash desired
    @param name        The name of the hash desired
    @param digestlen   The minimum length of the digest size (octets)
    @param digestlen   The minimum length of the digest size (octets)
    @return >= 0 if found, -1 if not present
    @return >= 0 if found, -1 if not present
-*/int find_hash_any(const char *name, int digestlen)
+*/
+int find_hash_any(const char *name, int digestlen)
 {
 {
    int x, y, z;
    int x, y, z;
    LTC_ARGCHK(name != NULL);
    LTC_ARGCHK(name != NULL);

+ 0 - 1
tests/no_prng.c

@@ -1,7 +1,6 @@
 /* LibTomCrypt, modular cryptographic library -- Tom St Denis */
 /* LibTomCrypt, modular cryptographic library -- Tom St Denis */
 /* SPDX-License-Identifier: Unlicense */
 /* SPDX-License-Identifier: Unlicense */
 
 
-#include "tomcrypt.h"
 #include "tomcrypt_test.h"
 #include "tomcrypt_test.h"
 
 
 /**
 /**