rbnacl-libsodium 0.4.5 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rbnacl/libsodium/version.rb +1 -1
- data/vendor/libsodium/AUTHORS +14 -9
- data/vendor/libsodium/ChangeLog +26 -0
- data/vendor/libsodium/LICENSE +1 -1
- data/vendor/libsodium/Makefile.am +1 -0
- data/vendor/libsodium/README.markdown +185 -46
- data/vendor/libsodium/THANKS +10 -0
- data/vendor/libsodium/builds/msvc/properties/Common.props +21 -0
- data/vendor/libsodium/builds/msvc/properties/DLL.props +16 -0
- data/vendor/libsodium/builds/msvc/properties/Debug.props +29 -0
- data/vendor/libsodium/builds/msvc/properties/DebugDEXE.props +21 -0
- data/vendor/libsodium/builds/msvc/properties/DebugDLL.props +20 -0
- data/vendor/libsodium/builds/msvc/properties/DebugLEXE.props +20 -0
- data/vendor/libsodium/builds/msvc/properties/DebugLIB.props +20 -0
- data/vendor/libsodium/builds/msvc/properties/DebugLTCG.props +19 -0
- data/vendor/libsodium/builds/msvc/properties/DebugSEXE.props +21 -0
- data/vendor/libsodium/builds/msvc/properties/EXE.props +17 -0
- data/vendor/libsodium/builds/msvc/properties/LIB.props +16 -0
- data/vendor/libsodium/builds/msvc/properties/LTCG.props +13 -0
- data/vendor/libsodium/builds/msvc/properties/Link.props +21 -0
- data/vendor/libsodium/builds/msvc/properties/Messages.props +15 -0
- data/vendor/libsodium/builds/msvc/properties/Output.props +30 -0
- data/vendor/libsodium/builds/msvc/properties/Release.props +41 -0
- data/vendor/libsodium/builds/msvc/properties/ReleaseDEXE.props +20 -0
- data/vendor/libsodium/builds/msvc/properties/ReleaseDLL.props +19 -0
- data/vendor/libsodium/builds/msvc/properties/ReleaseLEXE.props +20 -0
- data/vendor/libsodium/builds/msvc/properties/ReleaseLIB.props +19 -0
- data/vendor/libsodium/builds/msvc/properties/ReleaseLTCG.props +19 -0
- data/vendor/libsodium/builds/msvc/properties/ReleaseSEXE.props +20 -0
- data/vendor/libsodium/builds/msvc/properties/Win32.props +20 -0
- data/vendor/libsodium/builds/msvc/properties/x64.props +23 -0
- data/vendor/libsodium/builds/msvc/resource.h +0 -0
- data/vendor/libsodium/builds/msvc/resource.rc +0 -0
- data/vendor/libsodium/builds/msvc/version.h +29 -0
- data/vendor/libsodium/builds/msvc/vs2010/libsodium.import.props +52 -0
- data/vendor/libsodium/builds/msvc/vs2010/libsodium.import.xml +17 -0
- data/vendor/libsodium/builds/msvc/vs2010/libsodium.sln +79 -0
- data/vendor/libsodium/builds/msvc/vs2010/libsodium/libsodium.props +43 -0
- data/vendor/libsodium/builds/msvc/vs2010/libsodium/libsodium.vcxproj +345 -0
- data/vendor/libsodium/builds/msvc/vs2010/libsodium/libsodium.vcxproj.filters +1037 -0
- data/vendor/libsodium/builds/msvc/vs2010/libsodium/libsodium.xml +15 -0
- data/vendor/libsodium/builds/msvc/vs2010/test/test.props +37 -0
- data/vendor/libsodium/builds/msvc/vs2010/test/test.runner.bat +78 -0
- data/vendor/libsodium/builds/msvc/vs2010/test/test.vcxproj +220 -0
- data/vendor/libsodium/builds/msvc/vs2010/test/test.vcxproj.filters +168 -0
- data/vendor/libsodium/builds/msvc/vs2012/libsodium.import.props +52 -0
- data/vendor/libsodium/builds/msvc/vs2012/libsodium.import.xml +17 -0
- data/vendor/libsodium/builds/msvc/vs2012/libsodium.sln +79 -0
- data/vendor/libsodium/builds/msvc/vs2012/libsodium/libsodium.props +43 -0
- data/vendor/libsodium/builds/msvc/vs2012/libsodium/libsodium.vcxproj +345 -0
- data/vendor/libsodium/builds/msvc/vs2012/libsodium/libsodium.vcxproj.filters +1037 -0
- data/vendor/libsodium/builds/msvc/vs2012/libsodium/libsodium.xml +15 -0
- data/vendor/libsodium/builds/msvc/vs2012/test/test.props +37 -0
- data/vendor/libsodium/builds/msvc/vs2012/test/test.runner.bat +78 -0
- data/vendor/libsodium/builds/msvc/vs2012/test/test.vcxproj +220 -0
- data/vendor/libsodium/builds/msvc/vs2012/test/test.vcxproj.filters +168 -0
- data/vendor/libsodium/builds/msvc/vs2013/libsodium.import.props +52 -0
- data/vendor/libsodium/builds/msvc/vs2013/libsodium.import.xml +17 -0
- data/vendor/libsodium/builds/msvc/vs2013/libsodium.sln +81 -0
- data/vendor/libsodium/builds/msvc/vs2013/libsodium/libsodium.props +43 -0
- data/vendor/libsodium/builds/msvc/vs2013/libsodium/libsodium.vcxproj +345 -0
- data/vendor/libsodium/builds/msvc/vs2013/libsodium/libsodium.vcxproj.filters +1037 -0
- data/vendor/libsodium/builds/msvc/vs2013/libsodium/libsodium.xml +15 -0
- data/vendor/libsodium/builds/msvc/vs2013/test/test.props +37 -0
- data/vendor/libsodium/builds/msvc/vs2013/test/test.runner.bat +78 -0
- data/vendor/libsodium/builds/msvc/vs2013/test/test.vcxproj +220 -0
- data/vendor/libsodium/builds/msvc/vs2013/test/test.vcxproj.filters +168 -0
- data/vendor/libsodium/configure.ac +87 -68
- data/vendor/libsodium/dist-build/Makefile.am +10 -0
- data/vendor/libsodium/dist-build/android-arm.sh +3 -0
- data/vendor/libsodium/dist-build/android-armv7.sh +3 -0
- data/vendor/libsodium/dist-build/android-build.sh +37 -0
- data/vendor/libsodium/dist-build/android-mips.sh +3 -0
- data/vendor/libsodium/dist-build/android-x86.sh +3 -0
- data/vendor/libsodium/dist-build/emscripten.sh +13 -0
- data/vendor/libsodium/dist-build/{iphone.sh → ios.sh} +2 -2
- data/vendor/libsodium/dist-build/msys2-win32.sh +10 -0
- data/vendor/libsodium/dist-build/msys2-win64.sh +10 -0
- data/vendor/libsodium/libsodium.vcxproj +25 -13
- data/vendor/libsodium/libsodium.vcxproj.filters +60 -24
- data/vendor/libsodium/msvc-scripts/process.bat +3 -7
- data/vendor/libsodium/packaging/nuget/package.bat +13 -0
- data/vendor/libsodium/packaging/nuget/package.config +4 -0
- data/vendor/libsodium/packaging/nuget/package.gsl +255 -0
- data/vendor/libsodium/packaging/nuget/package.nuspec +93 -0
- data/vendor/libsodium/packaging/nuget/package.targets +128 -0
- data/vendor/libsodium/packaging/nuget/package.xml +22 -0
- data/vendor/libsodium/src/libsodium/Makefile.am +32 -20
- data/vendor/libsodium/src/libsodium/crypto_auth/hmacsha256/auth_hmacsha256_api.c +0 -5
- data/vendor/libsodium/src/libsodium/crypto_auth/hmacsha256/{ref → cp}/api.h +0 -1
- data/vendor/libsodium/src/libsodium/crypto_auth/hmacsha256/cp/hmac_hmacsha256.c +110 -0
- data/vendor/libsodium/src/libsodium/crypto_auth/hmacsha256/{ref → cp}/verify_hmacsha256.c +0 -0
- data/vendor/libsodium/src/libsodium/crypto_auth/hmacsha512/auth_hmacsha512_api.c +11 -0
- data/vendor/libsodium/src/libsodium/crypto_auth/hmacsha512/cp/api.h +9 -0
- data/vendor/libsodium/src/libsodium/crypto_auth/hmacsha512/cp/hmac_hmacsha512.c +110 -0
- data/vendor/libsodium/src/libsodium/crypto_auth/hmacsha512/cp/verify_hmacsha512.c +10 -0
- data/vendor/libsodium/src/libsodium/crypto_auth/hmacsha512256/auth_hmacsha512256_api.c +0 -5
- data/vendor/libsodium/src/libsodium/crypto_auth/hmacsha512256/{ref → cp}/api.h +0 -1
- data/vendor/libsodium/src/libsodium/crypto_auth/hmacsha512256/cp/hmac_hmacsha512256.c +54 -0
- data/vendor/libsodium/src/libsodium/crypto_auth/hmacsha512256/{ref → cp}/verify_hmacsha512256.c +2 -1
- data/vendor/libsodium/src/libsodium/crypto_box/crypto_box_easy.c +94 -0
- data/vendor/libsodium/src/libsodium/crypto_box/curve25519xsalsa20poly1305/box_curve25519xsalsa20poly1305_api.c +0 -5
- data/vendor/libsodium/src/libsodium/crypto_box/curve25519xsalsa20poly1305/ref/api.h +0 -1
- data/vendor/libsodium/src/libsodium/crypto_core/hsalsa20/core_hsalsa20_api.c +0 -5
- data/vendor/libsodium/src/libsodium/crypto_core/hsalsa20/ref2/api.h +0 -1
- data/vendor/libsodium/src/libsodium/crypto_core/salsa20/core_salsa20_api.c +0 -5
- data/vendor/libsodium/src/libsodium/crypto_core/salsa20/ref/api.h +0 -1
- data/vendor/libsodium/src/libsodium/crypto_core/salsa2012/core_salsa2012_api.c +0 -5
- data/vendor/libsodium/src/libsodium/crypto_core/salsa2012/ref/api.h +0 -1
- data/vendor/libsodium/src/libsodium/crypto_core/salsa208/core_salsa208_api.c +0 -5
- data/vendor/libsodium/src/libsodium/crypto_core/salsa208/ref/api.h +0 -1
- data/vendor/libsodium/src/libsodium/crypto_generichash/blake2/generichash_blake2_api.c +15 -5
- data/vendor/libsodium/src/libsodium/crypto_generichash/blake2/ref/api.h +0 -2
- data/vendor/libsodium/src/libsodium/crypto_generichash/blake2/ref/blake2.h +14 -6
- data/vendor/libsodium/src/libsodium/crypto_generichash/blake2/ref/blake2b-ref.c +95 -0
- data/vendor/libsodium/src/libsodium/crypto_generichash/blake2/ref/generichash_blake2b.c +50 -3
- data/vendor/libsodium/src/libsodium/crypto_generichash/crypto_generichash.c +4 -10
- data/vendor/libsodium/src/libsodium/crypto_hash/crypto_hash.c +11 -0
- data/vendor/libsodium/src/libsodium/crypto_hash/sha256/{ref → cp}/api.h +3 -1
- data/vendor/libsodium/src/libsodium/crypto_hash/sha256/cp/hash_sha256.c +294 -0
- data/vendor/libsodium/src/libsodium/crypto_hash/sha256/hash_sha256_api.c +0 -5
- data/vendor/libsodium/src/libsodium/crypto_hash/sha512/{ref → cp}/api.h +3 -1
- data/vendor/libsodium/src/libsodium/crypto_hash/sha512/cp/hash_sha512.c +321 -0
- data/vendor/libsodium/src/libsodium/crypto_hash/sha512/hash_sha512_api.c +0 -5
- data/vendor/libsodium/src/libsodium/crypto_onetimeauth/poly1305/donna/auth_poly1305_donna.c +51 -127
- data/vendor/libsodium/src/libsodium/crypto_onetimeauth/poly1305/donna/poly1305_donna.h +12 -0
- data/vendor/libsodium/src/libsodium/crypto_onetimeauth/poly1305/donna/poly1305_donna32.h +221 -0
- data/vendor/libsodium/src/libsodium/crypto_onetimeauth/poly1305/donna/poly1305_donna64.h +209 -0
- data/vendor/libsodium/src/libsodium/crypto_onetimeauth/poly1305/onetimeauth_poly1305_api.c +0 -5
- data/vendor/libsodium/src/libsodium/crypto_onetimeauth/poly1305/onetimeauth_poly1305_try.c +1 -140
- data/vendor/libsodium/src/libsodium/crypto_pwhash/scryptxsalsa208sha256/crypto_scrypt-common.c +250 -0
- data/vendor/libsodium/src/libsodium/crypto_pwhash/scryptxsalsa208sha256/crypto_scrypt.h +100 -0
- data/vendor/libsodium/src/libsodium/crypto_pwhash/scryptxsalsa208sha256/nosse/pwhash_scryptxsalsa208sha256_nosse.c +302 -0
- data/vendor/libsodium/src/libsodium/crypto_pwhash/scryptxsalsa208sha256/pbkdf2-sha256.c +94 -0
- data/vendor/libsodium/src/libsodium/crypto_pwhash/scryptxsalsa208sha256/pbkdf2-sha256.h +45 -0
- data/vendor/libsodium/src/libsodium/crypto_pwhash/scryptxsalsa208sha256/pwhash_scryptxsalsa208sha256.c +172 -0
- data/vendor/libsodium/src/libsodium/crypto_pwhash/scryptxsalsa208sha256/scrypt_platform.c +96 -0
- data/vendor/libsodium/src/libsodium/crypto_pwhash/scryptxsalsa208sha256/sse/pwhash_scryptxsalsa208sha256_sse.c +391 -0
- data/vendor/libsodium/src/libsodium/crypto_pwhash/scryptxsalsa208sha256/sysendian.h +146 -0
- data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/donna_c64/api.h +2 -2
- data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/donna_c64/smult_curve25519_donna_c64.c +39 -9
- data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/ref/api.h +2 -2
- data/vendor/libsodium/src/libsodium/crypto_secretbox/crypto_secretbox.c +6 -0
- data/vendor/libsodium/src/libsodium/crypto_secretbox/crypto_secretbox_easy.c +94 -0
- data/vendor/libsodium/src/libsodium/crypto_secretbox/xsalsa20poly1305/ref/api.h +0 -1
- data/vendor/libsodium/src/libsodium/crypto_secretbox/xsalsa20poly1305/secretbox_xsalsa20poly1305_api.c +3 -3
- data/vendor/libsodium/src/libsodium/crypto_shorthash/siphash24/ref/api.h +0 -1
- data/vendor/libsodium/src/libsodium/crypto_shorthash/siphash24/shorthash_siphash24_api.c +3 -3
- data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/api.h +0 -1
- data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_scalarmult_base.c +6 -0
- data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/keypair.c +5 -3
- data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/open.c +28 -18
- data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/sign.c +14 -9
- data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/sign_ed25519_api.c +0 -5
- data/vendor/libsodium/src/libsodium/crypto_sign/edwards25519sha512batch/ref/api.h +0 -1
- data/vendor/libsodium/src/libsodium/crypto_sign/edwards25519sha512batch/sign_edwards25519sha512batch_api.c +0 -5
- data/vendor/libsodium/src/libsodium/crypto_stream/aes128ctr/portable/afternm_aes128ctr.c +21 -21
- data/vendor/libsodium/src/libsodium/crypto_stream/aes128ctr/portable/api.h +0 -1
- data/vendor/libsodium/src/libsodium/crypto_stream/aes128ctr/portable/int128.h +6 -0
- data/vendor/libsodium/src/libsodium/crypto_stream/aes128ctr/portable/xor_afternm_aes128ctr.c +42 -42
- data/vendor/libsodium/src/libsodium/crypto_stream/aes128ctr/stream_aes128ctr_api.c +0 -5
- data/vendor/libsodium/src/libsodium/crypto_stream/aes256estream/hongjun/aes-table-be.h +4 -4
- data/vendor/libsodium/src/libsodium/crypto_stream/aes256estream/hongjun/aes-table-le.h +4 -4
- data/vendor/libsodium/src/libsodium/crypto_stream/aes256estream/hongjun/aes256-ctr.c +15 -14
- data/vendor/libsodium/src/libsodium/crypto_stream/aes256estream/hongjun/api.h +0 -1
- data/vendor/libsodium/src/libsodium/crypto_stream/aes256estream/hongjun/ecrypt-sync.h +1 -1
- data/vendor/libsodium/src/libsodium/crypto_stream/aes256estream/stream_aes256estream_api.c +0 -5
- data/vendor/libsodium/src/libsodium/crypto_stream/salsa20/amd64_xmm6/stream_salsa20_amd64_xmm6.S +153 -160
- data/vendor/libsodium/src/libsodium/crypto_stream/salsa20/ref/api.h +2 -5
- data/vendor/libsodium/src/libsodium/crypto_stream/salsa20/ref/stream_salsa20_ref.c +9 -3
- data/vendor/libsodium/src/libsodium/crypto_stream/salsa20/ref/xor_salsa20_ref.c +9 -3
- data/vendor/libsodium/src/libsodium/crypto_stream/salsa20/stream_salsa20_api.c +0 -5
- data/vendor/libsodium/src/libsodium/crypto_stream/salsa2012/ref/api.h +0 -1
- data/vendor/libsodium/src/libsodium/crypto_stream/salsa2012/stream_salsa2012_api.c +0 -5
- data/vendor/libsodium/src/libsodium/crypto_stream/salsa208/ref/api.h +0 -1
- data/vendor/libsodium/src/libsodium/crypto_stream/salsa208/stream_salsa208_api.c +0 -5
- data/vendor/libsodium/src/libsodium/crypto_stream/xsalsa20/ref/api.h +0 -1
- data/vendor/libsodium/src/libsodium/crypto_stream/xsalsa20/stream_xsalsa20_api.c +0 -5
- data/vendor/libsodium/src/libsodium/crypto_verify/64/ref/api.h +2 -0
- data/vendor/libsodium/src/libsodium/crypto_verify/64/ref/verify_64.c +72 -0
- data/vendor/libsodium/src/libsodium/crypto_verify/64/verify_64_api.c +6 -0
- data/vendor/libsodium/src/libsodium/include/Makefile.am +6 -7
- data/vendor/libsodium/src/libsodium/include/sodium.h +4 -3
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_auth.h +3 -0
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_auth_hmacsha256.h +31 -9
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_auth_hmacsha512.h +58 -0
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_auth_hmacsha512256.h +26 -9
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_box.h +13 -0
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_box_curve25519xsalsa20poly1305.h +38 -24
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_core_hsalsa20.h +6 -11
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_core_salsa20.h +6 -11
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_core_salsa2012.h +6 -11
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_core_salsa208.h +6 -11
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_generichash.h +7 -8
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_generichash_blake2b.h +36 -16
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_hash.h +13 -4
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_hash_sha256.h +25 -7
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_hash_sha512.h +25 -7
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_onetimeauth.h +3 -0
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_onetimeauth_poly1305.h +5 -5
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_onetimeauth_poly1305_donna.h +3 -0
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_pwhash_scryptxsalsa208sha256.h +48 -0
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_scalarmult_curve25519.h +31 -0
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_secretbox.h +17 -0
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_secretbox_xsalsa20poly1305.h +21 -11
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_shorthash.h +3 -0
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_shorthash_siphash24.h +8 -7
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_sign.h +3 -0
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_sign_ed25519.h +16 -17
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_sign_edwards25519sha512batch.h +18 -14
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_stream.h +3 -0
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_stream_aes128ctr.h +18 -18
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_stream_aes256estream.h +19 -18
- data/vendor/libsodium/src/libsodium/include/sodium/{crypto_stream_salsa20.h.in → crypto_stream_salsa20.h} +8 -19
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_stream_salsa2012.h +8 -8
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_stream_salsa208.h +8 -8
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_stream_xsalsa20.h +10 -11
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_verify_16.h +1 -4
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_verify_32.h +1 -4
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_verify_64.h +22 -0
- data/vendor/libsodium/src/libsodium/include/sodium/randombytes.h +3 -0
- data/vendor/libsodium/src/libsodium/include/sodium/runtime.h +27 -0
- data/vendor/libsodium/src/libsodium/include/sodium/utils.h +15 -3
- data/vendor/libsodium/src/libsodium/randombytes/randombytes.c +3 -1
- data/vendor/libsodium/src/libsodium/randombytes/salsa20/randombytes_salsa20_random.c +18 -7
- data/vendor/libsodium/src/libsodium/randombytes/sysrandom/randombytes_sysrandom.c +57 -9
- data/vendor/libsodium/src/libsodium/sodium/compat.c +62 -0
- data/vendor/libsodium/src/libsodium/sodium/core.c +2 -0
- data/vendor/libsodium/src/libsodium/sodium/runtime.c +134 -0
- data/vendor/libsodium/src/libsodium/sodium/utils.c +100 -8
- data/vendor/libsodium/test/default/Makefile.am +63 -3
- data/vendor/libsodium/test/default/auth6.c +21 -0
- data/vendor/libsodium/test/default/auth6.exp +8 -0
- data/vendor/libsodium/test/default/auth7.c +37 -0
- data/vendor/libsodium/test/default/auth7.exp +0 -0
- data/vendor/libsodium/test/default/box_easy.c +59 -0
- data/vendor/libsodium/test/default/box_easy.exp +19 -0
- data/vendor/libsodium/test/default/box_easy2.c +31 -0
- data/vendor/libsodium/test/default/box_easy2.exp +1 -0
- data/vendor/libsodium/test/default/cmptest.h +7 -1
- data/vendor/libsodium/test/default/generichash3.c +36 -0
- data/vendor/libsodium/test/default/generichash3.exp +64 -0
- data/vendor/libsodium/test/default/pwhash.c +59 -0
- data/vendor/libsodium/test/default/pwhash.exp +2 -0
- data/vendor/libsodium/test/default/scalarmult7.c +0 -2
- data/vendor/libsodium/test/default/scalarmult8.c +0 -2
- data/vendor/libsodium/test/default/secretbox_easy.c +51 -0
- data/vendor/libsodium/test/default/secretbox_easy.exp +19 -0
- data/vendor/libsodium/test/default/secretbox_easy2.c +27 -0
- data/vendor/libsodium/test/default/secretbox_easy2.exp +1 -0
- data/vendor/libsodium/test/default/sign.c +1106 -0
- data/vendor/libsodium/test/default/sign.exp +3 -0
- data/vendor/libsodium/test/default/sodium_utils.c +8 -0
- data/vendor/libsodium/test/default/sodium_utils.exp +2 -1
- data/vendor/libsodium/test/default/sodium_version.c +1 -1
- data/vendor/libsodium/test/default/verify1.c +34 -0
- data/vendor/libsodium/test/default/verify1.exp +6 -0
- metadata +138 -33
- data/vendor/libsodium/dist-build/android.sh +0 -48
- data/vendor/libsodium/dist-build/msys.sh +0 -9
- data/vendor/libsodium/src/libsodium/crypto_auth/hmacsha256/ref/hmac_hmacsha256.c +0 -83
- data/vendor/libsodium/src/libsodium/crypto_auth/hmacsha512256/ref/hmac_hmacsha512256.c +0 -86
- data/vendor/libsodium/src/libsodium/crypto_hash/sha256/ref/hash_sha256.c +0 -69
- data/vendor/libsodium/src/libsodium/crypto_hash/sha512/ref/hash_sha512.c +0 -71
- data/vendor/libsodium/src/libsodium/crypto_hashblocks/sha256/checksum +0 -1
- data/vendor/libsodium/src/libsodium/crypto_hashblocks/sha256/hashblocks_sha256_api.c +0 -16
- data/vendor/libsodium/src/libsodium/crypto_hashblocks/sha256/ref/api.h +0 -9
- data/vendor/libsodium/src/libsodium/crypto_hashblocks/sha256/ref/blocks_sha256.c +0 -212
- data/vendor/libsodium/src/libsodium/crypto_hashblocks/sha512/checksum +0 -1
- data/vendor/libsodium/src/libsodium/crypto_hashblocks/sha512/hashblocks_sha512_api.c +0 -16
- data/vendor/libsodium/src/libsodium/crypto_hashblocks/sha512/ref/api.h +0 -9
- data/vendor/libsodium/src/libsodium/crypto_hashblocks/sha512/ref/blocks_sha512.c +0 -239
- data/vendor/libsodium/src/libsodium/crypto_hashblocks/try.c +0 -78
- data/vendor/libsodium/src/libsodium/crypto_onetimeauth/poly1305/53/api.h +0 -8
- data/vendor/libsodium/src/libsodium/crypto_onetimeauth/poly1305/53/auth_poly1305_53.c +0 -1661
- data/vendor/libsodium/src/libsodium/crypto_onetimeauth/poly1305/53/verify_poly1305_53.c +0 -10
- data/vendor/libsodium/src/libsodium/crypto_onetimeauth/poly1305/donna/portable-jane.h +0 -772
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_hashblocks_sha256.h +0 -32
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_hashblocks_sha512.h +0 -32
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_onetimeauth_poly1305_53.h +0 -34
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_scalarmult_curve25519.h.in +0 -44
@@ -0,0 +1,128 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<!--
|
3
|
+
#################################################################
|
4
|
+
# GENERATED SOURCE CODE, DO NOT EDIT EXCEPT EXPERIMENTALLY #
|
5
|
+
#################################################################
|
6
|
+
-->
|
7
|
+
<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
8
|
+
|
9
|
+
<!-- user interface -->
|
10
|
+
<ItemGroup>
|
11
|
+
<PropertyPageSchema Include="$(MSBuildThisFileDirectory)package.xml" />
|
12
|
+
</ItemGroup>
|
13
|
+
|
14
|
+
<!-- general -->
|
15
|
+
<ItemDefinitionGroup>
|
16
|
+
<ClCompile>
|
17
|
+
<AdditionalIncludeDirectories>$(MSBuildThisFileDirectory)include\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
18
|
+
</ClCompile>
|
19
|
+
<Link>
|
20
|
+
<AdditionalDependencies>advapi32.lib;crypt32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
21
|
+
<AdditionalLibraryDirectories>$(MSBuildThisFileDirectory)bin\;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
22
|
+
</Link>
|
23
|
+
</ItemDefinitionGroup>
|
24
|
+
<ItemDefinitionGroup Condition="'$(Linkage-libsodium)' == 'static' Or '$(Linkage-libsodium)' == 'ltcg'">
|
25
|
+
<ClCompile>
|
26
|
+
<PreprocessorDefinitions>SODIUM_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
27
|
+
</ClCompile>
|
28
|
+
</ItemDefinitionGroup>
|
29
|
+
|
30
|
+
<!-- static libraries -->
|
31
|
+
<ItemDefinitionGroup Condition="'$(Platform)' == 'Win32' And ('$(PlatformToolset)' == 'v120' Or '$(PlatformToolset)' == 'CTP_Nov2013') And '$(Linkage-libsodium)' == 'static' And $(Configuration.IndexOf('Release')) != -1">
|
32
|
+
<Link>
|
33
|
+
<AdditionalDependencies>libsodium-x86-v120-mt-s-0_5_0_0.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
34
|
+
</Link>
|
35
|
+
</ItemDefinitionGroup>
|
36
|
+
<ItemDefinitionGroup Condition="'$(Platform)' == 'Win32' And ('$(PlatformToolset)' == 'v120' Or '$(PlatformToolset)' == 'CTP_Nov2013') And '$(Linkage-libsodium)' == 'static' And $(Configuration.IndexOf('Debug')) != -1">
|
37
|
+
<Link>
|
38
|
+
<AdditionalDependencies>libsodium-x86-v120-mt-sgd-0_5_0_0.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
39
|
+
</Link>
|
40
|
+
</ItemDefinitionGroup>
|
41
|
+
<ItemDefinitionGroup Condition="'$(Platform)' == 'x64' And ('$(PlatformToolset)' == 'v120' Or '$(PlatformToolset)' == 'CTP_Nov2013') And '$(Linkage-libsodium)' == 'static' And $(Configuration.IndexOf('Release')) != -1">
|
42
|
+
<Link>
|
43
|
+
<AdditionalDependencies>libsodium-x64-v120-mt-s-0_5_0_0.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
44
|
+
</Link>
|
45
|
+
</ItemDefinitionGroup>
|
46
|
+
<ItemDefinitionGroup Condition="'$(Platform)' == 'x64' And ('$(PlatformToolset)' == 'v120' Or '$(PlatformToolset)' == 'CTP_Nov2013') And '$(Linkage-libsodium)' == 'static' And $(Configuration.IndexOf('Debug')) != -1">
|
47
|
+
<Link>
|
48
|
+
<AdditionalDependencies>libsodium-x64-v120-mt-sgd-0_5_0_0.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
49
|
+
</Link>
|
50
|
+
</ItemDefinitionGroup>
|
51
|
+
|
52
|
+
<!-- static ltcg libraries -->
|
53
|
+
<ItemDefinitionGroup Condition="'$(Platform)' == 'Win32' And ('$(PlatformToolset)' == 'v120' Or '$(PlatformToolset)' == 'CTP_Nov2013') And '$(Linkage-libsodium)' == 'ltcg' And $(Configuration.IndexOf('Release')) != -1">
|
54
|
+
<Link>
|
55
|
+
<AdditionalDependencies>libsodium-x86-v120-mt-s-0_5_0_0.ltcg.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
56
|
+
</Link>
|
57
|
+
</ItemDefinitionGroup>
|
58
|
+
<ItemDefinitionGroup Condition="'$(Platform)' == 'Win32' And ('$(PlatformToolset)' == 'v120' Or '$(PlatformToolset)' == 'CTP_Nov2013') And '$(Linkage-libsodium)' == 'ltcg' And $(Configuration.IndexOf('Debug')) != -1">
|
59
|
+
<Link>
|
60
|
+
<AdditionalDependencies>libsodium-x86-v120-mt-sgd-0_5_0_0.ltcg.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
61
|
+
</Link>
|
62
|
+
</ItemDefinitionGroup>
|
63
|
+
<ItemDefinitionGroup Condition="'$(Platform)' == 'x64' And ('$(PlatformToolset)' == 'v120' Or '$(PlatformToolset)' == 'CTP_Nov2013') And '$(Linkage-libsodium)' == 'ltcg' And $(Configuration.IndexOf('Release')) != -1">
|
64
|
+
<Link>
|
65
|
+
<AdditionalDependencies>libsodium-x64-v120-mt-s-0_5_0_0.ltcg.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
66
|
+
</Link>
|
67
|
+
</ItemDefinitionGroup>
|
68
|
+
<ItemDefinitionGroup Condition="'$(Platform)' == 'x64' And ('$(PlatformToolset)' == 'v120' Or '$(PlatformToolset)' == 'CTP_Nov2013') And '$(Linkage-libsodium)' == 'ltcg' And $(Configuration.IndexOf('Debug')) != -1">
|
69
|
+
<Link>
|
70
|
+
<AdditionalDependencies>libsodium-x64-v120-mt-sgd-0_5_0_0.ltcg.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
71
|
+
</Link>
|
72
|
+
</ItemDefinitionGroup>
|
73
|
+
|
74
|
+
<!-- dynamic import libraries -->
|
75
|
+
<ItemDefinitionGroup Condition="'$(Platform)' == 'Win32' And ('$(PlatformToolset)' == 'v120' Or '$(PlatformToolset)' == 'CTP_Nov2013') And '$(Linkage-libsodium)' == 'dynamic' And $(Configuration.IndexOf('Release')) != -1">
|
76
|
+
<Link>
|
77
|
+
<AdditionalDependencies>libsodium-x86-v120-mt-0_5_0_0.imp.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
78
|
+
</Link>
|
79
|
+
</ItemDefinitionGroup>
|
80
|
+
<ItemDefinitionGroup Condition="'$(Platform)' == 'Win32' And ('$(PlatformToolset)' == 'v120' Or '$(PlatformToolset)' == 'CTP_Nov2013') And '$(Linkage-libsodium)' == 'dynamic' And $(Configuration.IndexOf('Debug')) != -1">
|
81
|
+
<Link>
|
82
|
+
<AdditionalDependencies>libsodium-x86-v120-mt-gd-0_5_0_0.imp.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
83
|
+
</Link>
|
84
|
+
</ItemDefinitionGroup>
|
85
|
+
<ItemDefinitionGroup Condition="'$(Platform)' == 'x64' And ('$(PlatformToolset)' == 'v120' Or '$(PlatformToolset)' == 'CTP_Nov2013') And '$(Linkage-libsodium)' == 'dynamic' And $(Configuration.IndexOf('Release')) != -1">
|
86
|
+
<Link>
|
87
|
+
<AdditionalDependencies>libsodium-x64-v120-mt-0_5_0_0.imp.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
88
|
+
</Link>
|
89
|
+
</ItemDefinitionGroup>
|
90
|
+
<ItemDefinitionGroup Condition="'$(Platform)' == 'x64' And ('$(PlatformToolset)' == 'v120' Or '$(PlatformToolset)' == 'CTP_Nov2013') And '$(Linkage-libsodium)' == 'dynamic' And $(Configuration.IndexOf('Debug')) != -1">
|
91
|
+
<Link>
|
92
|
+
<AdditionalDependencies>libsodium-x64-v120-mt-gd-0_5_0_0.imp.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
93
|
+
</Link>
|
94
|
+
</ItemDefinitionGroup>
|
95
|
+
|
96
|
+
<!-- dynamic libraries with debug symbols -->
|
97
|
+
<Target Name="libsodium_AfterBuild" AfterTargets="AfterBuild" />
|
98
|
+
<Target Name="libsodium_AfterBuild_Win32_v120_Dynamic_Release"
|
99
|
+
Condition="'$(Platform)' == 'Win32' And ('$(PlatformToolset)' == 'v120' Or '$(PlatformToolset)' == 'CTP_Nov2013') And '$(Linkage-libsodium)' == 'dynamic' And $(Configuration.IndexOf('Release')) != -1"
|
100
|
+
AfterTargets="libsodium_AfterBuild">
|
101
|
+
<Copy SourceFiles="$(MSBuildThisFileDirectory)bin\libsodium-x86-v120-mt-0_5_0_0.dll" DestinationFiles="$(TargetDir)libsodium.dll" SkipUnchangedFiles="true" />
|
102
|
+
<!--<Copy SourceFiles="$(MSBuildThisFileDirectory)bin\libsodium-x86-v120-mt-0_5_0_0.pdb" DestinationFiles="$(TargetDir)libsodium.pdb" SkipUnchangedFiles="true" />-->
|
103
|
+
</Target>
|
104
|
+
<Target Name="libsodium_AfterBuild_Win32_v120_Dynamic_Debug"
|
105
|
+
Condition="'$(Platform)' == 'Win32' And ('$(PlatformToolset)' == 'v120' Or '$(PlatformToolset)' == 'CTP_Nov2013') And '$(Linkage-libsodium)' == 'dynamic' And $(Configuration.IndexOf('Debug')) != -1"
|
106
|
+
AfterTargets="libsodium_AfterBuild">
|
107
|
+
<Copy SourceFiles="$(MSBuildThisFileDirectory)bin\libsodium-x86-v120-mt-gd-0_5_0_0.dll" DestinationFiles="$(TargetDir)libsodium.dll" SkipUnchangedFiles="true" />
|
108
|
+
<Copy SourceFiles="$(MSBuildThisFileDirectory)bin\libsodium-x86-v120-mt-gd-0_5_0_0.pdb" DestinationFiles="$(TargetDir)libsodium.pdb" SkipUnchangedFiles="true" />
|
109
|
+
</Target>
|
110
|
+
<Target Name="libsodium_AfterBuild_x64_v120_Dynamic_Release"
|
111
|
+
Condition="'$(Platform)' == 'x64' And ('$(PlatformToolset)' == 'v120' Or '$(PlatformToolset)' == 'CTP_Nov2013') And '$(Linkage-libsodium)' == 'dynamic' And $(Configuration.IndexOf('Release')) != -1"
|
112
|
+
AfterTargets="libsodium_AfterBuild">
|
113
|
+
<Copy SourceFiles="$(MSBuildThisFileDirectory)bin\libsodium-x64-v120-mt-0_5_0_0.dll" DestinationFiles="$(TargetDir)libsodium.dll" SkipUnchangedFiles="true" />
|
114
|
+
<!--<Copy SourceFiles="$(MSBuildThisFileDirectory)bin\libsodium-x64-v120-mt-0_5_0_0.pdb" DestinationFiles="$(TargetDir)libsodium.pdb" SkipUnchangedFiles="true" />-->
|
115
|
+
</Target>
|
116
|
+
<Target Name="libsodium_AfterBuild_x64_v120_Dynamic_Debug"
|
117
|
+
Condition="'$(Platform)' == 'x64' And ('$(PlatformToolset)' == 'v120' Or '$(PlatformToolset)' == 'CTP_Nov2013') And '$(Linkage-libsodium)' == 'dynamic' And $(Configuration.IndexOf('Debug')) != -1"
|
118
|
+
AfterTargets="libsodium_AfterBuild">
|
119
|
+
<Copy SourceFiles="$(MSBuildThisFileDirectory)bin\libsodium-x64-v120-mt-gd-0_5_0_0.dll" DestinationFiles="$(TargetDir)libsodium.dll" SkipUnchangedFiles="true" />
|
120
|
+
<Copy SourceFiles="$(MSBuildThisFileDirectory)bin\libsodium-x64-v120-mt-gd-0_5_0_0.pdb" DestinationFiles="$(TargetDir)libsodium.pdb" SkipUnchangedFiles="true" />
|
121
|
+
</Target>
|
122
|
+
|
123
|
+
<!--
|
124
|
+
#################################################################
|
125
|
+
# GENERATED SOURCE CODE, DO NOT EDIT EXCEPT EXPERIMENTALLY #
|
126
|
+
#################################################################
|
127
|
+
-->
|
128
|
+
</Project>
|
@@ -0,0 +1,22 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<!--
|
3
|
+
#################################################################
|
4
|
+
# GENERATED SOURCE CODE, DO NOT EDIT EXCEPT EXPERIMENTALLY #
|
5
|
+
#################################################################
|
6
|
+
-->
|
7
|
+
<ProjectSchemaDefinitions xmlns="clr-namespace:Microsoft.Build.Framework.XamlTypes;assembly=Microsoft.Build.Framework">
|
8
|
+
<Rule Name="Linkage-libsodium-uiextension" PageTemplate="tool" DisplayName="NuGet Dependencies" SwitchPrefix="/" Order="1">
|
9
|
+
<Rule.Categories>
|
10
|
+
<Category Name="libsodium" DisplayName="libsodium" />
|
11
|
+
</Rule.Categories>
|
12
|
+
<Rule.DataSource>
|
13
|
+
<DataSource Persistence="ProjectFile" ItemType="" />
|
14
|
+
</Rule.DataSource>
|
15
|
+
<EnumProperty Name="Linkage-libsodium" DisplayName="Linkage" Description="How NuGet libsodium will be linked into the output of this project" Category="libsodium">
|
16
|
+
<EnumValue Name="" DisplayName="Not linked" />
|
17
|
+
<EnumValue Name="dynamic" DisplayName="Dynamic (DLL)" />
|
18
|
+
<EnumValue Name="static" DisplayName="Static (LIB)" />
|
19
|
+
<EnumValue Name="ltcg" DisplayName="Static using link time compile generation (LTCG)" />
|
20
|
+
</EnumProperty>
|
21
|
+
</Rule>
|
22
|
+
</ProjectSchemaDefinitions>
|
@@ -4,14 +4,19 @@ lib_LTLIBRARIES = \
|
|
4
4
|
libsodium_la_SOURCES = \
|
5
5
|
crypto_auth/crypto_auth.c \
|
6
6
|
crypto_auth/hmacsha256/auth_hmacsha256_api.c \
|
7
|
-
crypto_auth/hmacsha256/
|
8
|
-
crypto_auth/hmacsha256/
|
9
|
-
crypto_auth/hmacsha256/
|
7
|
+
crypto_auth/hmacsha256/cp/api.h \
|
8
|
+
crypto_auth/hmacsha256/cp/hmac_hmacsha256.c \
|
9
|
+
crypto_auth/hmacsha256/cp/verify_hmacsha256.c \
|
10
|
+
crypto_auth/hmacsha512/auth_hmacsha512_api.c \
|
11
|
+
crypto_auth/hmacsha512/cp/api.h \
|
12
|
+
crypto_auth/hmacsha512/cp/hmac_hmacsha512.c \
|
13
|
+
crypto_auth/hmacsha512/cp/verify_hmacsha512.c \
|
10
14
|
crypto_auth/hmacsha512256/auth_hmacsha512256_api.c \
|
11
|
-
crypto_auth/hmacsha512256/
|
12
|
-
crypto_auth/hmacsha512256/
|
13
|
-
crypto_auth/hmacsha512256/
|
15
|
+
crypto_auth/hmacsha512256/cp/api.h \
|
16
|
+
crypto_auth/hmacsha512256/cp/hmac_hmacsha512256.c \
|
17
|
+
crypto_auth/hmacsha512256/cp/verify_hmacsha512256.c \
|
14
18
|
crypto_box/crypto_box.c \
|
19
|
+
crypto_box/crypto_box_easy.c \
|
15
20
|
crypto_box/curve25519xsalsa20poly1305/box_curve25519xsalsa20poly1305_api.c \
|
16
21
|
crypto_box/curve25519xsalsa20poly1305/ref/api.h \
|
17
22
|
crypto_box/curve25519xsalsa20poly1305/ref/after_curve25519xsalsa20poly1305.c \
|
@@ -39,31 +44,34 @@ libsodium_la_SOURCES = \
|
|
39
44
|
crypto_generichash/blake2/ref/generichash_blake2b.c \
|
40
45
|
crypto_hash/crypto_hash.c \
|
41
46
|
crypto_hash/sha256/hash_sha256_api.c \
|
42
|
-
crypto_hash/sha256/
|
43
|
-
crypto_hash/sha256/
|
47
|
+
crypto_hash/sha256/cp/api.h \
|
48
|
+
crypto_hash/sha256/cp/hash_sha256.c \
|
44
49
|
crypto_hash/sha512/hash_sha512_api.c \
|
45
|
-
crypto_hash/sha512/
|
46
|
-
crypto_hash/sha512/
|
47
|
-
crypto_hashblocks/sha256/ref/blocks_sha256.c \
|
48
|
-
crypto_hashblocks/sha256/hashblocks_sha256_api.c \
|
49
|
-
crypto_hashblocks/sha256/ref/api.h \
|
50
|
-
crypto_hashblocks/sha512/ref/blocks_sha512.c \
|
51
|
-
crypto_hashblocks/sha512/hashblocks_sha512_api.c \
|
52
|
-
crypto_hashblocks/sha512/ref/api.h \
|
50
|
+
crypto_hash/sha512/cp/api.h \
|
51
|
+
crypto_hash/sha512/cp/hash_sha512.c \
|
53
52
|
crypto_onetimeauth/crypto_onetimeauth.c \
|
54
53
|
crypto_onetimeauth/poly1305/onetimeauth_poly1305.c \
|
55
54
|
crypto_onetimeauth/poly1305/onetimeauth_poly1305_api.c \
|
56
55
|
crypto_onetimeauth/poly1305/onetimeauth_poly1305_try.c \
|
57
|
-
crypto_onetimeauth/poly1305/53/api.h \
|
58
|
-
crypto_onetimeauth/poly1305/53/auth_poly1305_53.c \
|
59
|
-
crypto_onetimeauth/poly1305/53/verify_poly1305_53.c \
|
60
56
|
crypto_onetimeauth/poly1305/donna/api.h \
|
61
|
-
crypto_onetimeauth/poly1305/donna/
|
57
|
+
crypto_onetimeauth/poly1305/donna/poly1305_donna.h \
|
58
|
+
crypto_onetimeauth/poly1305/donna/poly1305_donna32.h \
|
59
|
+
crypto_onetimeauth/poly1305/donna/poly1305_donna64.h \
|
62
60
|
crypto_onetimeauth/poly1305/donna/auth_poly1305_donna.c \
|
63
61
|
crypto_onetimeauth/poly1305/donna/verify_poly1305_donna.c \
|
62
|
+
crypto_pwhash/scryptxsalsa208sha256/crypto_scrypt-common.c \
|
63
|
+
crypto_pwhash/scryptxsalsa208sha256/crypto_scrypt.h \
|
64
|
+
crypto_pwhash/scryptxsalsa208sha256/scrypt_platform.c \
|
65
|
+
crypto_pwhash/scryptxsalsa208sha256/pbkdf2-sha256.c \
|
66
|
+
crypto_pwhash/scryptxsalsa208sha256/pbkdf2-sha256.h \
|
67
|
+
crypto_pwhash/scryptxsalsa208sha256/pwhash_scryptxsalsa208sha256.c \
|
68
|
+
crypto_pwhash/scryptxsalsa208sha256/sysendian.h \
|
69
|
+
crypto_pwhash/scryptxsalsa208sha256/nosse/pwhash_scryptxsalsa208sha256_nosse.c \
|
70
|
+
crypto_pwhash/scryptxsalsa208sha256/sse/pwhash_scryptxsalsa208sha256_sse.c \
|
64
71
|
crypto_scalarmult/crypto_scalarmult.c \
|
65
72
|
crypto_scalarmult/curve25519/scalarmult_curve25519_api.c \
|
66
73
|
crypto_secretbox/crypto_secretbox.c \
|
74
|
+
crypto_secretbox/crypto_secretbox_easy.c \
|
67
75
|
crypto_secretbox/xsalsa20poly1305/secretbox_xsalsa20poly1305_api.c \
|
68
76
|
crypto_secretbox/xsalsa20poly1305/ref/api.h \
|
69
77
|
crypto_secretbox/xsalsa20poly1305/ref/box_xsalsa20poly1305.c \
|
@@ -178,11 +186,15 @@ libsodium_la_SOURCES = \
|
|
178
186
|
crypto_verify/32/verify_32_api.c \
|
179
187
|
crypto_verify/32/ref/api.h \
|
180
188
|
crypto_verify/32/ref/verify_32.c \
|
189
|
+
crypto_verify/64/verify_64_api.c \
|
190
|
+
crypto_verify/64/ref/api.h \
|
191
|
+
crypto_verify/64/ref/verify_64.c \
|
181
192
|
randombytes/randombytes.c \
|
182
193
|
randombytes/salsa20/randombytes_salsa20_random.c \
|
183
194
|
randombytes/sysrandom/randombytes_sysrandom.c \
|
184
195
|
sodium/compat.c \
|
185
196
|
sodium/core.c \
|
197
|
+
sodium/runtime.c \
|
186
198
|
sodium/utils.c \
|
187
199
|
sodium/version.c
|
188
200
|
|
@@ -5,6 +5,5 @@
|
|
5
5
|
#define crypto_auth_verify crypto_auth_hmacsha256_verify
|
6
6
|
#define crypto_auth_BYTES crypto_auth_hmacsha256_BYTES
|
7
7
|
#define crypto_auth_KEYBYTES crypto_auth_hmacsha256_KEYBYTES
|
8
|
-
#define crypto_auth_PRIMITIVE "hmacsha256"
|
9
8
|
#define crypto_auth_IMPLEMENTATION crypto_auth_hmacsha256_IMPLEMENTATION
|
10
9
|
#define crypto_auth_VERSION crypto_auth_hmacsha256_VERSION
|
@@ -0,0 +1,110 @@
|
|
1
|
+
|
2
|
+
/*-
|
3
|
+
* Copyright 2005,2007,2009 Colin Percival
|
4
|
+
* All rights reserved.
|
5
|
+
*
|
6
|
+
* Redistribution and use in source and binary forms, with or without
|
7
|
+
* modification, are permitted provided that the following conditions
|
8
|
+
* are met:
|
9
|
+
* 1. Redistributions of source code must retain the above copyright
|
10
|
+
* notice, this list of conditions and the following disclaimer.
|
11
|
+
* 2. Redistributions in binary form must reproduce the above copyright
|
12
|
+
* notice, this list of conditions and the following disclaimer in the
|
13
|
+
* documentation and/or other materials provided with the distribution.
|
14
|
+
*
|
15
|
+
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
16
|
+
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
17
|
+
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
18
|
+
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
19
|
+
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
20
|
+
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
21
|
+
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
22
|
+
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
23
|
+
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
24
|
+
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
25
|
+
* SUCH DAMAGE.
|
26
|
+
*
|
27
|
+
*/
|
28
|
+
|
29
|
+
#include "api.h"
|
30
|
+
#include "crypto_auth_hmacsha256.h"
|
31
|
+
#include "crypto_hash_sha256.h"
|
32
|
+
#include "utils.h"
|
33
|
+
|
34
|
+
#include <sys/types.h>
|
35
|
+
|
36
|
+
#include <stdint.h>
|
37
|
+
#include <string.h>
|
38
|
+
|
39
|
+
int
|
40
|
+
crypto_auth_hmacsha256_init(crypto_auth_hmacsha256_state *state,
|
41
|
+
const unsigned char *key,
|
42
|
+
size_t keylen)
|
43
|
+
{
|
44
|
+
unsigned char pad[64];
|
45
|
+
unsigned char khash[32];
|
46
|
+
size_t i;
|
47
|
+
|
48
|
+
if (keylen > 64) {
|
49
|
+
crypto_hash_sha256_init(&state->ictx);
|
50
|
+
crypto_hash_sha256_update(&state->ictx, key, keylen);
|
51
|
+
crypto_hash_sha256_final(&state->ictx, khash);
|
52
|
+
key = khash;
|
53
|
+
keylen = 32;
|
54
|
+
}
|
55
|
+
crypto_hash_sha256_init(&state->ictx);
|
56
|
+
memset(pad, 0x36, 64);
|
57
|
+
for (i = 0; i < keylen; i++) {
|
58
|
+
pad[i] ^= key[i];
|
59
|
+
}
|
60
|
+
crypto_hash_sha256_update(&state->ictx, pad, 64);
|
61
|
+
|
62
|
+
crypto_hash_sha256_init(&state->octx);
|
63
|
+
memset(pad, 0x5c, 64);
|
64
|
+
for (i = 0; i < keylen; i++) {
|
65
|
+
pad[i] ^= key[i];
|
66
|
+
}
|
67
|
+
crypto_hash_sha256_update(&state->octx, pad, 64);
|
68
|
+
|
69
|
+
sodium_memzero((void *) khash, sizeof khash);
|
70
|
+
|
71
|
+
return 0;
|
72
|
+
}
|
73
|
+
|
74
|
+
int
|
75
|
+
crypto_auth_hmacsha256_update(crypto_auth_hmacsha256_state *state,
|
76
|
+
const unsigned char *in,
|
77
|
+
unsigned long long inlen)
|
78
|
+
{
|
79
|
+
crypto_hash_sha256_update(&state->ictx, in, inlen);
|
80
|
+
|
81
|
+
return 0;
|
82
|
+
}
|
83
|
+
|
84
|
+
int
|
85
|
+
crypto_auth_hmacsha256_final(crypto_auth_hmacsha256_state *state,
|
86
|
+
unsigned char *out)
|
87
|
+
{
|
88
|
+
unsigned char ihash[32];
|
89
|
+
|
90
|
+
crypto_hash_sha256_final(&state->ictx, ihash);
|
91
|
+
crypto_hash_sha256_update(&state->octx, ihash, 32);
|
92
|
+
crypto_hash_sha256_final(&state->octx, out);
|
93
|
+
|
94
|
+
sodium_memzero((void *) ihash, sizeof ihash);
|
95
|
+
|
96
|
+
return 0;
|
97
|
+
}
|
98
|
+
|
99
|
+
int
|
100
|
+
crypto_auth(unsigned char *out, const unsigned char *in,
|
101
|
+
unsigned long long inlen, const unsigned char *k)
|
102
|
+
{
|
103
|
+
crypto_auth_hmacsha256_state state;
|
104
|
+
|
105
|
+
crypto_auth_hmacsha256_init(&state, k, crypto_auth_KEYBYTES);
|
106
|
+
crypto_auth_hmacsha256_update(&state, in, inlen);
|
107
|
+
crypto_auth_hmacsha256_final(&state, out);
|
108
|
+
|
109
|
+
return 0;
|
110
|
+
}
|
File without changes
|
@@ -0,0 +1,9 @@
|
|
1
|
+
|
2
|
+
#include "crypto_auth_hmacsha512.h"
|
3
|
+
|
4
|
+
#define crypto_auth crypto_auth_hmacsha512
|
5
|
+
#define crypto_auth_verify crypto_auth_hmacsha512_verify
|
6
|
+
#define crypto_auth_BYTES crypto_auth_hmacsha512_BYTES
|
7
|
+
#define crypto_auth_KEYBYTES crypto_auth_hmacsha512_KEYBYTES
|
8
|
+
#define crypto_auth_IMPLEMENTATION crypto_auth_hmacsha512_IMPLEMENTATION
|
9
|
+
#define crypto_auth_VERSION crypto_auth_hmacsha512_VERSION
|
@@ -0,0 +1,110 @@
|
|
1
|
+
|
2
|
+
/*-
|
3
|
+
* Copyright 2005,2007,2009 Colin Percival
|
4
|
+
* All rights reserved.
|
5
|
+
*
|
6
|
+
* Redistribution and use in source and binary forms, with or without
|
7
|
+
* modification, are permitted provided that the following conditions
|
8
|
+
* are met:
|
9
|
+
* 1. Redistributions of source code must retain the above copyright
|
10
|
+
* notice, this list of conditions and the following disclaimer.
|
11
|
+
* 2. Redistributions in binary form must reproduce the above copyright
|
12
|
+
* notice, this list of conditions and the following disclaimer in the
|
13
|
+
* documentation and/or other materials provided with the distribution.
|
14
|
+
*
|
15
|
+
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
16
|
+
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
17
|
+
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
18
|
+
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
19
|
+
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
20
|
+
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
21
|
+
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
22
|
+
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
23
|
+
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
24
|
+
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
25
|
+
* SUCH DAMAGE.
|
26
|
+
*
|
27
|
+
*/
|
28
|
+
|
29
|
+
#include "api.h"
|
30
|
+
#include "crypto_auth_hmacsha512.h"
|
31
|
+
#include "crypto_hash_sha512.h"
|
32
|
+
#include "utils.h"
|
33
|
+
|
34
|
+
#include <sys/types.h>
|
35
|
+
|
36
|
+
#include <stdint.h>
|
37
|
+
#include <string.h>
|
38
|
+
|
39
|
+
int
|
40
|
+
crypto_auth_hmacsha512_init(crypto_auth_hmacsha512_state *state,
|
41
|
+
const unsigned char *key,
|
42
|
+
size_t keylen)
|
43
|
+
{
|
44
|
+
unsigned char pad[128];
|
45
|
+
unsigned char khash[64];
|
46
|
+
size_t i;
|
47
|
+
|
48
|
+
if (keylen > 128) {
|
49
|
+
crypto_hash_sha512_init(&state->ictx);
|
50
|
+
crypto_hash_sha512_update(&state->ictx, key, keylen);
|
51
|
+
crypto_hash_sha512_final(&state->ictx, khash);
|
52
|
+
key = khash;
|
53
|
+
keylen = 64;
|
54
|
+
}
|
55
|
+
crypto_hash_sha512_init(&state->ictx);
|
56
|
+
memset(pad, 0x36, 128);
|
57
|
+
for (i = 0; i < keylen; i++) {
|
58
|
+
pad[i] ^= key[i];
|
59
|
+
}
|
60
|
+
crypto_hash_sha512_update(&state->ictx, pad, 128);
|
61
|
+
|
62
|
+
crypto_hash_sha512_init(&state->octx);
|
63
|
+
memset(pad, 0x5c, 128);
|
64
|
+
for (i = 0; i < keylen; i++) {
|
65
|
+
pad[i] ^= key[i];
|
66
|
+
}
|
67
|
+
crypto_hash_sha512_update(&state->octx, pad, 128);
|
68
|
+
|
69
|
+
sodium_memzero((void *) khash, sizeof khash);
|
70
|
+
|
71
|
+
return 0;
|
72
|
+
}
|
73
|
+
|
74
|
+
int
|
75
|
+
crypto_auth_hmacsha512_update(crypto_auth_hmacsha512_state *state,
|
76
|
+
const unsigned char *in,
|
77
|
+
unsigned long long inlen)
|
78
|
+
{
|
79
|
+
crypto_hash_sha512_update(&state->ictx, in, inlen);
|
80
|
+
|
81
|
+
return 0;
|
82
|
+
}
|
83
|
+
|
84
|
+
int
|
85
|
+
crypto_auth_hmacsha512_final(crypto_auth_hmacsha512_state *state,
|
86
|
+
unsigned char *out)
|
87
|
+
{
|
88
|
+
unsigned char ihash[64];
|
89
|
+
|
90
|
+
crypto_hash_sha512_final(&state->ictx, ihash);
|
91
|
+
crypto_hash_sha512_update(&state->octx, ihash, 64);
|
92
|
+
crypto_hash_sha512_final(&state->octx, out);
|
93
|
+
|
94
|
+
sodium_memzero((void *) ihash, sizeof ihash);
|
95
|
+
|
96
|
+
return 0;
|
97
|
+
}
|
98
|
+
|
99
|
+
int
|
100
|
+
crypto_auth(unsigned char *out, const unsigned char *in,
|
101
|
+
unsigned long long inlen, const unsigned char *k)
|
102
|
+
{
|
103
|
+
crypto_auth_hmacsha512_state state;
|
104
|
+
|
105
|
+
crypto_auth_hmacsha512_init(&state, k, crypto_auth_KEYBYTES);
|
106
|
+
crypto_auth_hmacsha512_update(&state, in, inlen);
|
107
|
+
crypto_auth_hmacsha512_final(&state, out);
|
108
|
+
|
109
|
+
return 0;
|
110
|
+
}
|