summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNiels Möller <nisse@lysator.liu.se>2015-08-25 21:06:23 +0200
committerNiels Möller <nisse@lysator.liu.se>2015-08-25 21:06:23 +0200
commit833d7496b74b64597dd7c41977adbedaec0be25f (patch)
treee4bc742f110783874ed7f0b7dbc556dc8acebd34
parentb203b4e82114e8bc6d893a9a5f851171c5886b49 (diff)
downloadnettle-833d7496b74b64597dd7c41977adbedaec0be25f.tar.gz
New define NETTLE_SHA3_FIPS202.
-rw-r--r--ChangeLog4
-rw-r--r--sha3.h4
2 files changed, 8 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 3fe0600b..19fadaab 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2015-08-25 Niels Möller <nisse@lysator.liu.se>
+
+ * sha3.h (NETTLE_SHA3_FIPS202): New preprocessor constant.
+
2015-08-24 Niels Möller <nisse@lysator.liu.se>
* testsuite/sha3.awk: Document origin of test vectors.
diff --git a/sha3.h b/sha3.h
index 6435ad62..0c655376 100644
--- a/sha3.h
+++ b/sha3.h
@@ -40,6 +40,7 @@
extern "C" {
#endif
+/* Name mangling */
#define sha3_permute nettle_sha3_permute
#define _sha3_update _nettle_sha3_update
#define _sha3_pad _nettle_sha3_pad
@@ -56,6 +57,9 @@ extern "C" {
#define sha3_512_update nettle_sha3_512_update
#define sha3_512_digest nettle_sha3_512_digest
+/* Indicates that SHA3 is the NIST FIPS 202 version. */
+#define NETTLE_SHA3_FIPS202 1
+
/* The sha3 state is a 5x5 matrix of 64-bit words. In the notation of
Keccak description, S[x,y] is element x + 5*y, so if x is
interpreted as the row index and y the column index, it is stored