diff options
Diffstat (limited to '')
-rwxr-xr-x | benchmark-flags (renamed from src/benchmark-flags) | 0 | ||||
-rw-r--r-- | benchmark.c (renamed from src/benchmark.c) | 16 | ||||
-rw-r--r-- | libkeccak.h (renamed from src/libkeccak.h) | 0 | ||||
-rw-r--r-- | libkeccak/digest.c (renamed from src/libkeccak/digest.c) | 24 | ||||
-rw-r--r-- | libkeccak/digest.h (renamed from src/libkeccak/digest.h) | 0 | ||||
-rw-r--r-- | libkeccak/files.c (renamed from src/libkeccak/files.c) | 0 | ||||
-rw-r--r-- | libkeccak/files.h (renamed from src/libkeccak/files.h) | 0 | ||||
-rw-r--r-- | libkeccak/generalised-spec.c (renamed from src/libkeccak/generalised-spec.c) | 0 | ||||
-rw-r--r-- | libkeccak/generalised-spec.h (renamed from src/libkeccak/generalised-spec.h) | 0 | ||||
-rw-r--r-- | libkeccak/hex.c (renamed from src/libkeccak/hex.c) | 0 | ||||
-rw-r--r-- | libkeccak/hex.h (renamed from src/libkeccak/hex.h) | 0 | ||||
-rw-r--r-- | libkeccak/internal.h (renamed from src/libkeccak/internal.h) | 0 | ||||
-rw-r--r-- | libkeccak/mac/hmac.c (renamed from src/libkeccak/mac/hmac.c) | 0 | ||||
-rw-r--r-- | libkeccak/mac/hmac.h (renamed from src/libkeccak/mac/hmac.h) | 0 | ||||
-rw-r--r-- | libkeccak/spec.h (renamed from src/libkeccak/spec.h) | 0 | ||||
-rw-r--r-- | libkeccak/state.c (renamed from src/libkeccak/state.c) | 0 | ||||
-rw-r--r-- | libkeccak/state.h (renamed from src/libkeccak/state.h) | 0 | ||||
-rw-r--r-- | test.c (renamed from src/test.c) | 0 |
18 files changed, 24 insertions, 16 deletions
diff --git a/src/benchmark-flags b/benchmark-flags index 1168ec0..1168ec0 100755 --- a/src/benchmark-flags +++ b/benchmark-flags diff --git a/src/benchmark.c b/benchmark.c index 1ce7da9..20344d9 100644 --- a/src/benchmark.c +++ b/benchmark.c @@ -9,10 +9,10 @@ #ifndef MESSAGE_FILE -# define MESSAGE_FILE "LICENSE" +# define MESSAGE_FILE "benchfile" #endif #ifndef MESSAGE_LEN -# define MESSAGE_LEN 34520 +# define MESSAGE_LEN 50000 #endif @@ -20,23 +20,23 @@ # define BITRATE 1024 #endif #ifndef CAPACITY -# define CAPACITY 576 +# define CAPACITY 576 #endif #ifndef OUTPUT -# define OUTPUT 512 +# define OUTPUT 512 #endif #ifndef UPDATE_RUNS -# define UPDATE_RUNS 100 +# define UPDATE_RUNS 100 #endif #ifndef FAST_SQUEEZE_RUNS -# define FAST_SQUEEZE_RUNS 100 +# define FAST_SQUEEZE_RUNS 100 #endif #ifndef SLOW_SQUEEZE_RUNS -# define SLOW_SQUEEZE_RUNS 100 +# define SLOW_SQUEEZE_RUNS 100 #endif #ifndef RERUNS -# define RERUNS 50 +# define RERUNS 50 #endif diff --git a/src/libkeccak.h b/libkeccak.h index 7c71801..7c71801 100644 --- a/src/libkeccak.h +++ b/libkeccak.h diff --git a/src/libkeccak/digest.c b/libkeccak/digest.c index 5f7a32c..26a2587 100644 --- a/src/libkeccak/digest.c +++ b/libkeccak/digest.c @@ -79,7 +79,8 @@ static const uint_fast64_t RC[] = { * @param state The hashing state * @param rc The round contant for this round */ -static __attribute__((nonnull, nothrow, hot)) void +LIBKECCAK_GCC_ONLY(__attribute__((nonnull, nothrow, hot))) +static void libkeccak_f_round(register libkeccak_state_t *restrict state, register int_fast64_t rc) { int_fast64_t *restrict A = state->S; @@ -126,7 +127,8 @@ libkeccak_f_round(register libkeccak_state_t *restrict state, register int_fast6 * @param state The hashing state * @param rc The round contant for this round */ -static __attribute__((nonnull, nothrow, hot)) void +LIBKECCAK_GCC_ONLY(__attribute__((nonnull, nothrow, hot))) +static void libkeccak_f_round64(register libkeccak_state_t *restrict state, register int_fast64_t rc) { int_fast64_t *restrict A = state->S; @@ -170,7 +172,8 @@ libkeccak_f_round64(register libkeccak_state_t *restrict state, register int_fas * * @param state The hashing state */ -static inline __attribute__((nonnull, nothrow, gnu_inline)) void +LIBKECCAK_GCC_ONLY(__attribute__((nonnull, nothrow, gnu_inline))) +static inline void libkeccak_f(register libkeccak_state_t *restrict state) { register long i = 0; @@ -196,7 +199,8 @@ libkeccak_f(register libkeccak_state_t *restrict state) * @param off The offset in the message * @return The lane */ -static inline __attribute__((nonnull, nothrow, pure, warn_unused_result, gnu_inline)) int_fast64_t +LIBKECCAK_GCC_ONLY(__attribute__((nonnull, nothrow, pure, warn_unused_result, gnu_inline))) +static inline int_fast64_t libkeccak_to_lane(register const char *restrict message, register size_t msglen, register long rr, register long ww, size_t off) { @@ -220,7 +224,8 @@ libkeccak_to_lane(register const char *restrict message, register size_t msglen, * @param off The offset in the message * @return The lane */ -static inline __attribute__((nonnull, nothrow, pure, hot, warn_unused_result, gnu_inline)) int_fast64_t +LIBKECCAK_GCC_ONLY(__attribute__((nonnull, nothrow, pure, hot, warn_unused_result, gnu_inline))) +static inline int_fast64_t libkeccak_to_lane64(register const char* restrict message, register size_t msglen, register long rr, size_t off) { @@ -242,7 +247,8 @@ libkeccak_to_lane64(register const char* restrict message, register size_t msgle * `state->M` should have `state->r / 8` bytes left over at the end * @param bits The number of bits in the end of the message that does not make a whole byte */ -static inline __attribute__((nonnull, nothrow, gnu_inline)) void +LIBKECCAK_GCC_ONLY(__attribute__((nonnull, nothrow, gnu_inline))) +static inline void libkeccak_pad10star1(register libkeccak_state_t *restrict state, register size_t bits) { register size_t r = (size_t)(state->r); @@ -272,7 +278,8 @@ libkeccak_pad10star1(register libkeccak_state_t *restrict state, register size_t * @param state The hashing state * @param len The number of bytes from `state->M` to absorb */ -static __attribute__((nonnull, nothrow)) void +LIBKECCAK_GCC_ONLY(__attribute__((nonnull, nothrow))) +static void libkeccak_absorption_phase(register libkeccak_state_t *restrict state, register size_t len) { register long rr = state->r >> 3; @@ -310,7 +317,8 @@ libkeccak_absorption_phase(register libkeccak_state_t *restrict state, register * @param ww The word size in bytes * @param hashsum Output parameter for the hashsum */ -static __attribute__((nonnull, nothrow, hot)) void +LIBKECCAK_GCC_ONLY(__attribute__((nonnull, nothrow, hot))) +static void libkeccak_squeezing_phase(register libkeccak_state_t *restrict state, long rr, long nn, long ww, register char *restrict hashsum) { diff --git a/src/libkeccak/digest.h b/libkeccak/digest.h index 832f0c0..832f0c0 100644 --- a/src/libkeccak/digest.h +++ b/libkeccak/digest.h diff --git a/src/libkeccak/files.c b/libkeccak/files.c index 22d12f3..22d12f3 100644 --- a/src/libkeccak/files.c +++ b/libkeccak/files.c diff --git a/src/libkeccak/files.h b/libkeccak/files.h index 92038fb..92038fb 100644 --- a/src/libkeccak/files.h +++ b/libkeccak/files.h diff --git a/src/libkeccak/generalised-spec.c b/libkeccak/generalised-spec.c index 9dfa918..9dfa918 100644 --- a/src/libkeccak/generalised-spec.c +++ b/libkeccak/generalised-spec.c diff --git a/src/libkeccak/generalised-spec.h b/libkeccak/generalised-spec.h index 2725961..2725961 100644 --- a/src/libkeccak/generalised-spec.h +++ b/libkeccak/generalised-spec.h diff --git a/src/libkeccak/hex.c b/libkeccak/hex.c index 7531223..7531223 100644 --- a/src/libkeccak/hex.c +++ b/libkeccak/hex.c diff --git a/src/libkeccak/hex.h b/libkeccak/hex.h index 25375d5..25375d5 100644 --- a/src/libkeccak/hex.h +++ b/libkeccak/hex.h diff --git a/src/libkeccak/internal.h b/libkeccak/internal.h index 466abf9..466abf9 100644 --- a/src/libkeccak/internal.h +++ b/libkeccak/internal.h diff --git a/src/libkeccak/mac/hmac.c b/libkeccak/mac/hmac.c index ee3bc6a..ee3bc6a 100644 --- a/src/libkeccak/mac/hmac.c +++ b/libkeccak/mac/hmac.c diff --git a/src/libkeccak/mac/hmac.h b/libkeccak/mac/hmac.h index 2681e61..2681e61 100644 --- a/src/libkeccak/mac/hmac.h +++ b/libkeccak/mac/hmac.h diff --git a/src/libkeccak/spec.h b/libkeccak/spec.h index 8d73c52..8d73c52 100644 --- a/src/libkeccak/spec.h +++ b/libkeccak/spec.h diff --git a/src/libkeccak/state.c b/libkeccak/state.c index c6360b7..c6360b7 100644 --- a/src/libkeccak/state.c +++ b/libkeccak/state.c diff --git a/src/libkeccak/state.h b/libkeccak/state.h index 1c4b24e..1c4b24e 100644 --- a/src/libkeccak/state.h +++ b/libkeccak/state.h |