diff --git a/src/libsodium/Makefile.am b/src/libsodium/Makefile.am index 46d672eb..86a6749a 100644 --- a/src/libsodium/Makefile.am +++ b/src/libsodium/Makefile.am @@ -53,9 +53,12 @@ libsodium_la_SOURCES = \ crypto_stream/xsalsa20/ref/stream_xsalsa20.c \ crypto_stream/xsalsa20/ref/xor_xsalsa20.c \ crypto_onetimeauth/poly1305/onetimeauth_poly1305.c \ - crypto_onetimeauth/poly1305/ref/auth_poly1305.c \ + crypto_onetimeauth/poly1305/53/auth_poly1305_53.c \ + crypto_onetimeauth/poly1305/53/crypto_onetimeauth.h \ + crypto_onetimeauth/poly1305/53/verify_poly1305_53.c \ + crypto_onetimeauth/poly1305/ref/auth_poly1305_ref.c \ crypto_onetimeauth/poly1305/ref/crypto_onetimeauth.h \ - crypto_onetimeauth/poly1305/ref/verify_poly1305.c \ + crypto_onetimeauth/poly1305/ref/verify_poly1305_ref.c \ crypto_sign/edwards25519sha512batch/ref/crypto_sign.h \ crypto_sign/edwards25519sha512batch/ref/fe25519.h \ crypto_sign/edwards25519sha512batch/ref/fe25519_edwards25519sha512batch.c \ diff --git a/src/libsodium/crypto_onetimeauth/poly1305/53/api.h b/src/libsodium/crypto_onetimeauth/poly1305/53/api.h deleted file mode 100644 index acc133ed..00000000 --- a/src/libsodium/crypto_onetimeauth/poly1305/53/api.h +++ /dev/null @@ -1,2 +0,0 @@ -#define CRYPTO_BYTES 16 -#define CRYPTO_KEYBYTES 32 diff --git a/src/libsodium/crypto_onetimeauth/poly1305/53/auth_poly1305.c b/src/libsodium/crypto_onetimeauth/poly1305/53/auth_poly1305_53.c similarity index 98% rename from src/libsodium/crypto_onetimeauth/poly1305/53/auth_poly1305.c rename to src/libsodium/crypto_onetimeauth/poly1305/53/auth_poly1305_53.c index 1861abe6..7e9c5289 100644 --- a/src/libsodium/crypto_onetimeauth/poly1305/53/auth_poly1305.c +++ b/src/libsodium/crypto_onetimeauth/poly1305/53/auth_poly1305_53.c @@ -9,6 +9,7 @@ Public domain. #include #include "crypto_onetimeauth.h" +#include "crypto_onetimeauth_poly1305_53.h" #pragma STDC FENV_ACCESS ON @@ -1631,3 +1632,16 @@ nomorebytes:; } return 0; } + +const char * +crypto_onetimeauth_poly1305_implementation_name(void) +{ + return "53"; +} + +struct crypto_onetimeauth_poly1305_implementation +crypto_onetimeauth_poly1305_53_implementation = { + .implementation_name = crypto_onetimeauth_poly1305_implementation_name, + .onetimeauth = crypto_onetimeauth, + .onetimeauth_verify = crypto_onetimeauth_verify +}; diff --git a/src/libsodium/crypto_onetimeauth/poly1305/53/crypto_onetimeauth.h b/src/libsodium/crypto_onetimeauth/poly1305/53/crypto_onetimeauth.h index bd052c69..55166386 100644 --- a/src/libsodium/crypto_onetimeauth/poly1305/53/crypto_onetimeauth.h +++ b/src/libsodium/crypto_onetimeauth/poly1305/53/crypto_onetimeauth.h @@ -3,6 +3,9 @@ #include "crypto_onetimeauth_poly1305.h" +#define crypto_onetimeauth_poly1305_implementation_name \ + crypto_onetimeauth_poly1305_53_implementation_name + #define crypto_onetimeauth crypto_onetimeauth_poly1305_53 #define crypto_onetimeauth_verify crypto_onetimeauth_poly1305_53_verify diff --git a/src/libsodium/crypto_onetimeauth/poly1305/53/verify_poly1305.c b/src/libsodium/crypto_onetimeauth/poly1305/53/verify_poly1305_53.c similarity index 100% rename from src/libsodium/crypto_onetimeauth/poly1305/53/verify_poly1305.c rename to src/libsodium/crypto_onetimeauth/poly1305/53/verify_poly1305_53.c diff --git a/src/libsodium/crypto_onetimeauth/poly1305/ref/auth_poly1305.c b/src/libsodium/crypto_onetimeauth/poly1305/ref/auth_poly1305_ref.c similarity index 100% rename from src/libsodium/crypto_onetimeauth/poly1305/ref/auth_poly1305.c rename to src/libsodium/crypto_onetimeauth/poly1305/ref/auth_poly1305_ref.c diff --git a/src/libsodium/crypto_onetimeauth/poly1305/ref/verify_poly1305.c b/src/libsodium/crypto_onetimeauth/poly1305/ref/verify_poly1305_ref.c similarity index 100% rename from src/libsodium/crypto_onetimeauth/poly1305/ref/verify_poly1305.c rename to src/libsodium/crypto_onetimeauth/poly1305/ref/verify_poly1305_ref.c diff --git a/src/libsodium/include/Makefile.am b/src/libsodium/include/Makefile.am index 1536b4c5..8bd9e225 100644 --- a/src/libsodium/include/Makefile.am +++ b/src/libsodium/include/Makefile.am @@ -19,6 +19,7 @@ SODIUM_EXPORT = \ sodium/crypto_hashblocks_sha512.h \ sodium/crypto_onetimeauth.h \ sodium/crypto_onetimeauth_poly1305.h \ + sodium/crypto_onetimeauth_poly1305_53.h \ sodium/crypto_onetimeauth_poly1305_ref.h \ sodium/crypto_scalarmult_curve25519.h \ sodium/crypto_secretbox.h \