From 2a0f3d040fbd4f6f522f3d6e08586876b24458d0 Mon Sep 17 00:00:00 2001 From: Stephen Touset Date: Thu, 16 May 2013 15:18:39 -0700 Subject: [PATCH] Fix definition of crypto_box_curve25519xsalsa20poly1305_macbytes This function definition was created by an automated script that incorrectly handled a corner case. --- src/libsodium/Makefile.am | 40 +++++++++---------- ...uth_hmacsha256.c => auth_hmacsha256_api.c} | 0 ...acsha512256.c => auth_hmacsha512256_api.c} | 0 ...c => box_curve25519xsalsa20poly1305_api.c} | 2 +- .../{core_hsalsa20.c => core_hsalsa20_api.c} | 0 .../{core_salsa20.c => core_salsa20_api.c} | 0 ...{core_salsa2012.c => core_salsa2012_api.c} | 0 .../{core_salsa208.c => core_salsa208_api.c} | 0 .../{hash_sha256.c => hash_sha256_api.c} | 0 .../{hash_sha512.c => hash_sha512_api.c} | 0 ...locks_sha256.c => hashblocks_sha256_api.c} | 0 ...locks_sha512.c => hashblocks_sha512_api.c} | 0 ...rve25519.c => scalarmult_curve25519_api.c} | 0 ...305.c => secretbox_xsalsa20poly1305_api.c} | 0 ..._siphash24.c => shorthash_siphash24_api.c} | 0 .../{sign_ed25519.c => sign_ed25519_api.c} | 0 ...h.c => sign_edwards25519sha512batch_api.c} | 0 ...eam_aes128ctr.c => stream_aes128ctr_api.c} | 0 ...56estream.c => stream_aes256estream_api.c} | 0 ...{stream_salsa20.c => stream_salsa20_api.c} | 0 ...eam_salsa2012.c => stream_salsa2012_api.c} | 0 ...tream_salsa208.c => stream_salsa208_api.c} | 0 ...tream_xsalsa20.c => stream_xsalsa20_api.c} | 0 23 files changed, 21 insertions(+), 21 deletions(-) rename src/libsodium/crypto_auth/hmacsha256/{auth_hmacsha256.c => auth_hmacsha256_api.c} (100%) rename src/libsodium/crypto_auth/hmacsha512256/{auth_hmacsha512256.c => auth_hmacsha512256_api.c} (100%) rename src/libsodium/crypto_box/curve25519xsalsa20poly1305/{box_curve25519xsalsa20poly1305.c => box_curve25519xsalsa20poly1305_api.c} (94%) rename src/libsodium/crypto_core/hsalsa20/{core_hsalsa20.c => core_hsalsa20_api.c} (100%) rename src/libsodium/crypto_core/salsa20/{core_salsa20.c => core_salsa20_api.c} (100%) rename src/libsodium/crypto_core/salsa2012/{core_salsa2012.c => core_salsa2012_api.c} (100%) rename src/libsodium/crypto_core/salsa208/{core_salsa208.c => core_salsa208_api.c} (100%) rename src/libsodium/crypto_hash/sha256/{hash_sha256.c => hash_sha256_api.c} (100%) rename src/libsodium/crypto_hash/sha512/{hash_sha512.c => hash_sha512_api.c} (100%) rename src/libsodium/crypto_hashblocks/sha256/{hashblocks_sha256.c => hashblocks_sha256_api.c} (100%) rename src/libsodium/crypto_hashblocks/sha512/{hashblocks_sha512.c => hashblocks_sha512_api.c} (100%) rename src/libsodium/crypto_scalarmult/curve25519/{scalarmult_curve25519.c => scalarmult_curve25519_api.c} (100%) rename src/libsodium/crypto_secretbox/xsalsa20poly1305/{secretbox_xsalsa20poly1305.c => secretbox_xsalsa20poly1305_api.c} (100%) rename src/libsodium/crypto_shorthash/siphash24/{shorthash_siphash24.c => shorthash_siphash24_api.c} (100%) rename src/libsodium/crypto_sign/ed25519/{sign_ed25519.c => sign_ed25519_api.c} (100%) rename src/libsodium/crypto_sign/edwards25519sha512batch/{sign_edwards25519sha512batch.c => sign_edwards25519sha512batch_api.c} (100%) rename src/libsodium/crypto_stream/aes128ctr/{stream_aes128ctr.c => stream_aes128ctr_api.c} (100%) rename src/libsodium/crypto_stream/aes256estream/{stream_aes256estream.c => stream_aes256estream_api.c} (100%) rename src/libsodium/crypto_stream/salsa20/{stream_salsa20.c => stream_salsa20_api.c} (100%) rename src/libsodium/crypto_stream/salsa2012/{stream_salsa2012.c => stream_salsa2012_api.c} (100%) rename src/libsodium/crypto_stream/salsa208/{stream_salsa208.c => stream_salsa208_api.c} (100%) rename src/libsodium/crypto_stream/xsalsa20/{stream_xsalsa20.c => stream_xsalsa20_api.c} (100%) diff --git a/src/libsodium/Makefile.am b/src/libsodium/Makefile.am index 26555a3a..90caf780 100644 --- a/src/libsodium/Makefile.am +++ b/src/libsodium/Makefile.am @@ -3,32 +3,32 @@ lib_LTLIBRARIES = \ libsodium_la_SOURCES = \ crypto_auth/crypto_auth.c \ - crypto_auth/hmacsha256/auth_hmacsha256.c \ + crypto_auth/hmacsha256/auth_hmacsha256_api.c \ crypto_auth/hmacsha256/ref/api.h \ crypto_auth/hmacsha256/ref/hmac_hmacsha256.c \ crypto_auth/hmacsha256/ref/verify_hmacsha256.c \ - crypto_auth/hmacsha512256/auth_hmacsha512256.c \ + crypto_auth/hmacsha512256/auth_hmacsha512256_api.c \ crypto_auth/hmacsha512256/ref/api.h \ crypto_auth/hmacsha512256/ref/hmac_hmacsha512256.c \ crypto_auth/hmacsha512256/ref/verify_hmacsha512256.c \ crypto_box/crypto_box.c \ - crypto_box/curve25519xsalsa20poly1305/box_curve25519xsalsa20poly1305.c \ + crypto_box/curve25519xsalsa20poly1305/box_curve25519xsalsa20poly1305_api.c \ crypto_box/curve25519xsalsa20poly1305/ref/api.h \ crypto_box/curve25519xsalsa20poly1305/ref/after_curve25519xsalsa20poly1305.c \ crypto_box/curve25519xsalsa20poly1305/ref/before_curve25519xsalsa20poly1305.c \ crypto_box/curve25519xsalsa20poly1305/ref/box_curve25519xsalsa20poly1305.c \ crypto_box/curve25519xsalsa20poly1305/ref/keypair_curve25519xsalsa20poly1305.c \ crypto_core/hsalsa20/ref2/core_hsalsa20.c \ - crypto_core/hsalsa20/core_hsalsa20.c \ + crypto_core/hsalsa20/core_hsalsa20_api.c \ crypto_core/hsalsa20/ref2/api.h \ crypto_core/salsa20/ref/core_salsa20.c \ - crypto_core/salsa20/core_salsa20.c \ + crypto_core/salsa20/core_salsa20_api.c \ crypto_core/salsa20/ref/api.h \ crypto_core/salsa2012/ref/core_salsa2012.c \ - crypto_core/salsa2012/core_salsa2012.c \ + crypto_core/salsa2012/core_salsa2012_api.c \ crypto_core/salsa2012/ref/api.h \ crypto_core/salsa208/ref/core_salsa208.c \ - crypto_core/salsa208/core_salsa208.c \ + crypto_core/salsa208/core_salsa208_api.c \ crypto_core/salsa208/ref/api.h \ crypto_generichash/crypto_generichash.c \ crypto_generichash/blake2/ref/api.h \ @@ -37,17 +37,17 @@ libsodium_la_SOURCES = \ crypto_generichash/blake2/ref/blake2b-ref.c \ crypto_generichash/blake2/ref/generichash_blake2b.c \ crypto_hash/crypto_hash.c \ - crypto_hash/sha256/hash_sha256.c \ + crypto_hash/sha256/hash_sha256_api.c \ crypto_hash/sha256/ref/api.h \ crypto_hash/sha256/ref/hash_sha256.c \ - crypto_hash/sha512/hash_sha512.c \ + crypto_hash/sha512/hash_sha512_api.c \ crypto_hash/sha512/ref/api.h \ crypto_hash/sha512/ref/hash_sha512.c \ crypto_hashblocks/sha256/ref/blocks_sha256.c \ - crypto_hashblocks/sha256/hashblocks_sha256.c \ + crypto_hashblocks/sha256/hashblocks_sha256_api.c \ crypto_hashblocks/sha256/ref/api.h \ crypto_hashblocks/sha512/ref/blocks_sha512.c \ - crypto_hashblocks/sha512/hashblocks_sha512.c \ + crypto_hashblocks/sha512/hashblocks_sha512_api.c \ crypto_hashblocks/sha512/ref/api.h \ crypto_onetimeauth/crypto_onetimeauth.c \ crypto_onetimeauth/poly1305/onetimeauth_poly1305.c \ @@ -60,17 +60,17 @@ libsodium_la_SOURCES = \ crypto_onetimeauth/poly1305/ref/verify_poly1305_ref.c \ crypto_scalarmult/crypto_scalarmult.c \ crypto_secretbox/crypto_secretbox.c \ - crypto_secretbox/xsalsa20poly1305/secretbox_xsalsa20poly1305.c \ + crypto_secretbox/xsalsa20poly1305/secretbox_xsalsa20poly1305_api.c \ crypto_secretbox/xsalsa20poly1305/ref/api.h \ crypto_secretbox/xsalsa20poly1305/ref/box_xsalsa20poly1305.c \ crypto_shorthash/crypto_shorthash.c \ - crypto_shorthash/siphash24/shorthash_siphash24.c \ + crypto_shorthash/siphash24/shorthash_siphash24_api.c \ crypto_shorthash/siphash24/ref/api.h \ crypto_shorthash/siphash24/ref/shorthash_siphash24.c \ crypto_sign/crypto_sign.c \ crypto_sign/ed25519/ref10/base.h \ crypto_sign/ed25519/ref10/base2.h \ - crypto_sign/ed25519/sign_ed25519.c \ + crypto_sign/ed25519/sign_ed25519_api.c \ crypto_sign/ed25519/ref10/api.h \ crypto_sign/ed25519/ref10/d.h \ crypto_sign/ed25519/ref10/d2.h \ @@ -124,7 +124,7 @@ libsodium_la_SOURCES = \ crypto_sign/ed25519/ref10/sc_reduce.c \ crypto_sign/ed25519/ref10/sign.c \ crypto_sign/ed25519/ref10/sqrtm1.h \ - crypto_sign/edwards25519sha512batch/sign_edwards25519sha512batch.c \ + crypto_sign/edwards25519sha512batch/sign_edwards25519sha512batch_api.c \ crypto_sign/edwards25519sha512batch/ref/api.h \ crypto_sign/edwards25519sha512batch/ref/fe25519.h \ crypto_sign/edwards25519sha512batch/ref/fe25519_edwards25519sha512batch.c \ @@ -135,7 +135,7 @@ libsodium_la_SOURCES = \ crypto_sign/edwards25519sha512batch/ref/sign_edwards25519sha512batch.c \ crypto_stream/crypto_stream.c \ crypto_stream/aes128ctr/portable/afternm_aes128ctr.c \ - crypto_stream/aes128ctr/stream_aes128ctr.c \ + crypto_stream/aes128ctr/stream_aes128ctr_api.c \ crypto_stream/aes128ctr/portable/api.h \ crypto_stream/aes128ctr/portable/beforenm_aes128ctr.c \ crypto_stream/aes128ctr/portable/common.h \ @@ -150,18 +150,18 @@ libsodium_la_SOURCES = \ crypto_stream/aes256estream/hongjun/aes-table.h \ crypto_stream/aes256estream/hongjun/aes256-ctr.c \ crypto_stream/aes256estream/hongjun/aes256.h \ - crypto_stream/aes256estream/stream_aes256estream.c \ + crypto_stream/aes256estream/stream_aes256estream_api.c \ crypto_stream/aes256estream/hongjun/api.h \ crypto_stream/aes256estream/hongjun/ecrypt-sync.h \ - crypto_stream/salsa2012/stream_salsa2012.c \ + crypto_stream/salsa2012/stream_salsa2012_api.c \ crypto_stream/salsa2012/ref/api.h \ crypto_stream/salsa2012/ref/stream_salsa2012.c \ crypto_stream/salsa2012/ref/xor_salsa2012.c \ - crypto_stream/salsa208/stream_salsa208.c \ + crypto_stream/salsa208/stream_salsa208_api.c \ crypto_stream/salsa208/ref/api.h \ crypto_stream/salsa208/ref/stream_salsa208.c \ crypto_stream/salsa208/ref/xor_salsa208.c \ - crypto_stream/xsalsa20/stream_xsalsa20.c \ + crypto_stream/xsalsa20/stream_xsalsa20_api.c \ crypto_stream/xsalsa20/ref/api.h \ crypto_stream/xsalsa20/ref/stream_xsalsa20.c \ crypto_stream/xsalsa20/ref/xor_xsalsa20.c \ diff --git a/src/libsodium/crypto_auth/hmacsha256/auth_hmacsha256.c b/src/libsodium/crypto_auth/hmacsha256/auth_hmacsha256_api.c similarity index 100% rename from src/libsodium/crypto_auth/hmacsha256/auth_hmacsha256.c rename to src/libsodium/crypto_auth/hmacsha256/auth_hmacsha256_api.c diff --git a/src/libsodium/crypto_auth/hmacsha512256/auth_hmacsha512256.c b/src/libsodium/crypto_auth/hmacsha512256/auth_hmacsha512256_api.c similarity index 100% rename from src/libsodium/crypto_auth/hmacsha512256/auth_hmacsha512256.c rename to src/libsodium/crypto_auth/hmacsha512256/auth_hmacsha512256_api.c diff --git a/src/libsodium/crypto_box/curve25519xsalsa20poly1305/box_curve25519xsalsa20poly1305.c b/src/libsodium/crypto_box/curve25519xsalsa20poly1305/box_curve25519xsalsa20poly1305_api.c similarity index 94% rename from src/libsodium/crypto_box/curve25519xsalsa20poly1305/box_curve25519xsalsa20poly1305.c rename to src/libsodium/crypto_box/curve25519xsalsa20poly1305/box_curve25519xsalsa20poly1305_api.c index 563954f4..6f04bf86 100644 --- a/src/libsodium/crypto_box/curve25519xsalsa20poly1305/box_curve25519xsalsa20poly1305.c +++ b/src/libsodium/crypto_box/curve25519xsalsa20poly1305/box_curve25519xsalsa20poly1305_api.c @@ -32,7 +32,7 @@ crypto_box_curve25519xsalsa20poly1305_boxzerobytes(void) { size_t crypto_box_curve25519xsalsa20poly1305_macbytes(void) { - return (crypto_box_ZEROBYTES; + return crypto_box_curve25519xsalsa20poly1305_MACBYTES; } const char * diff --git a/src/libsodium/crypto_core/hsalsa20/core_hsalsa20.c b/src/libsodium/crypto_core/hsalsa20/core_hsalsa20_api.c similarity index 100% rename from src/libsodium/crypto_core/hsalsa20/core_hsalsa20.c rename to src/libsodium/crypto_core/hsalsa20/core_hsalsa20_api.c diff --git a/src/libsodium/crypto_core/salsa20/core_salsa20.c b/src/libsodium/crypto_core/salsa20/core_salsa20_api.c similarity index 100% rename from src/libsodium/crypto_core/salsa20/core_salsa20.c rename to src/libsodium/crypto_core/salsa20/core_salsa20_api.c diff --git a/src/libsodium/crypto_core/salsa2012/core_salsa2012.c b/src/libsodium/crypto_core/salsa2012/core_salsa2012_api.c similarity index 100% rename from src/libsodium/crypto_core/salsa2012/core_salsa2012.c rename to src/libsodium/crypto_core/salsa2012/core_salsa2012_api.c diff --git a/src/libsodium/crypto_core/salsa208/core_salsa208.c b/src/libsodium/crypto_core/salsa208/core_salsa208_api.c similarity index 100% rename from src/libsodium/crypto_core/salsa208/core_salsa208.c rename to src/libsodium/crypto_core/salsa208/core_salsa208_api.c diff --git a/src/libsodium/crypto_hash/sha256/hash_sha256.c b/src/libsodium/crypto_hash/sha256/hash_sha256_api.c similarity index 100% rename from src/libsodium/crypto_hash/sha256/hash_sha256.c rename to src/libsodium/crypto_hash/sha256/hash_sha256_api.c diff --git a/src/libsodium/crypto_hash/sha512/hash_sha512.c b/src/libsodium/crypto_hash/sha512/hash_sha512_api.c similarity index 100% rename from src/libsodium/crypto_hash/sha512/hash_sha512.c rename to src/libsodium/crypto_hash/sha512/hash_sha512_api.c diff --git a/src/libsodium/crypto_hashblocks/sha256/hashblocks_sha256.c b/src/libsodium/crypto_hashblocks/sha256/hashblocks_sha256_api.c similarity index 100% rename from src/libsodium/crypto_hashblocks/sha256/hashblocks_sha256.c rename to src/libsodium/crypto_hashblocks/sha256/hashblocks_sha256_api.c diff --git a/src/libsodium/crypto_hashblocks/sha512/hashblocks_sha512.c b/src/libsodium/crypto_hashblocks/sha512/hashblocks_sha512_api.c similarity index 100% rename from src/libsodium/crypto_hashblocks/sha512/hashblocks_sha512.c rename to src/libsodium/crypto_hashblocks/sha512/hashblocks_sha512_api.c diff --git a/src/libsodium/crypto_scalarmult/curve25519/scalarmult_curve25519.c b/src/libsodium/crypto_scalarmult/curve25519/scalarmult_curve25519_api.c similarity index 100% rename from src/libsodium/crypto_scalarmult/curve25519/scalarmult_curve25519.c rename to src/libsodium/crypto_scalarmult/curve25519/scalarmult_curve25519_api.c diff --git a/src/libsodium/crypto_secretbox/xsalsa20poly1305/secretbox_xsalsa20poly1305.c b/src/libsodium/crypto_secretbox/xsalsa20poly1305/secretbox_xsalsa20poly1305_api.c similarity index 100% rename from src/libsodium/crypto_secretbox/xsalsa20poly1305/secretbox_xsalsa20poly1305.c rename to src/libsodium/crypto_secretbox/xsalsa20poly1305/secretbox_xsalsa20poly1305_api.c diff --git a/src/libsodium/crypto_shorthash/siphash24/shorthash_siphash24.c b/src/libsodium/crypto_shorthash/siphash24/shorthash_siphash24_api.c similarity index 100% rename from src/libsodium/crypto_shorthash/siphash24/shorthash_siphash24.c rename to src/libsodium/crypto_shorthash/siphash24/shorthash_siphash24_api.c diff --git a/src/libsodium/crypto_sign/ed25519/sign_ed25519.c b/src/libsodium/crypto_sign/ed25519/sign_ed25519_api.c similarity index 100% rename from src/libsodium/crypto_sign/ed25519/sign_ed25519.c rename to src/libsodium/crypto_sign/ed25519/sign_ed25519_api.c diff --git a/src/libsodium/crypto_sign/edwards25519sha512batch/sign_edwards25519sha512batch.c b/src/libsodium/crypto_sign/edwards25519sha512batch/sign_edwards25519sha512batch_api.c similarity index 100% rename from src/libsodium/crypto_sign/edwards25519sha512batch/sign_edwards25519sha512batch.c rename to src/libsodium/crypto_sign/edwards25519sha512batch/sign_edwards25519sha512batch_api.c diff --git a/src/libsodium/crypto_stream/aes128ctr/stream_aes128ctr.c b/src/libsodium/crypto_stream/aes128ctr/stream_aes128ctr_api.c similarity index 100% rename from src/libsodium/crypto_stream/aes128ctr/stream_aes128ctr.c rename to src/libsodium/crypto_stream/aes128ctr/stream_aes128ctr_api.c diff --git a/src/libsodium/crypto_stream/aes256estream/stream_aes256estream.c b/src/libsodium/crypto_stream/aes256estream/stream_aes256estream_api.c similarity index 100% rename from src/libsodium/crypto_stream/aes256estream/stream_aes256estream.c rename to src/libsodium/crypto_stream/aes256estream/stream_aes256estream_api.c diff --git a/src/libsodium/crypto_stream/salsa20/stream_salsa20.c b/src/libsodium/crypto_stream/salsa20/stream_salsa20_api.c similarity index 100% rename from src/libsodium/crypto_stream/salsa20/stream_salsa20.c rename to src/libsodium/crypto_stream/salsa20/stream_salsa20_api.c diff --git a/src/libsodium/crypto_stream/salsa2012/stream_salsa2012.c b/src/libsodium/crypto_stream/salsa2012/stream_salsa2012_api.c similarity index 100% rename from src/libsodium/crypto_stream/salsa2012/stream_salsa2012.c rename to src/libsodium/crypto_stream/salsa2012/stream_salsa2012_api.c diff --git a/src/libsodium/crypto_stream/salsa208/stream_salsa208.c b/src/libsodium/crypto_stream/salsa208/stream_salsa208_api.c similarity index 100% rename from src/libsodium/crypto_stream/salsa208/stream_salsa208.c rename to src/libsodium/crypto_stream/salsa208/stream_salsa208_api.c diff --git a/src/libsodium/crypto_stream/xsalsa20/stream_xsalsa20.c b/src/libsodium/crypto_stream/xsalsa20/stream_xsalsa20_api.c similarity index 100% rename from src/libsodium/crypto_stream/xsalsa20/stream_xsalsa20.c rename to src/libsodium/crypto_stream/xsalsa20/stream_xsalsa20_api.c