diff options
| author | J08nY | 2019-11-25 17:45:35 +0100 |
|---|---|---|
| committer | J08nY | 2019-11-25 17:45:35 +0100 |
| commit | 8a56c7a95e662862cfe78b834ccb091e95d5372f (patch) | |
| tree | 1fd57480b7fc681f00c0bfb6c0e5cfea86762f87 /pyecsca/codegen/hash | |
| parent | c8d0bff46001bd5636825c5b0bb4c896cb34a4e6 (diff) | |
| download | pyecsca-codegen-8a56c7a95e662862cfe78b834ccb091e95d5372f.tar.gz pyecsca-codegen-8a56c7a95e662862cfe78b834ccb091e95d5372f.tar.zst pyecsca-codegen-8a56c7a95e662862cfe78b834ccb091e95d5372f.zip | |
Add libtommath, HOST build, and a simple PRNG.
Diffstat (limited to 'pyecsca/codegen/hash')
| -rw-r--r-- | pyecsca/codegen/hash/sha1.c | 2 | ||||
| -rw-r--r-- | pyecsca/codegen/hash/sha2.c | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/pyecsca/codegen/hash/sha1.c b/pyecsca/codegen/hash/sha1.c index 8ef9723..cf6ca3e 100644 --- a/pyecsca/codegen/hash/sha1.c +++ b/pyecsca/codegen/hash/sha1.c @@ -24,7 +24,9 @@ #include <stdlib.h> #include "sha1.h" +#ifndef LITTLE_ENDIAN #define LITTLE_ENDIAN +#endif /********************************************************************************************************/ diff --git a/pyecsca/codegen/hash/sha2.c b/pyecsca/codegen/hash/sha2.c index fb33650..d2ddf6f 100644 --- a/pyecsca/codegen/hash/sha2.c +++ b/pyecsca/codegen/hash/sha2.c @@ -49,7 +49,9 @@ #define CH(x,y,z) (((x)&(y)) ^ ((~(x))&(z))) #define MAJ(x,y,z) (((x)&(y)) ^ ((x)&(z)) ^ ((y)&(z))) +#ifndef LITTLE_ENDIAN #define LITTLE_ENDIAN +#endif #if HASH == HASH_SHA224 || HASH == HASH_SHA256 #define SIGMA_0(x) (rotr32((x), 2) ^ rotr32((x),13) ^ rotl32((x),10)) |
