rbnacl-libsodium 1.0.6 → 1.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES.md +4 -0
- data/lib/rbnacl/libsodium/version.rb +1 -1
- data/vendor/libsodium/AUTHORS +10 -3
- data/vendor/libsodium/ChangeLog +19 -1
- data/vendor/libsodium/Makefile.in +1 -0
- data/vendor/libsodium/README.markdown +1 -1
- data/vendor/libsodium/THANKS +1 -0
- data/vendor/libsodium/autogen.sh +24 -4
- data/vendor/libsodium/autom4te.cache/output.1 +208 -24
- data/vendor/libsodium/autom4te.cache/output.5 +208 -24
- data/vendor/libsodium/autom4te.cache/requests +869 -869
- data/vendor/libsodium/autom4te.cache/traces.1 +426 -406
- data/vendor/libsodium/autom4te.cache/traces.5 +255 -245
- data/vendor/libsodium/builds/msvc/version.h +2 -2
- data/vendor/libsodium/builds/msvc/vs2010/libsodium/libsodium.vcxproj +14 -44
- data/vendor/libsodium/builds/msvc/vs2010/libsodium/libsodium.vcxproj.filters +36 -132
- data/vendor/libsodium/builds/msvc/vs2012/libsodium/libsodium.vcxproj +14 -44
- data/vendor/libsodium/builds/msvc/vs2012/libsodium/libsodium.vcxproj.filters +36 -132
- data/vendor/libsodium/builds/msvc/vs2013/libsodium/libsodium.vcxproj +14 -44
- data/vendor/libsodium/builds/msvc/vs2013/libsodium/libsodium.vcxproj.filters +36 -132
- data/vendor/libsodium/builds/msvc/vs2015/libsodium/libsodium.vcxproj +14 -44
- data/vendor/libsodium/builds/msvc/vs2015/libsodium/libsodium.vcxproj.filters +62 -158
- data/vendor/libsodium/configure +208 -24
- data/vendor/libsodium/configure.ac +70 -15
- data/vendor/libsodium/dist-build/Makefile.in +1 -0
- data/vendor/libsodium/dist-build/emscripten.sh +52 -19
- data/vendor/libsodium/dist-build/ios.sh +8 -8
- data/vendor/libsodium/dist-build/msys2-win32.sh +2 -1
- data/vendor/libsodium/dist-build/msys2-win64.sh +2 -1
- data/vendor/libsodium/dist-build/osx.sh +2 -2
- data/vendor/libsodium/examples/box.c +3 -1
- data/vendor/libsodium/examples/box_detached.c +4 -2
- data/vendor/libsodium/examples/utils.h +3 -1
- data/vendor/libsodium/libsodium.vcxproj +13 -13
- data/vendor/libsodium/libsodium.vcxproj.filters +31 -35
- data/vendor/libsodium/msvc-scripts/Makefile.in +1 -0
- data/vendor/libsodium/msvc-scripts/process.bat +2 -2
- data/vendor/libsodium/src/Makefile.in +1 -0
- data/vendor/libsodium/src/libsodium/Makefile.am +43 -45
- data/vendor/libsodium/src/libsodium/Makefile.in +250 -249
- data/vendor/libsodium/src/libsodium/crypto_aead/aes256gcm/aesni/aead_aes256gcm_aesni.c +28 -22
- data/vendor/libsodium/src/libsodium/crypto_auth/hmacsha256/cp/hmac_hmacsha256.c +3 -4
- data/vendor/libsodium/src/libsodium/crypto_auth/hmacsha256/cp/verify_hmacsha256.c +3 -3
- data/vendor/libsodium/src/libsodium/crypto_auth/hmacsha512/cp/hmac_hmacsha512.c +3 -4
- data/vendor/libsodium/src/libsodium/crypto_auth/hmacsha512/cp/verify_hmacsha512.c +4 -4
- data/vendor/libsodium/src/libsodium/crypto_auth/hmacsha512256/cp/hmac_hmacsha512256.c +4 -4
- data/vendor/libsodium/src/libsodium/crypto_auth/hmacsha512256/cp/verify_hmacsha512256.c +6 -4
- data/vendor/libsodium/src/libsodium/crypto_box/crypto_box_easy.c +6 -2
- data/vendor/libsodium/src/libsodium/crypto_box/curve25519xsalsa20poly1305/ref/after_curve25519xsalsa20poly1305.c +3 -3
- data/vendor/libsodium/src/libsodium/crypto_box/curve25519xsalsa20poly1305/ref/before_curve25519xsalsa20poly1305.c +5 -3
- data/vendor/libsodium/src/libsodium/crypto_box/curve25519xsalsa20poly1305/ref/box_curve25519xsalsa20poly1305.c +13 -9
- data/vendor/libsodium/src/libsodium/crypto_box/curve25519xsalsa20poly1305/ref/keypair_curve25519xsalsa20poly1305.c +3 -3
- data/vendor/libsodium/src/libsodium/crypto_core/hsalsa20/ref2/core_hsalsa20.c +2 -2
- data/vendor/libsodium/src/libsodium/crypto_core/salsa20/ref/core_salsa20.c +2 -2
- data/vendor/libsodium/src/libsodium/crypto_core/salsa2012/ref/core_salsa2012.c +2 -2
- data/vendor/libsodium/src/libsodium/crypto_core/salsa208/ref/core_salsa208.c +2 -2
- data/vendor/libsodium/src/libsodium/crypto_generichash/blake2/ref/blake2.h +2 -2
- data/vendor/libsodium/src/libsodium/crypto_generichash/blake2/ref/blake2b-ref.c +36 -26
- data/vendor/libsodium/src/libsodium/crypto_generichash/blake2/ref/generichash_blake2b.c +1 -1
- data/vendor/libsodium/src/libsodium/crypto_generichash/crypto_generichash.c +1 -2
- data/vendor/libsodium/src/libsodium/crypto_hash/sha256/cp/hash_sha256.c +2 -3
- data/vendor/libsodium/src/libsodium/crypto_hash/sha512/cp/hash_sha512.c +2 -3
- data/vendor/libsodium/src/libsodium/crypto_onetimeauth/poly1305/donna/{auth_poly1305_donna.c → poly1305_donna.c} +18 -11
- data/vendor/libsodium/src/libsodium/crypto_onetimeauth/poly1305/donna/poly1305_donna.h +1 -5
- data/vendor/libsodium/src/libsodium/crypto_onetimeauth/poly1305/donna/poly1305_donna32.h +10 -9
- data/vendor/libsodium/src/libsodium/crypto_onetimeauth/poly1305/donna/poly1305_donna64.h +17 -9
- data/vendor/libsodium/src/libsodium/crypto_onetimeauth/poly1305/onetimeauth_poly1305.c +10 -1
- data/vendor/libsodium/src/libsodium/crypto_onetimeauth/poly1305/sse2/poly1305_sse2.c +708 -0
- data/vendor/libsodium/src/libsodium/crypto_onetimeauth/poly1305/sse2/poly1305_sse2.h +31 -0
- data/vendor/libsodium/src/libsodium/crypto_pwhash/scryptsalsa208sha256/crypto_scrypt.h +1 -0
- data/vendor/libsodium/src/libsodium/crypto_scalarmult/crypto_scalarmult.c +11 -12
- data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/donna_c64/{smult_curve25519_donna_c64.c → curve25519_donna_c64.c} +32 -15
- data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/donna_c64/curve25519_donna_c64.h +9 -0
- data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/ref10/curve25519_ref10.c +73 -0
- data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/ref10/curve25519_ref10.h +9 -0
- data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/ref10/fe_frombytes_curve25519_ref10.c +1 -0
- data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/sandy2x/consts.S +25 -0
- data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/sandy2x/consts_namespace.h +20 -0
- data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/sandy2x/curve25519_sandy2x.c +114 -0
- data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/sandy2x/curve25519_sandy2x.h +9 -0
- data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/sandy2x/fe.h +25 -0
- data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/sandy2x/fe51.h +33 -0
- data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/sandy2x/fe51_invert.c +57 -0
- data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/sandy2x/fe51_mul.S +189 -0
- data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/sandy2x/fe51_namespace.h +16 -0
- data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/sandy2x/fe51_nsquare.S +165 -0
- data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/sandy2x/fe51_pack.S +219 -0
- data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/sandy2x/fe_frombytes_sandy2x.c +76 -0
- data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/sandy2x/ladder.S +1432 -0
- data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/sandy2x/ladder.h +18 -0
- data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/sandy2x/ladder_base.S +1287 -0
- data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/sandy2x/ladder_base.h +18 -0
- data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/sandy2x/ladder_base_namespace.h +8 -0
- data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/sandy2x/ladder_namespace.h +8 -0
- data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/sandy2x/sandy2x.S +17 -0
- data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/scalarmult_curve25519.c +67 -0
- data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/scalarmult_curve25519.h +11 -0
- data/vendor/libsodium/src/libsodium/crypto_secretbox/xsalsa20poly1305/ref/box_xsalsa20poly1305.c +3 -3
- data/vendor/libsodium/src/libsodium/crypto_shorthash/siphash24/ref/shorthash_siphash24.c +3 -2
- data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge.h +2 -0
- data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_double_scalarmult.c +42 -0
- data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/keypair.c +7 -7
- data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/obsolete.c +113 -0
- data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/open.c +10 -7
- data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/sign.c +10 -10
- data/vendor/libsodium/src/libsodium/crypto_stream/aes128ctr/portable/afternm_aes128ctr.c +2 -2
- data/vendor/libsodium/src/libsodium/crypto_stream/aes128ctr/portable/beforenm_aes128ctr.c +2 -2
- data/vendor/libsodium/src/libsodium/crypto_stream/aes128ctr/portable/stream_aes128ctr.c +10 -9
- data/vendor/libsodium/src/libsodium/crypto_stream/aes128ctr/portable/xor_afternm_aes128ctr.c +2 -3
- data/vendor/libsodium/src/libsodium/crypto_stream/chacha20/ref/stream_chacha20_ref.c +72 -68
- data/vendor/libsodium/src/libsodium/crypto_stream/chacha20/ref/{api.h → stream_chacha20_ref.h} +5 -0
- data/vendor/libsodium/src/libsodium/crypto_stream/chacha20/{stream_chacha20_api.c → stream_chacha20.c} +27 -7
- data/vendor/libsodium/src/libsodium/crypto_stream/chacha20/stream_chacha20.h +22 -0
- data/vendor/libsodium/src/libsodium/crypto_stream/chacha20/vec/stream_chacha20_vec.c +329 -0
- data/vendor/libsodium/src/libsodium/crypto_stream/chacha20/vec/stream_chacha20_vec.h +27 -0
- data/vendor/libsodium/src/libsodium/crypto_stream/salsa20/amd64_xmm6/stream_salsa20_amd64_xmm6.S +1 -1
- data/vendor/libsodium/src/libsodium/crypto_stream/salsa20/ref/stream_salsa20_ref.c +2 -2
- data/vendor/libsodium/src/libsodium/crypto_stream/salsa20/ref/xor_salsa20_ref.c +1 -1
- data/vendor/libsodium/src/libsodium/crypto_stream/salsa2012/ref/stream_salsa2012.c +2 -2
- data/vendor/libsodium/src/libsodium/crypto_stream/salsa2012/ref/xor_salsa2012.c +2 -2
- data/vendor/libsodium/src/libsodium/crypto_stream/salsa208/ref/stream_salsa208.c +2 -2
- data/vendor/libsodium/src/libsodium/crypto_stream/salsa208/ref/xor_salsa208.c +2 -2
- data/vendor/libsodium/src/libsodium/crypto_stream/xsalsa20/ref/stream_xsalsa20.c +2 -2
- data/vendor/libsodium/src/libsodium/crypto_stream/xsalsa20/ref/xor_xsalsa20.c +4 -4
- data/vendor/libsodium/src/libsodium/crypto_verify/16/ref/verify_16.c +14 -21
- data/vendor/libsodium/src/libsodium/crypto_verify/32/ref/verify_32.c +14 -37
- data/vendor/libsodium/src/libsodium/crypto_verify/64/ref/verify_64.c +14 -69
- data/vendor/libsodium/src/libsodium/include/Makefile.in +1 -0
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_box.h +8 -4
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_box_curve25519xsalsa20poly1305.h +4 -2
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_generichash_blake2b.h +2 -2
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_onetimeauth_poly1305.h +2 -3
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_scalarmult.h +2 -1
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_scalarmult_curve25519.h +6 -1
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_stream_chacha20.h +5 -0
- data/vendor/libsodium/src/libsodium/include/sodium/randombytes_nativeclient.h +6 -20
- data/vendor/libsodium/src/libsodium/include/sodium/randombytes_salsa20_random.h +1 -28
- data/vendor/libsodium/src/libsodium/include/sodium/randombytes_sysrandom.h +1 -27
- data/vendor/libsodium/src/libsodium/include/sodium/runtime.h +3 -0
- data/vendor/libsodium/src/libsodium/include/sodium/utils.h +6 -0
- data/vendor/libsodium/src/libsodium/randombytes/nativeclient/randombytes_nativeclient.c +3 -3
- data/vendor/libsodium/src/libsodium/randombytes/salsa20/randombytes_salsa20_random.c +58 -51
- data/vendor/libsodium/src/libsodium/randombytes/sysrandom/randombytes_sysrandom.c +23 -18
- data/vendor/libsodium/src/libsodium/sodium/core.c +4 -0
- data/vendor/libsodium/src/libsodium/sodium/runtime.c +34 -15
- data/vendor/libsodium/src/libsodium/sodium/utils.c +104 -14
- data/vendor/libsodium/test/Makefile.in +1 -0
- data/vendor/libsodium/test/default/Makefile.in +1 -0
- data/vendor/libsodium/test/default/auth.c +5 -5
- data/vendor/libsodium/test/default/auth2.c +3 -3
- data/vendor/libsodium/test/default/auth3.c +3 -3
- data/vendor/libsodium/test/default/auth5.c +4 -4
- data/vendor/libsodium/test/default/auth6.c +3 -3
- data/vendor/libsodium/test/default/auth7.c +4 -4
- data/vendor/libsodium/test/default/box.c +13 -9
- data/vendor/libsodium/test/default/box2.c +11 -8
- data/vendor/libsodium/test/default/box7.c +11 -9
- data/vendor/libsodium/test/default/box8.c +32 -19
- data/vendor/libsodium/test/default/box_easy.c +31 -10
- data/vendor/libsodium/test/default/box_easy.exp +3 -19
- data/vendor/libsodium/test/default/box_easy2.c +30 -15
- data/vendor/libsodium/test/default/box_seed.c +1 -1
- data/vendor/libsodium/test/default/cmptest.h +22 -1
- data/vendor/libsodium/test/default/core1.c +6 -5
- data/vendor/libsodium/test/default/core2.c +6 -5
- data/vendor/libsodium/test/default/core3.c +8 -7
- data/vendor/libsodium/test/default/core4.c +11 -8
- data/vendor/libsodium/test/default/core5.c +7 -5
- data/vendor/libsodium/test/default/core6.c +8 -6
- data/vendor/libsodium/test/default/generichash.c +0 -15
- data/vendor/libsodium/test/default/generichash.exp +0 -1
- data/vendor/libsodium/test/default/generichash3.c +1 -21
- data/vendor/libsodium/test/default/generichash3.exp +1 -1
- data/vendor/libsodium/test/default/hash.c +3 -3
- data/vendor/libsodium/test/default/hash3.c +2 -2
- data/vendor/libsodium/test/default/index.html.tpl +84 -0
- data/vendor/libsodium/test/default/onetimeauth.c +3 -3
- data/vendor/libsodium/test/default/onetimeauth2.c +5 -4
- data/vendor/libsodium/test/default/onetimeauth7.c +4 -4
- data/vendor/libsodium/test/default/pre.js.inc +14 -6
- data/vendor/libsodium/test/default/randombytes.c +2 -2
- data/vendor/libsodium/test/default/scalarmult.c +19 -6
- data/vendor/libsodium/test/default/scalarmult.exp +1 -0
- data/vendor/libsodium/test/default/scalarmult2.c +2 -2
- data/vendor/libsodium/test/default/scalarmult5.c +6 -4
- data/vendor/libsodium/test/default/scalarmult6.c +5 -3
- data/vendor/libsodium/test/default/scalarmult7.c +11 -7
- data/vendor/libsodium/test/default/secretbox.c +7 -6
- data/vendor/libsodium/test/default/secretbox2.c +7 -6
- data/vendor/libsodium/test/default/secretbox7.c +5 -5
- data/vendor/libsodium/test/default/secretbox8.c +5 -5
- data/vendor/libsodium/test/default/secretbox_easy.c +27 -17
- data/vendor/libsodium/test/default/secretbox_easy.exp +7 -95
- data/vendor/libsodium/test/default/secretbox_easy2.c +22 -10
- data/vendor/libsodium/test/default/sign.c +5 -0
- data/vendor/libsodium/test/default/sodium_utils.c +73 -0
- data/vendor/libsodium/test/default/sodium_utils.exp +6 -0
- data/vendor/libsodium/test/default/stream.c +7 -6
- data/vendor/libsodium/test/default/stream2.c +4 -4
- data/vendor/libsodium/test/default/stream3.c +6 -5
- data/vendor/libsodium/test/default/stream4.c +7 -6
- data/vendor/libsodium/test/default/verify1.c +61 -18
- data/vendor/libsodium/test/default/verify1.exp +2 -6
- metadata +37 -44
- data/vendor/libsodium/src/libsodium/crypto_auth/hmacsha256/cp/api.h +0 -9
- data/vendor/libsodium/src/libsodium/crypto_auth/hmacsha512/cp/api.h +0 -9
- data/vendor/libsodium/src/libsodium/crypto_auth/hmacsha512256/cp/api.h +0 -9
- data/vendor/libsodium/src/libsodium/crypto_box/curve25519xsalsa20poly1305/ref/api.h +0 -20
- data/vendor/libsodium/src/libsodium/crypto_core/hsalsa20/ref2/api.h +0 -10
- data/vendor/libsodium/src/libsodium/crypto_core/salsa20/ref/api.h +0 -10
- data/vendor/libsodium/src/libsodium/crypto_core/salsa2012/ref/api.h +0 -10
- data/vendor/libsodium/src/libsodium/crypto_core/salsa208/ref/api.h +0 -10
- data/vendor/libsodium/src/libsodium/crypto_generichash/blake2/ref/api.h +0 -2
- data/vendor/libsodium/src/libsodium/crypto_hash/sha256/cp/api.h +0 -10
- data/vendor/libsodium/src/libsodium/crypto_hash/sha512/cp/api.h +0 -10
- data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/donna_c64/api.h +0 -6
- data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/donna_c64/base_curve25519_donna_c64.c +0 -13
- data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/ref10/api.h +0 -5
- data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/ref10/base_curve25519_ref10.c +0 -14
- data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/ref10/scalarmult_curve25519_ref10.c +0 -54
- data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/scalarmult_curve25519_api.c +0 -14
- data/vendor/libsodium/src/libsodium/crypto_secretbox/xsalsa20poly1305/ref/api.h +0 -11
- data/vendor/libsodium/src/libsodium/crypto_shorthash/siphash24/ref/api.h +0 -7
- data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/api.h +0 -15
- data/vendor/libsodium/src/libsodium/crypto_sign/edwards25519sha512batch/ref/api.h +0 -12
- data/vendor/libsodium/src/libsodium/crypto_sign/edwards25519sha512batch/ref/fe25519.h +0 -54
- data/vendor/libsodium/src/libsodium/crypto_sign/edwards25519sha512batch/ref/fe25519_edwards25519sha512batch.c +0 -348
- data/vendor/libsodium/src/libsodium/crypto_sign/edwards25519sha512batch/ref/ge25519.h +0 -34
- data/vendor/libsodium/src/libsodium/crypto_sign/edwards25519sha512batch/ref/ge25519_edwards25519sha512batch.c +0 -230
- data/vendor/libsodium/src/libsodium/crypto_sign/edwards25519sha512batch/ref/sc25519.h +0 -51
- data/vendor/libsodium/src/libsodium/crypto_sign/edwards25519sha512batch/ref/sc25519_edwards25519sha512batch.c +0 -150
- data/vendor/libsodium/src/libsodium/crypto_sign/edwards25519sha512batch/ref/sign_edwards25519sha512batch.c +0 -106
- data/vendor/libsodium/src/libsodium/crypto_sign/edwards25519sha512batch/sign_edwards25519sha512batch_api.c +0 -16
- data/vendor/libsodium/src/libsodium/crypto_stream/aes128ctr/portable/api.h +0 -13
- data/vendor/libsodium/src/libsodium/crypto_stream/salsa20/amd64_xmm6/api.h +0 -1
- data/vendor/libsodium/src/libsodium/crypto_stream/salsa20/ref/api.h +0 -5
- data/vendor/libsodium/src/libsodium/crypto_stream/salsa2012/ref/api.h +0 -10
- data/vendor/libsodium/src/libsodium/crypto_stream/salsa208/ref/api.h +0 -9
- data/vendor/libsodium/src/libsodium/crypto_stream/xsalsa20/ref/api.h +0 -11
- data/vendor/libsodium/src/libsodium/crypto_verify/16/ref/api.h +0 -2
- data/vendor/libsodium/src/libsodium/crypto_verify/32/ref/api.h +0 -2
- data/vendor/libsodium/src/libsodium/crypto_verify/64/ref/api.h +0 -2
@@ -0,0 +1,27 @@
|
|
1
|
+
|
2
|
+
#include <stdint.h>
|
3
|
+
|
4
|
+
#include "crypto_stream_chacha20.h"
|
5
|
+
|
6
|
+
extern struct crypto_stream_chacha20_implementation
|
7
|
+
crypto_stream_chacha20_vec_implementation;
|
8
|
+
|
9
|
+
int
|
10
|
+
crypto_stream_chacha20_vec(unsigned char *c, unsigned long long clen,
|
11
|
+
const unsigned char *n, const unsigned char *k);
|
12
|
+
|
13
|
+
int
|
14
|
+
crypto_stream_chacha20_vec_xor_ic(unsigned char *c, const unsigned char *m,
|
15
|
+
unsigned long long mlen,
|
16
|
+
const unsigned char *n, uint64_t ic,
|
17
|
+
const unsigned char *k);
|
18
|
+
|
19
|
+
int
|
20
|
+
crypto_stream_chacha20_ietf_vec(unsigned char *c, unsigned long long clen,
|
21
|
+
const unsigned char *n, const unsigned char *k);
|
22
|
+
|
23
|
+
int
|
24
|
+
crypto_stream_chacha20_ietf_vec_xor_ic(unsigned char *c, const unsigned char *m,
|
25
|
+
unsigned long long mlen,
|
26
|
+
const unsigned char *n, uint32_t ic,
|
27
|
+
const unsigned char *k);
|
@@ -4,8 +4,8 @@ D. J. Bernstein
|
|
4
4
|
Public domain.
|
5
5
|
*/
|
6
6
|
|
7
|
-
#include "api.h"
|
8
7
|
#include "crypto_core_salsa20.h"
|
8
|
+
#include "crypto_stream_salsa20.h"
|
9
9
|
#include "utils.h"
|
10
10
|
|
11
11
|
#ifndef HAVE_AMD64_ASM
|
@@ -16,7 +16,7 @@ static const unsigned char sigma[16] = {
|
|
16
16
|
'e', 'x', 'p', 'a', 'n', 'd', ' ', '3', '2', '-', 'b', 'y', 't', 'e', ' ', 'k'
|
17
17
|
};
|
18
18
|
|
19
|
-
int
|
19
|
+
int crypto_stream_salsa20(
|
20
20
|
unsigned char *c,unsigned long long clen,
|
21
21
|
const unsigned char *n,
|
22
22
|
const unsigned char *k
|
@@ -4,8 +4,8 @@ D. J. Bernstein
|
|
4
4
|
Public domain.
|
5
5
|
*/
|
6
6
|
|
7
|
-
#include "api.h"
|
8
7
|
#include "crypto_core_salsa2012.h"
|
8
|
+
#include "crypto_stream_salsa2012.h"
|
9
9
|
#include "utils.h"
|
10
10
|
|
11
11
|
typedef unsigned int uint32;
|
@@ -14,7 +14,7 @@ static const unsigned char sigma[16] = {
|
|
14
14
|
'e', 'x', 'p', 'a', 'n', 'd', ' ', '3', '2', '-', 'b', 'y', 't', 'e', ' ', 'k'
|
15
15
|
};
|
16
16
|
|
17
|
-
int
|
17
|
+
int crypto_stream_salsa2012(
|
18
18
|
unsigned char *c,unsigned long long clen,
|
19
19
|
const unsigned char *n,
|
20
20
|
const unsigned char *k
|
@@ -4,8 +4,8 @@ D. J. Bernstein
|
|
4
4
|
Public domain.
|
5
5
|
*/
|
6
6
|
|
7
|
-
#include "api.h"
|
8
7
|
#include "crypto_core_salsa2012.h"
|
8
|
+
#include "crypto_stream_salsa2012.h"
|
9
9
|
#include "utils.h"
|
10
10
|
|
11
11
|
typedef unsigned int uint32;
|
@@ -14,7 +14,7 @@ static const unsigned char sigma[16] = {
|
|
14
14
|
'e', 'x', 'p', 'a', 'n', 'd', ' ', '3', '2', '-', 'b', 'y', 't', 'e', ' ', 'k'
|
15
15
|
};
|
16
16
|
|
17
|
-
int
|
17
|
+
int crypto_stream_salsa2012_xor(
|
18
18
|
unsigned char *c,
|
19
19
|
const unsigned char *m,unsigned long long mlen,
|
20
20
|
const unsigned char *n,
|
@@ -4,8 +4,8 @@ D. J. Bernstein
|
|
4
4
|
Public domain.
|
5
5
|
*/
|
6
6
|
|
7
|
-
#include "api.h"
|
8
7
|
#include "crypto_core_salsa208.h"
|
8
|
+
#include "crypto_stream_salsa208.h"
|
9
9
|
#include "utils.h"
|
10
10
|
|
11
11
|
typedef unsigned int uint32;
|
@@ -14,7 +14,7 @@ static const unsigned char sigma[16] = {
|
|
14
14
|
'e', 'x', 'p', 'a', 'n', 'd', ' ', '3', '2', '-', 'b', 'y', 't', 'e', ' ', 'k'
|
15
15
|
};
|
16
16
|
|
17
|
-
int
|
17
|
+
int crypto_stream_salsa208(
|
18
18
|
unsigned char *c,unsigned long long clen,
|
19
19
|
const unsigned char *n,
|
20
20
|
const unsigned char *k
|
@@ -4,8 +4,8 @@ D. J. Bernstein
|
|
4
4
|
Public domain.
|
5
5
|
*/
|
6
6
|
|
7
|
-
#include "api.h"
|
8
7
|
#include "crypto_core_salsa208.h"
|
8
|
+
#include "crypto_stream_salsa208.h"
|
9
9
|
#include "utils.h"
|
10
10
|
|
11
11
|
typedef unsigned int uint32;
|
@@ -14,7 +14,7 @@ static const unsigned char sigma[16] = {
|
|
14
14
|
'e', 'x', 'p', 'a', 'n', 'd', ' ', '3', '2', '-', 'b', 'y', 't', 'e', ' ', 'k'
|
15
15
|
};
|
16
16
|
|
17
|
-
int
|
17
|
+
int crypto_stream_salsa208_xor(
|
18
18
|
unsigned char *c,
|
19
19
|
const unsigned char *m,unsigned long long mlen,
|
20
20
|
const unsigned char *n,
|
@@ -4,16 +4,16 @@ D. J. Bernstein
|
|
4
4
|
Public domain.
|
5
5
|
*/
|
6
6
|
|
7
|
-
#include "api.h"
|
8
7
|
#include "crypto_core_hsalsa20.h"
|
9
8
|
#include "crypto_stream_salsa20.h"
|
9
|
+
#include "crypto_stream_xsalsa20.h"
|
10
10
|
#include "utils.h"
|
11
11
|
|
12
12
|
static const unsigned char sigma[16] = {
|
13
13
|
'e', 'x', 'p', 'a', 'n', 'd', ' ', '3', '2', '-', 'b', 'y', 't', 'e', ' ', 'k'
|
14
14
|
};
|
15
15
|
|
16
|
-
int
|
16
|
+
int crypto_stream_xsalsa20(
|
17
17
|
unsigned char *c,unsigned long long clen,
|
18
18
|
const unsigned char *n,
|
19
19
|
const unsigned char *k
|
@@ -4,16 +4,16 @@ D. J. Bernstein
|
|
4
4
|
Public domain.
|
5
5
|
*/
|
6
6
|
|
7
|
-
#include "api.h"
|
8
7
|
#include "crypto_core_hsalsa20.h"
|
9
8
|
#include "crypto_stream_salsa20.h"
|
9
|
+
#include "crypto_stream_xsalsa20.h"
|
10
10
|
#include "utils.h"
|
11
11
|
|
12
12
|
static const unsigned char sigma[16] = {
|
13
13
|
'e', 'x', 'p', 'a', 'n', 'd', ' ', '3', '2', '-', 'b', 'y', 't', 'e', ' ', 'k'
|
14
14
|
};
|
15
15
|
|
16
|
-
int
|
16
|
+
int crypto_stream_xsalsa20_xor_ic(
|
17
17
|
unsigned char *c,
|
18
18
|
const unsigned char *m,unsigned long long mlen,
|
19
19
|
const unsigned char *n,uint64_t ic,
|
@@ -28,12 +28,12 @@ int crypto_stream_xor_ic(
|
|
28
28
|
return ret;
|
29
29
|
}
|
30
30
|
|
31
|
-
int
|
31
|
+
int crypto_stream_xsalsa20_xor(
|
32
32
|
unsigned char *c,
|
33
33
|
const unsigned char *m,unsigned long long mlen,
|
34
34
|
const unsigned char *n,
|
35
35
|
const unsigned char *k
|
36
36
|
)
|
37
37
|
{
|
38
|
-
return
|
38
|
+
return crypto_stream_xsalsa20_xor_ic(c, m, mlen, n, 0ULL, k);
|
39
39
|
}
|
@@ -1,24 +1,17 @@
|
|
1
|
-
#include "api.h"
|
2
1
|
|
3
|
-
|
2
|
+
#include <stddef.h>
|
3
|
+
#include <stdint.h>
|
4
|
+
|
5
|
+
#include "crypto_verify_16.h"
|
6
|
+
|
7
|
+
int
|
8
|
+
crypto_verify_16(const unsigned char *x, const unsigned char *y)
|
4
9
|
{
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
F(5)
|
13
|
-
F(6)
|
14
|
-
F(7)
|
15
|
-
F(8)
|
16
|
-
F(9)
|
17
|
-
F(10)
|
18
|
-
F(11)
|
19
|
-
F(12)
|
20
|
-
F(13)
|
21
|
-
F(14)
|
22
|
-
F(15)
|
23
|
-
return (1 & ((differentbits - 1) >> 8)) - 1;
|
10
|
+
uint_fast16_t d = 0U;
|
11
|
+
int i;
|
12
|
+
|
13
|
+
for (i = 0; i < 16; i++) {
|
14
|
+
d |= x[i] ^ y[i];
|
15
|
+
}
|
16
|
+
return (1 & ((d - 1) >> 8)) - 1;
|
24
17
|
}
|
@@ -1,40 +1,17 @@
|
|
1
|
-
#include "api.h"
|
2
1
|
|
3
|
-
|
2
|
+
#include <stddef.h>
|
3
|
+
#include <stdint.h>
|
4
|
+
|
5
|
+
#include "crypto_verify_32.h"
|
6
|
+
|
7
|
+
int
|
8
|
+
crypto_verify_32(const unsigned char *x, const unsigned char *y)
|
4
9
|
{
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
F(5)
|
13
|
-
F(6)
|
14
|
-
F(7)
|
15
|
-
F(8)
|
16
|
-
F(9)
|
17
|
-
F(10)
|
18
|
-
F(11)
|
19
|
-
F(12)
|
20
|
-
F(13)
|
21
|
-
F(14)
|
22
|
-
F(15)
|
23
|
-
F(16)
|
24
|
-
F(17)
|
25
|
-
F(18)
|
26
|
-
F(19)
|
27
|
-
F(20)
|
28
|
-
F(21)
|
29
|
-
F(22)
|
30
|
-
F(23)
|
31
|
-
F(24)
|
32
|
-
F(25)
|
33
|
-
F(26)
|
34
|
-
F(27)
|
35
|
-
F(28)
|
36
|
-
F(29)
|
37
|
-
F(30)
|
38
|
-
F(31)
|
39
|
-
return (1 & ((differentbits - 1) >> 8)) - 1;
|
10
|
+
uint_fast16_t d = 0U;
|
11
|
+
int i;
|
12
|
+
|
13
|
+
for (i = 0; i < 32; i++) {
|
14
|
+
d |= x[i] ^ y[i];
|
15
|
+
}
|
16
|
+
return (1 & ((d - 1) >> 8)) - 1;
|
40
17
|
}
|
@@ -1,72 +1,17 @@
|
|
1
|
-
#include "api.h"
|
2
1
|
|
3
|
-
|
2
|
+
#include <stddef.h>
|
3
|
+
#include <stdint.h>
|
4
|
+
|
5
|
+
#include "crypto_verify_64.h"
|
6
|
+
|
7
|
+
int
|
8
|
+
crypto_verify_64(const unsigned char *x, const unsigned char *y)
|
4
9
|
{
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
F(5)
|
13
|
-
F(6)
|
14
|
-
F(7)
|
15
|
-
F(8)
|
16
|
-
F(9)
|
17
|
-
F(10)
|
18
|
-
F(11)
|
19
|
-
F(12)
|
20
|
-
F(13)
|
21
|
-
F(14)
|
22
|
-
F(15)
|
23
|
-
F(16)
|
24
|
-
F(17)
|
25
|
-
F(18)
|
26
|
-
F(19)
|
27
|
-
F(20)
|
28
|
-
F(21)
|
29
|
-
F(22)
|
30
|
-
F(23)
|
31
|
-
F(24)
|
32
|
-
F(25)
|
33
|
-
F(26)
|
34
|
-
F(27)
|
35
|
-
F(28)
|
36
|
-
F(29)
|
37
|
-
F(30)
|
38
|
-
F(31)
|
39
|
-
F(32)
|
40
|
-
F(33)
|
41
|
-
F(34)
|
42
|
-
F(35)
|
43
|
-
F(36)
|
44
|
-
F(37)
|
45
|
-
F(38)
|
46
|
-
F(39)
|
47
|
-
F(40)
|
48
|
-
F(41)
|
49
|
-
F(42)
|
50
|
-
F(43)
|
51
|
-
F(44)
|
52
|
-
F(45)
|
53
|
-
F(46)
|
54
|
-
F(47)
|
55
|
-
F(48)
|
56
|
-
F(49)
|
57
|
-
F(50)
|
58
|
-
F(51)
|
59
|
-
F(52)
|
60
|
-
F(53)
|
61
|
-
F(54)
|
62
|
-
F(55)
|
63
|
-
F(56)
|
64
|
-
F(57)
|
65
|
-
F(58)
|
66
|
-
F(59)
|
67
|
-
F(60)
|
68
|
-
F(61)
|
69
|
-
F(62)
|
70
|
-
F(63)
|
71
|
-
return (1 & ((differentbits - 1) >> 8)) - 1;
|
10
|
+
uint_fast16_t d = 0U;
|
11
|
+
int i;
|
12
|
+
|
13
|
+
for (i = 0; i < 64; i++) {
|
14
|
+
d |= x[i] ^ y[i];
|
15
|
+
}
|
16
|
+
return (1 & ((d - 1) >> 8)) - 1;
|
72
17
|
}
|
@@ -54,7 +54,8 @@ int crypto_box_keypair(unsigned char *pk, unsigned char *sk);
|
|
54
54
|
SODIUM_EXPORT
|
55
55
|
int crypto_box_easy(unsigned char *c, const unsigned char *m,
|
56
56
|
unsigned long long mlen, const unsigned char *n,
|
57
|
-
const unsigned char *pk, const unsigned char *sk)
|
57
|
+
const unsigned char *pk, const unsigned char *sk)
|
58
|
+
__attribute__ ((warn_unused_result));
|
58
59
|
|
59
60
|
SODIUM_EXPORT
|
60
61
|
int crypto_box_open_easy(unsigned char *m, const unsigned char *c,
|
@@ -66,7 +67,8 @@ SODIUM_EXPORT
|
|
66
67
|
int crypto_box_detached(unsigned char *c, unsigned char *mac,
|
67
68
|
const unsigned char *m, unsigned long long mlen,
|
68
69
|
const unsigned char *n, const unsigned char *pk,
|
69
|
-
const unsigned char *sk)
|
70
|
+
const unsigned char *sk)
|
71
|
+
__attribute__ ((warn_unused_result));
|
70
72
|
|
71
73
|
SODIUM_EXPORT
|
72
74
|
int crypto_box_open_detached(unsigned char *m, const unsigned char *c,
|
@@ -85,7 +87,8 @@ size_t crypto_box_beforenmbytes(void);
|
|
85
87
|
|
86
88
|
SODIUM_EXPORT
|
87
89
|
int crypto_box_beforenm(unsigned char *k, const unsigned char *pk,
|
88
|
-
const unsigned char *sk)
|
90
|
+
const unsigned char *sk)
|
91
|
+
__attribute__ ((warn_unused_result));
|
89
92
|
|
90
93
|
SODIUM_EXPORT
|
91
94
|
int crypto_box_easy_afternm(unsigned char *c, const unsigned char *m,
|
@@ -139,7 +142,8 @@ size_t crypto_box_boxzerobytes(void);
|
|
139
142
|
SODIUM_EXPORT
|
140
143
|
int crypto_box(unsigned char *c, const unsigned char *m,
|
141
144
|
unsigned long long mlen, const unsigned char *n,
|
142
|
-
const unsigned char *pk, const unsigned char *sk)
|
145
|
+
const unsigned char *pk, const unsigned char *sk)
|
146
|
+
__attribute__ ((warn_unused_result));
|
143
147
|
|
144
148
|
SODIUM_EXPORT
|
145
149
|
int crypto_box_open(unsigned char *m, const unsigned char *c,
|
@@ -51,7 +51,8 @@ int crypto_box_curve25519xsalsa20poly1305(unsigned char *c,
|
|
51
51
|
unsigned long long mlen,
|
52
52
|
const unsigned char *n,
|
53
53
|
const unsigned char *pk,
|
54
|
-
const unsigned char *sk)
|
54
|
+
const unsigned char *sk)
|
55
|
+
__attribute__ ((warn_unused_result));
|
55
56
|
|
56
57
|
SODIUM_EXPORT
|
57
58
|
int crypto_box_curve25519xsalsa20poly1305_open(unsigned char *m,
|
@@ -74,7 +75,8 @@ int crypto_box_curve25519xsalsa20poly1305_keypair(unsigned char *pk,
|
|
74
75
|
SODIUM_EXPORT
|
75
76
|
int crypto_box_curve25519xsalsa20poly1305_beforenm(unsigned char *k,
|
76
77
|
const unsigned char *pk,
|
77
|
-
const unsigned char *sk)
|
78
|
+
const unsigned char *sk)
|
79
|
+
__attribute__ ((warn_unused_result));
|
78
80
|
|
79
81
|
SODIUM_EXPORT
|
80
82
|
int crypto_box_curve25519xsalsa20poly1305_afternm(unsigned char *c,
|
@@ -14,7 +14,7 @@
|
|
14
14
|
extern "C" {
|
15
15
|
#endif
|
16
16
|
|
17
|
-
#
|
17
|
+
#if defined(__IBMC__) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
|
18
18
|
# pragma pack(1)
|
19
19
|
#else
|
20
20
|
# pragma pack(push, 1)
|
@@ -29,7 +29,7 @@ typedef CRYPTO_ALIGN(64) struct crypto_generichash_blake2b_state {
|
|
29
29
|
uint8_t last_node;
|
30
30
|
} crypto_generichash_blake2b_state;
|
31
31
|
|
32
|
-
#
|
32
|
+
#if defined(__IBMC__) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
|
33
33
|
# pragma pack()
|
34
34
|
#else
|
35
35
|
# pragma pack(pop)
|