diff options
| author | jsing <> | 2023-04-15 18:29:26 +0000 |
|---|---|---|
| committer | jsing <> | 2023-04-15 18:29:26 +0000 |
| commit | 8d2fb7a3ec79d0e6121aa2a9ff8f6ac2f3a35642 (patch) | |
| tree | 6ee17adcb6d44cb9d73c6ed6ce2b677ea1969b72 /src | |
| parent | aaaca473ab5066072557d54411e5d55740dd8e66 (diff) | |
| download | openbsd-8d2fb7a3ec79d0e6121aa2a9ff8f6ac2f3a35642.tar.gz openbsd-8d2fb7a3ec79d0e6121aa2a9ff8f6ac2f3a35642.tar.bz2 openbsd-8d2fb7a3ec79d0e6121aa2a9ff8f6ac2f3a35642.zip | |
Move some defines out of the sha3_internal.h header.
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/libcrypto/sha/sha3.c | 6 | ||||
| -rw-r--r-- | src/lib/libcrypto/sha/sha3_internal.h | 10 |
2 files changed, 6 insertions, 10 deletions
diff --git a/src/lib/libcrypto/sha/sha3.c b/src/lib/libcrypto/sha/sha3.c index a3ef95f815..acb7de7d9d 100644 --- a/src/lib/libcrypto/sha/sha3.c +++ b/src/lib/libcrypto/sha/sha3.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: sha3.c,v 1.6 2023/04/15 18:19:06 jsing Exp $ */ | 1 | /* $OpenBSD: sha3.c,v 1.7 2023/04/15 18:29:26 jsing Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * The MIT License (MIT) | 3 | * The MIT License (MIT) |
| 4 | * | 4 | * |
| @@ -25,6 +25,10 @@ | |||
| 25 | 25 | ||
| 26 | #include "sha3_internal.h" | 26 | #include "sha3_internal.h" |
| 27 | 27 | ||
| 28 | #define KECCAKF_ROUNDS 24 | ||
| 29 | |||
| 30 | #define ROTL64(x, y) (((x) << (y)) | ((x) >> (64 - (y)))) | ||
| 31 | |||
| 28 | static const uint64_t sha3_keccakf_rndc[24] = { | 32 | static const uint64_t sha3_keccakf_rndc[24] = { |
| 29 | 0x0000000000000001, 0x0000000000008082, 0x800000000000808a, | 33 | 0x0000000000000001, 0x0000000000008082, 0x800000000000808a, |
| 30 | 0x8000000080008000, 0x000000000000808b, 0x0000000080000001, | 34 | 0x8000000080008000, 0x000000000000808b, 0x0000000080000001, |
diff --git a/src/lib/libcrypto/sha/sha3_internal.h b/src/lib/libcrypto/sha/sha3_internal.h index 1ed4b02f7c..20144effd1 100644 --- a/src/lib/libcrypto/sha/sha3_internal.h +++ b/src/lib/libcrypto/sha/sha3_internal.h | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: sha3_internal.h,v 1.5 2023/04/15 18:22:53 jsing Exp $ */ | 1 | /* $OpenBSD: sha3_internal.h,v 1.6 2023/04/15 18:29:26 jsing Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * The MIT License (MIT) | 3 | * The MIT License (MIT) |
| 4 | * | 4 | * |
| @@ -29,14 +29,6 @@ | |||
| 29 | #ifndef HEADER_SHA3_INTERNAL_H | 29 | #ifndef HEADER_SHA3_INTERNAL_H |
| 30 | #define HEADER_SHA3_INTERNAL_H | 30 | #define HEADER_SHA3_INTERNAL_H |
| 31 | 31 | ||
| 32 | #ifndef KECCAKF_ROUNDS | ||
| 33 | #define KECCAKF_ROUNDS 24 | ||
| 34 | #endif | ||
| 35 | |||
| 36 | #ifndef ROTL64 | ||
| 37 | #define ROTL64(x, y) (((x) << (y)) | ((x) >> (64 - (y)))) | ||
| 38 | #endif | ||
| 39 | |||
| 40 | typedef struct { | 32 | typedef struct { |
| 41 | union { | 33 | union { |
| 42 | uint8_t b[200]; /* State as 8 bit bytes. */ | 34 | uint8_t b[200]; /* State as 8 bit bytes. */ |
