rbnacl-libsodium 0.4.5a
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +35 -0
- data/.gitmodules +3 -0
- data/CHANGES.md +3 -0
- data/Gemfile +6 -0
- data/LICENSE +21 -0
- data/README.md +23 -0
- data/Rakefile +1 -0
- data/ext/rbnacl/extconf.rb +30 -0
- data/lib/rbnacl/libsodium.rb +11 -0
- data/lib/rbnacl/libsodium/version.rb +5 -0
- data/rbnacl-libsodium.gemspec +25 -0
- data/vendor/libsodium/AUTHORS +101 -0
- data/vendor/libsodium/ChangeLog +68 -0
- data/vendor/libsodium/LICENSE +16 -0
- data/vendor/libsodium/Makefile.am +20 -0
- data/vendor/libsodium/README +1 -0
- data/vendor/libsodium/README.markdown +246 -0
- data/vendor/libsodium/THANKS +17 -0
- data/vendor/libsodium/autogen.sh +16 -0
- data/vendor/libsodium/configure.ac +405 -0
- data/vendor/libsodium/dist-build/android.sh +48 -0
- data/vendor/libsodium/dist-build/iphone.sh +16 -0
- data/vendor/libsodium/dist-build/msys.sh +9 -0
- data/vendor/libsodium/libsodium.pc.in +11 -0
- data/vendor/libsodium/libsodium.sln +38 -0
- data/vendor/libsodium/libsodium.vcxproj +508 -0
- data/vendor/libsodium/libsodium.vcxproj.filters +569 -0
- data/vendor/libsodium/logo.png +0 -0
- data/vendor/libsodium/m4/ax_check_compile_flag.m4 +73 -0
- data/vendor/libsodium/m4/ax_check_gnu_make.m4 +78 -0
- data/vendor/libsodium/m4/ax_check_link_flag.m4 +72 -0
- data/vendor/libsodium/m4/ld-output-def.m4 +29 -0
- data/vendor/libsodium/m4/pkg.m4 +214 -0
- data/vendor/libsodium/msvc-scripts/Makefile.am +4 -0
- data/vendor/libsodium/msvc-scripts/process.bat +8 -0
- data/vendor/libsodium/msvc-scripts/rep.vbs +12 -0
- data/vendor/libsodium/msvc-scripts/sodium.props +25 -0
- data/vendor/libsodium/src/Makefile.am +3 -0
- data/vendor/libsodium/src/libsodium/Makefile.am +232 -0
- data/vendor/libsodium/src/libsodium/crypto_auth/crypto_auth.c +34 -0
- data/vendor/libsodium/src/libsodium/crypto_auth/hmacsha256/auth_hmacsha256_api.c +16 -0
- data/vendor/libsodium/src/libsodium/crypto_auth/hmacsha256/checksum +1 -0
- data/vendor/libsodium/src/libsodium/crypto_auth/hmacsha256/ref/api.h +10 -0
- data/vendor/libsodium/src/libsodium/crypto_auth/hmacsha256/ref/hmac_hmacsha256.c +83 -0
- data/vendor/libsodium/src/libsodium/crypto_auth/hmacsha256/ref/verify_hmacsha256.c +9 -0
- data/vendor/libsodium/src/libsodium/crypto_auth/hmacsha512256/auth_hmacsha512256_api.c +16 -0
- data/vendor/libsodium/src/libsodium/crypto_auth/hmacsha512256/checksum +1 -0
- data/vendor/libsodium/src/libsodium/crypto_auth/hmacsha512256/ref/api.h +10 -0
- data/vendor/libsodium/src/libsodium/crypto_auth/hmacsha512256/ref/hmac_hmacsha512256.c +86 -0
- data/vendor/libsodium/src/libsodium/crypto_auth/hmacsha512256/ref/verify_hmacsha512256.c +9 -0
- data/vendor/libsodium/src/libsodium/crypto_auth/try.c +119 -0
- data/vendor/libsodium/src/libsodium/crypto_box/crypto_box.c +95 -0
- data/vendor/libsodium/src/libsodium/crypto_box/curve25519xsalsa20poly1305/box_curve25519xsalsa20poly1305_api.c +41 -0
- data/vendor/libsodium/src/libsodium/crypto_box/curve25519xsalsa20poly1305/checksum +1 -0
- data/vendor/libsodium/src/libsodium/crypto_box/curve25519xsalsa20poly1305/ref/after_curve25519xsalsa20poly1305.c +22 -0
- data/vendor/libsodium/src/libsodium/crypto_box/curve25519xsalsa20poly1305/ref/api.h +19 -0
- data/vendor/libsodium/src/libsodium/crypto_box/curve25519xsalsa20poly1305/ref/before_curve25519xsalsa20poly1305.c +19 -0
- data/vendor/libsodium/src/libsodium/crypto_box/curve25519xsalsa20poly1305/ref/box_curve25519xsalsa20poly1305.c +27 -0
- data/vendor/libsodium/src/libsodium/crypto_box/curve25519xsalsa20poly1305/ref/keypair_curve25519xsalsa20poly1305.c +12 -0
- data/vendor/libsodium/src/libsodium/crypto_box/try.c +195 -0
- data/vendor/libsodium/src/libsodium/crypto_core/hsalsa20/checksum +1 -0
- data/vendor/libsodium/src/libsodium/crypto_core/hsalsa20/core_hsalsa20_api.c +26 -0
- data/vendor/libsodium/src/libsodium/crypto_core/hsalsa20/ref2/api.h +11 -0
- data/vendor/libsodium/src/libsodium/crypto_core/hsalsa20/ref2/core_hsalsa20.c +108 -0
- data/vendor/libsodium/src/libsodium/crypto_core/salsa20/checksum +1 -0
- data/vendor/libsodium/src/libsodium/crypto_core/salsa20/core_salsa20_api.c +26 -0
- data/vendor/libsodium/src/libsodium/crypto_core/salsa20/ref/api.h +11 -0
- data/vendor/libsodium/src/libsodium/crypto_core/salsa20/ref/core_salsa20.c +134 -0
- data/vendor/libsodium/src/libsodium/crypto_core/salsa2012/checksum +1 -0
- data/vendor/libsodium/src/libsodium/crypto_core/salsa2012/core_salsa2012_api.c +26 -0
- data/vendor/libsodium/src/libsodium/crypto_core/salsa2012/ref/api.h +11 -0
- data/vendor/libsodium/src/libsodium/crypto_core/salsa2012/ref/core_salsa2012.c +134 -0
- data/vendor/libsodium/src/libsodium/crypto_core/salsa208/checksum +1 -0
- data/vendor/libsodium/src/libsodium/crypto_core/salsa208/core_salsa208_api.c +26 -0
- data/vendor/libsodium/src/libsodium/crypto_core/salsa208/ref/api.h +11 -0
- data/vendor/libsodium/src/libsodium/crypto_core/salsa208/ref/core_salsa208.c +134 -0
- data/vendor/libsodium/src/libsodium/crypto_generichash/blake2/generichash_blake2_api.c +31 -0
- data/vendor/libsodium/src/libsodium/crypto_generichash/blake2/ref/api.h +4 -0
- data/vendor/libsodium/src/libsodium/crypto_generichash/blake2/ref/blake2-impl.h +132 -0
- data/vendor/libsodium/src/libsodium/crypto_generichash/blake2/ref/blake2.h +169 -0
- data/vendor/libsodium/src/libsodium/crypto_generichash/blake2/ref/blake2b-ref.c +364 -0
- data/vendor/libsodium/src/libsodium/crypto_generichash/blake2/ref/blake2s-ref.c +355 -0
- data/vendor/libsodium/src/libsodium/crypto_generichash/blake2/ref/generichash_blake2b.c +61 -0
- data/vendor/libsodium/src/libsodium/crypto_generichash/crypto_generichash.c +84 -0
- data/vendor/libsodium/src/libsodium/crypto_hash/crypto_hash.c +9 -0
- data/vendor/libsodium/src/libsodium/crypto_hash/sha256/checksum +1 -0
- data/vendor/libsodium/src/libsodium/crypto_hash/sha256/hash_sha256_api.c +11 -0
- data/vendor/libsodium/src/libsodium/crypto_hash/sha256/ref/api.h +8 -0
- data/vendor/libsodium/src/libsodium/crypto_hash/sha256/ref/hash_sha256.c +69 -0
- data/vendor/libsodium/src/libsodium/crypto_hash/sha512/checksum +1 -0
- data/vendor/libsodium/src/libsodium/crypto_hash/sha512/hash_sha512_api.c +11 -0
- data/vendor/libsodium/src/libsodium/crypto_hash/sha512/ref/api.h +8 -0
- data/vendor/libsodium/src/libsodium/crypto_hash/sha512/ref/hash_sha512.c +71 -0
- data/vendor/libsodium/src/libsodium/crypto_hash/try.c +76 -0
- data/vendor/libsodium/src/libsodium/crypto_hashblocks/sha256/checksum +1 -0
- data/vendor/libsodium/src/libsodium/crypto_hashblocks/sha256/hashblocks_sha256_api.c +16 -0
- data/vendor/libsodium/src/libsodium/crypto_hashblocks/sha256/ref/api.h +9 -0
- data/vendor/libsodium/src/libsodium/crypto_hashblocks/sha256/ref/blocks_sha256.c +212 -0
- data/vendor/libsodium/src/libsodium/crypto_hashblocks/sha512/checksum +1 -0
- data/vendor/libsodium/src/libsodium/crypto_hashblocks/sha512/hashblocks_sha512_api.c +16 -0
- data/vendor/libsodium/src/libsodium/crypto_hashblocks/sha512/ref/api.h +9 -0
- data/vendor/libsodium/src/libsodium/crypto_hashblocks/sha512/ref/blocks_sha512.c +239 -0
- data/vendor/libsodium/src/libsodium/crypto_hashblocks/try.c +78 -0
- data/vendor/libsodium/src/libsodium/crypto_onetimeauth/crypto_onetimeauth.c +34 -0
- data/vendor/libsodium/src/libsodium/crypto_onetimeauth/poly1305/53/api.h +8 -0
- data/vendor/libsodium/src/libsodium/crypto_onetimeauth/poly1305/53/auth_poly1305_53.c +1661 -0
- data/vendor/libsodium/src/libsodium/crypto_onetimeauth/poly1305/53/verify_poly1305_53.c +10 -0
- data/vendor/libsodium/src/libsodium/crypto_onetimeauth/poly1305/donna/api.h +8 -0
- data/vendor/libsodium/src/libsodium/crypto_onetimeauth/poly1305/donna/auth_poly1305_donna.c +151 -0
- data/vendor/libsodium/src/libsodium/crypto_onetimeauth/poly1305/donna/portable-jane.h +772 -0
- data/vendor/libsodium/src/libsodium/crypto_onetimeauth/poly1305/donna/verify_poly1305_donna.c +10 -0
- data/vendor/libsodium/src/libsodium/crypto_onetimeauth/poly1305/onetimeauth_poly1305.c +36 -0
- data/vendor/libsodium/src/libsodium/crypto_onetimeauth/poly1305/onetimeauth_poly1305_api.c +16 -0
- data/vendor/libsodium/src/libsodium/crypto_onetimeauth/poly1305/onetimeauth_poly1305_try.c +152 -0
- data/vendor/libsodium/src/libsodium/crypto_scalarmult/crypto_scalarmult.c +34 -0
- data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/checksum +1 -0
- data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/donna_c64/api.h +9 -0
- data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/donna_c64/base_curve25519_donna_c64.c +13 -0
- data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/donna_c64/smult_curve25519_donna_c64.c +426 -0
- data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/ref/api.h +8 -0
- data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/ref/base_curve25519_ref.c +20 -0
- data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/ref/smult_curve25519_ref.c +268 -0
- data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/scalarmult_curve25519_api.c +14 -0
- data/vendor/libsodium/src/libsodium/crypto_scalarmult/try.c +125 -0
- data/vendor/libsodium/src/libsodium/crypto_secretbox/crypto_secretbox.c +48 -0
- data/vendor/libsodium/src/libsodium/crypto_secretbox/try.c +129 -0
- data/vendor/libsodium/src/libsodium/crypto_secretbox/xsalsa20poly1305/checksum +1 -0
- data/vendor/libsodium/src/libsodium/crypto_secretbox/xsalsa20poly1305/ref/api.h +12 -0
- data/vendor/libsodium/src/libsodium/crypto_secretbox/xsalsa20poly1305/ref/box_xsalsa20poly1305.c +35 -0
- data/vendor/libsodium/src/libsodium/crypto_secretbox/xsalsa20poly1305/secretbox_xsalsa20poly1305_api.c +26 -0
- data/vendor/libsodium/src/libsodium/crypto_shorthash/crypto_shorthash.c +27 -0
- data/vendor/libsodium/src/libsodium/crypto_shorthash/siphash24/ref/api.h +8 -0
- data/vendor/libsodium/src/libsodium/crypto_shorthash/siphash24/ref/shorthash_siphash24.c +91 -0
- data/vendor/libsodium/src/libsodium/crypto_shorthash/siphash24/shorthash_siphash24_api.c +11 -0
- data/vendor/libsodium/src/libsodium/crypto_sign/crypto_sign.c +61 -0
- data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/description +1 -0
- data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/api.h +14 -0
- data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/base.h +1344 -0
- data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/base2.h +40 -0
- data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/d.h +1 -0
- data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/d2.h +1 -0
- data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/fe.h +56 -0
- data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/fe_0.c +19 -0
- data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/fe_1.c +19 -0
- data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/fe_add.c +57 -0
- data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/fe_cmov.c +63 -0
- data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/fe_copy.c +29 -0
- data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/fe_frombytes.c +73 -0
- data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/fe_invert.c +14 -0
- data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/fe_isnegative.c +16 -0
- data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/fe_isnonzero.c +19 -0
- data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/fe_mul.c +253 -0
- data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/fe_neg.c +45 -0
- data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/fe_pow22523.c +13 -0
- data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/fe_sq.c +149 -0
- data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/fe_sq2.c +160 -0
- data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/fe_sub.c +57 -0
- data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/fe_tobytes.c +119 -0
- data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge.h +95 -0
- data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_add.c +11 -0
- data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_add.h +97 -0
- data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_double_scalarmult.c +96 -0
- data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_frombytes.c +50 -0
- data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_madd.c +11 -0
- data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_madd.h +88 -0
- data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_msub.c +11 -0
- data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_msub.h +88 -0
- data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_p1p1_to_p2.c +12 -0
- data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_p1p1_to_p3.c +13 -0
- data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_p2_0.c +8 -0
- data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_p2_dbl.c +11 -0
- data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_p2_dbl.h +73 -0
- data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_p3_0.c +9 -0
- data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_p3_dbl.c +12 -0
- data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_p3_to_cached.c +17 -0
- data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_p3_to_p2.c +12 -0
- data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_p3_tobytes.c +14 -0
- data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_precomp_0.c +8 -0
- data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_scalarmult_base.c +105 -0
- data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_sub.c +11 -0
- data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_sub.h +97 -0
- data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_tobytes.c +14 -0
- data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/keypair.c +31 -0
- data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/open.c +40 -0
- data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/pow22523.h +160 -0
- data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/pow225521.h +160 -0
- data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/sc.h +15 -0
- data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/sc_muladd.c +368 -0
- data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/sc_reduce.c +275 -0
- data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/sign.c +38 -0
- data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/sqrtm1.h +1 -0
- data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/sign_ed25519_api.c +26 -0
- data/vendor/libsodium/src/libsodium/crypto_sign/edwards25519sha512batch/ref/api.h +13 -0
- data/vendor/libsodium/src/libsodium/crypto_sign/edwards25519sha512batch/ref/fe25519.h +54 -0
- data/vendor/libsodium/src/libsodium/crypto_sign/edwards25519sha512batch/ref/fe25519_edwards25519sha512batch.c +348 -0
- data/vendor/libsodium/src/libsodium/crypto_sign/edwards25519sha512batch/ref/ge25519.h +34 -0
- data/vendor/libsodium/src/libsodium/crypto_sign/edwards25519sha512batch/ref/ge25519_edwards25519sha512batch.c +230 -0
- data/vendor/libsodium/src/libsodium/crypto_sign/edwards25519sha512batch/ref/sc25519.h +51 -0
- data/vendor/libsodium/src/libsodium/crypto_sign/edwards25519sha512batch/ref/sc25519_edwards25519sha512batch.c +146 -0
- data/vendor/libsodium/src/libsodium/crypto_sign/edwards25519sha512batch/ref/sign_edwards25519sha512batch.c +102 -0
- data/vendor/libsodium/src/libsodium/crypto_sign/edwards25519sha512batch/sign_edwards25519sha512batch_api.c +21 -0
- data/vendor/libsodium/src/libsodium/crypto_sign/try.c +87 -0
- data/vendor/libsodium/src/libsodium/crypto_stream/aes128ctr/checksum +1 -0
- data/vendor/libsodium/src/libsodium/crypto_stream/aes128ctr/portable/afternm_aes128ctr.c +159 -0
- data/vendor/libsodium/src/libsodium/crypto_stream/aes128ctr/portable/api.h +14 -0
- data/vendor/libsodium/src/libsodium/crypto_stream/aes128ctr/portable/beforenm_aes128ctr.c +59 -0
- data/vendor/libsodium/src/libsodium/crypto_stream/aes128ctr/portable/common.h +788 -0
- data/vendor/libsodium/src/libsodium/crypto_stream/aes128ctr/portable/common_aes128ctr.c +64 -0
- data/vendor/libsodium/src/libsodium/crypto_stream/aes128ctr/portable/consts.h +28 -0
- data/vendor/libsodium/src/libsodium/crypto_stream/aes128ctr/portable/consts_aes128ctr.c +14 -0
- data/vendor/libsodium/src/libsodium/crypto_stream/aes128ctr/portable/int128.h +47 -0
- data/vendor/libsodium/src/libsodium/crypto_stream/aes128ctr/portable/int128_aes128ctr.c +131 -0
- data/vendor/libsodium/src/libsodium/crypto_stream/aes128ctr/portable/stream_aes128ctr.c +28 -0
- data/vendor/libsodium/src/libsodium/crypto_stream/aes128ctr/portable/types.h +10 -0
- data/vendor/libsodium/src/libsodium/crypto_stream/aes128ctr/portable/xor_afternm_aes128ctr.c +181 -0
- data/vendor/libsodium/src/libsodium/crypto_stream/aes128ctr/stream_aes128ctr_api.c +21 -0
- data/vendor/libsodium/src/libsodium/crypto_stream/aes256estream/hongjun/aes-table-be.h +274 -0
- data/vendor/libsodium/src/libsodium/crypto_stream/aes256estream/hongjun/aes-table-le.h +274 -0
- data/vendor/libsodium/src/libsodium/crypto_stream/aes256estream/hongjun/aes-table.h +56 -0
- data/vendor/libsodium/src/libsodium/crypto_stream/aes256estream/hongjun/aes256-ctr.c +238 -0
- data/vendor/libsodium/src/libsodium/crypto_stream/aes256estream/hongjun/aes256.h +171 -0
- data/vendor/libsodium/src/libsodium/crypto_stream/aes256estream/hongjun/api.h +14 -0
- data/vendor/libsodium/src/libsodium/crypto_stream/aes256estream/hongjun/ecrypt-sync.h +27 -0
- data/vendor/libsodium/src/libsodium/crypto_stream/aes256estream/stream_aes256estream_api.c +21 -0
- data/vendor/libsodium/src/libsodium/crypto_stream/crypto_stream.c +36 -0
- data/vendor/libsodium/src/libsodium/crypto_stream/salsa20/amd64_xmm6/api.h +1 -0
- data/vendor/libsodium/src/libsodium/crypto_stream/salsa20/amd64_xmm6/stream_salsa20_amd64_xmm6.S +950 -0
- data/vendor/libsodium/src/libsodium/crypto_stream/salsa20/checksum +1 -0
- data/vendor/libsodium/src/libsodium/crypto_stream/salsa20/ref/api.h +8 -0
- data/vendor/libsodium/src/libsodium/crypto_stream/salsa20/ref/stream_salsa20_ref.c +55 -0
- data/vendor/libsodium/src/libsodium/crypto_stream/salsa20/ref/xor_salsa20_ref.c +58 -0
- data/vendor/libsodium/src/libsodium/crypto_stream/salsa20/stream_salsa20_api.c +16 -0
- data/vendor/libsodium/src/libsodium/crypto_stream/salsa2012/checksum +1 -0
- data/vendor/libsodium/src/libsodium/crypto_stream/salsa2012/ref/api.h +11 -0
- data/vendor/libsodium/src/libsodium/crypto_stream/salsa2012/ref/stream_salsa2012.c +51 -0
- data/vendor/libsodium/src/libsodium/crypto_stream/salsa2012/ref/xor_salsa2012.c +54 -0
- data/vendor/libsodium/src/libsodium/crypto_stream/salsa2012/stream_salsa2012_api.c +16 -0
- data/vendor/libsodium/src/libsodium/crypto_stream/salsa208/checksum +1 -0
- data/vendor/libsodium/src/libsodium/crypto_stream/salsa208/ref/api.h +10 -0
- data/vendor/libsodium/src/libsodium/crypto_stream/salsa208/ref/stream_salsa208.c +51 -0
- data/vendor/libsodium/src/libsodium/crypto_stream/salsa208/ref/xor_salsa208.c +54 -0
- data/vendor/libsodium/src/libsodium/crypto_stream/salsa208/stream_salsa208_api.c +16 -0
- data/vendor/libsodium/src/libsodium/crypto_stream/try.c +122 -0
- data/vendor/libsodium/src/libsodium/crypto_stream/xsalsa20/checksum +1 -0
- data/vendor/libsodium/src/libsodium/crypto_stream/xsalsa20/ref/api.h +11 -0
- data/vendor/libsodium/src/libsodium/crypto_stream/xsalsa20/ref/stream_xsalsa20.c +24 -0
- data/vendor/libsodium/src/libsodium/crypto_stream/xsalsa20/ref/xor_xsalsa20.c +25 -0
- data/vendor/libsodium/src/libsodium/crypto_stream/xsalsa20/stream_xsalsa20_api.c +16 -0
- data/vendor/libsodium/src/libsodium/crypto_verify/16/checksum +1 -0
- data/vendor/libsodium/src/libsodium/crypto_verify/16/ref/api.h +2 -0
- data/vendor/libsodium/src/libsodium/crypto_verify/16/ref/verify_16.c +24 -0
- data/vendor/libsodium/src/libsodium/crypto_verify/16/verify_16_api.c +6 -0
- data/vendor/libsodium/src/libsodium/crypto_verify/32/checksum +1 -0
- data/vendor/libsodium/src/libsodium/crypto_verify/32/ref/api.h +2 -0
- data/vendor/libsodium/src/libsodium/crypto_verify/32/ref/verify_32.c +40 -0
- data/vendor/libsodium/src/libsodium/crypto_verify/32/verify_32_api.c +6 -0
- data/vendor/libsodium/src/libsodium/crypto_verify/try.c +76 -0
- data/vendor/libsodium/src/libsodium/include/Makefile.am +63 -0
- data/vendor/libsodium/src/libsodium/include/sodium.h +48 -0
- data/vendor/libsodium/src/libsodium/include/sodium/core.h +18 -0
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_auth.h +36 -0
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_auth_hmacsha256.h +36 -0
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_auth_hmacsha512256.h +36 -0
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_box.h +83 -0
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_box_curve25519xsalsa20poly1305.h +72 -0
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_core_hsalsa20.h +40 -0
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_core_salsa20.h +40 -0
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_core_salsa2012.h +40 -0
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_core_salsa208.h +40 -0
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_generichash.h +70 -0
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_generichash_blake2b.h +87 -0
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_hash.h +23 -0
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_hash_sha256.h +29 -0
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_hash_sha512.h +29 -0
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_hashblocks_sha256.h +32 -0
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_hashblocks_sha512.h +32 -0
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_int32.h +8 -0
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_int64.h +8 -0
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_onetimeauth.h +37 -0
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_onetimeauth_poly1305.h +65 -0
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_onetimeauth_poly1305_53.h +34 -0
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_onetimeauth_poly1305_donna.h +34 -0
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_scalarmult.h +36 -0
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_scalarmult_curve25519.h.in +44 -0
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_secretbox.h +47 -0
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_secretbox_xsalsa20poly1305.h +44 -0
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_shorthash.h +33 -0
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_shorthash_siphash24.h +29 -0
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_sign.h +61 -0
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_sign_ed25519.h +52 -0
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_sign_edwards25519sha512batch.h +44 -0
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_stream.h +46 -0
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_stream_aes128ctr.h +60 -0
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_stream_aes256estream.h +61 -0
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_stream_salsa20.h.in +54 -0
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_stream_salsa2012.h +43 -0
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_stream_salsa208.h +43 -0
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_stream_xsalsa20.h +44 -0
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_uint16.h +8 -0
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_uint32.h +8 -0
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_uint64.h +8 -0
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_uint8.h +8 -0
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_verify_16.h +25 -0
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_verify_32.h +25 -0
- data/vendor/libsodium/src/libsodium/include/sodium/export.h +32 -0
- data/vendor/libsodium/src/libsodium/include/sodium/randombytes.h +53 -0
- data/vendor/libsodium/src/libsodium/include/sodium/randombytes_salsa20_random.h +45 -0
- data/vendor/libsodium/src/libsodium/include/sodium/randombytes_sysrandom.h +45 -0
- data/vendor/libsodium/src/libsodium/include/sodium/utils.h +36 -0
- data/vendor/libsodium/src/libsodium/include/sodium/version.h.in +29 -0
- data/vendor/libsodium/src/libsodium/randombytes/randombytes.c +63 -0
- data/vendor/libsodium/src/libsodium/randombytes/salsa20/randombytes_salsa20_random.c +317 -0
- data/vendor/libsodium/src/libsodium/randombytes/sysrandom/randombytes_sysrandom.c +212 -0
- data/vendor/libsodium/src/libsodium/sodium/compat.c +248 -0
- data/vendor/libsodium/src/libsodium/sodium/core.c +21 -0
- data/vendor/libsodium/src/libsodium/sodium/utils.c +94 -0
- data/vendor/libsodium/src/libsodium/sodium/version.c +20 -0
- data/vendor/libsodium/test/Makefile.am +5 -0
- data/vendor/libsodium/test/default/Makefile.am +277 -0
- data/vendor/libsodium/test/default/auth.c +21 -0
- data/vendor/libsodium/test/default/auth.exp +4 -0
- data/vendor/libsodium/test/default/auth2.c +36 -0
- data/vendor/libsodium/test/default/auth2.exp +4 -0
- data/vendor/libsodium/test/default/auth3.c +36 -0
- data/vendor/libsodium/test/default/auth3.exp +1 -0
- data/vendor/libsodium/test/default/auth5.c +37 -0
- data/vendor/libsodium/test/default/auth5.exp +0 -0
- data/vendor/libsodium/test/default/box.c +65 -0
- data/vendor/libsodium/test/default/box.exp +19 -0
- data/vendor/libsodium/test/default/box2.c +66 -0
- data/vendor/libsodium/test/default/box2.exp +17 -0
- data/vendor/libsodium/test/default/box7.c +37 -0
- data/vendor/libsodium/test/default/box7.exp +0 -0
- data/vendor/libsodium/test/default/box8.c +44 -0
- data/vendor/libsodium/test/default/box8.exp +0 -0
- data/vendor/libsodium/test/default/cmptest.h +51 -0
- data/vendor/libsodium/test/default/core1.c +32 -0
- data/vendor/libsodium/test/default/core1.exp +4 -0
- data/vendor/libsodium/test/default/core2.c +35 -0
- data/vendor/libsodium/test/default/core2.exp +4 -0
- data/vendor/libsodium/test/default/core3.c +42 -0
- data/vendor/libsodium/test/default/core3.exp +1 -0
- data/vendor/libsodium/test/default/core4.c +35 -0
- data/vendor/libsodium/test/default/core4.exp +8 -0
- data/vendor/libsodium/test/default/core5.c +34 -0
- data/vendor/libsodium/test/default/core5.exp +4 -0
- data/vendor/libsodium/test/default/core6.c +49 -0
- data/vendor/libsodium/test/default/core6.exp +4 -0
- data/vendor/libsodium/test/default/generichash.c +27 -0
- data/vendor/libsodium/test/default/generichash.exp +64 -0
- data/vendor/libsodium/test/default/generichash2.c +31 -0
- data/vendor/libsodium/test/default/generichash2.exp +64 -0
- data/vendor/libsodium/test/default/hash.c +16 -0
- data/vendor/libsodium/test/default/hash.exp +1 -0
- data/vendor/libsodium/test/default/hash2.exp +1 -0
- data/vendor/libsodium/test/default/hash3.c +16 -0
- data/vendor/libsodium/test/default/hash3.exp +1 -0
- data/vendor/libsodium/test/default/onetimeauth.c +44 -0
- data/vendor/libsodium/test/default/onetimeauth.exp +2 -0
- data/vendor/libsodium/test/default/onetimeauth2.c +42 -0
- data/vendor/libsodium/test/default/onetimeauth2.exp +1 -0
- data/vendor/libsodium/test/default/onetimeauth7.c +37 -0
- data/vendor/libsodium/test/default/onetimeauth7.exp +0 -0
- data/vendor/libsodium/test/default/pre.js +33 -0
- data/vendor/libsodium/test/default/randombytes.c +16 -0
- data/vendor/libsodium/test/default/scalarmult.c +25 -0
- data/vendor/libsodium/test/default/scalarmult.exp +4 -0
- data/vendor/libsodium/test/default/scalarmult2.c +25 -0
- data/vendor/libsodium/test/default/scalarmult2.exp +4 -0
- data/vendor/libsodium/test/default/scalarmult5.c +32 -0
- data/vendor/libsodium/test/default/scalarmult5.exp +4 -0
- data/vendor/libsodium/test/default/scalarmult6.c +32 -0
- data/vendor/libsodium/test/default/scalarmult6.exp +4 -0
- data/vendor/libsodium/test/default/scalarmult7.c +34 -0
- data/vendor/libsodium/test/default/scalarmult7.exp +1 -0
- data/vendor/libsodium/test/default/scalarmult8.c +34 -0
- data/vendor/libsodium/test/default/scalarmult8.exp +1 -0
- data/vendor/libsodium/test/default/secretbox.c +58 -0
- data/vendor/libsodium/test/default/secretbox.exp +19 -0
- data/vendor/libsodium/test/default/secretbox2.c +59 -0
- data/vendor/libsodium/test/default/secretbox2.exp +17 -0
- data/vendor/libsodium/test/default/secretbox7.c +33 -0
- data/vendor/libsodium/test/default/secretbox7.exp +0 -0
- data/vendor/libsodium/test/default/secretbox8.c +40 -0
- data/vendor/libsodium/test/default/secretbox8.exp +0 -0
- data/vendor/libsodium/test/default/shorthash.c +23 -0
- data/vendor/libsodium/test/default/shorthash.exp +64 -0
- data/vendor/libsodium/test/default/sodium_core.c +11 -0
- data/vendor/libsodium/test/default/sodium_core.exp +1 -0
- data/vendor/libsodium/test/default/sodium_utils.c +27 -0
- data/vendor/libsodium/test/default/sodium_utils.exp +6 -0
- data/vendor/libsodium/test/default/sodium_version.c +13 -0
- data/vendor/libsodium/test/default/sodium_version.exp +3 -0
- data/vendor/libsodium/test/default/stream.c +30 -0
- data/vendor/libsodium/test/default/stream.exp +1 -0
- data/vendor/libsodium/test/default/stream2.c +28 -0
- data/vendor/libsodium/test/default/stream2.exp +1 -0
- data/vendor/libsodium/test/default/stream3.c +30 -0
- data/vendor/libsodium/test/default/stream3.exp +4 -0
- data/vendor/libsodium/test/default/stream4.c +55 -0
- data/vendor/libsodium/test/default/stream4.exp +17 -0
- data/vendor/libsodium/test/default/stream5.c +29 -0
- data/vendor/libsodium/test/default/stream5.exp +1 -0
- data/vendor/libsodium/test/default/stream6.c +54 -0
- data/vendor/libsodium/test/default/stream6.exp +17 -0
- data/vendor/libsodium/test/default/wintest.bat +56 -0
- data/vendor/libsodium/test/quirks/windows/windows-quirks.h +18 -0
- metadata +500 -0
@@ -0,0 +1 @@
|
|
1
|
+
0
|
@@ -0,0 +1,58 @@
|
|
1
|
+
#include <stdio.h>
|
2
|
+
|
3
|
+
#define TEST_NAME "secretbox"
|
4
|
+
#include "cmptest.h"
|
5
|
+
|
6
|
+
unsigned char firstkey[32] = {
|
7
|
+
0x1b,0x27,0x55,0x64,0x73,0xe9,0x85,0xd4
|
8
|
+
,0x62,0xcd,0x51,0x19,0x7a,0x9a,0x46,0xc7
|
9
|
+
,0x60,0x09,0x54,0x9e,0xac,0x64,0x74,0xf2
|
10
|
+
,0x06,0xc4,0xee,0x08,0x44,0xf6,0x83,0x89
|
11
|
+
} ;
|
12
|
+
|
13
|
+
unsigned char nonce[24] = {
|
14
|
+
0x69,0x69,0x6e,0xe9,0x55,0xb6,0x2b,0x73
|
15
|
+
,0xcd,0x62,0xbd,0xa8,0x75,0xfc,0x73,0xd6
|
16
|
+
,0x82,0x19,0xe0,0x03,0x6b,0x7a,0x0b,0x37
|
17
|
+
} ;
|
18
|
+
|
19
|
+
// API requires first 32 bytes to be 0
|
20
|
+
unsigned char m[163] = {
|
21
|
+
0, 0, 0, 0, 0, 0, 0, 0
|
22
|
+
, 0, 0, 0, 0, 0, 0, 0, 0
|
23
|
+
, 0, 0, 0, 0, 0, 0, 0, 0
|
24
|
+
, 0, 0, 0, 0, 0, 0, 0, 0
|
25
|
+
,0xbe,0x07,0x5f,0xc5,0x3c,0x81,0xf2,0xd5
|
26
|
+
,0xcf,0x14,0x13,0x16,0xeb,0xeb,0x0c,0x7b
|
27
|
+
,0x52,0x28,0xc5,0x2a,0x4c,0x62,0xcb,0xd4
|
28
|
+
,0x4b,0x66,0x84,0x9b,0x64,0x24,0x4f,0xfc
|
29
|
+
,0xe5,0xec,0xba,0xaf,0x33,0xbd,0x75,0x1a
|
30
|
+
,0x1a,0xc7,0x28,0xd4,0x5e,0x6c,0x61,0x29
|
31
|
+
,0x6c,0xdc,0x3c,0x01,0x23,0x35,0x61,0xf4
|
32
|
+
,0x1d,0xb6,0x6c,0xce,0x31,0x4a,0xdb,0x31
|
33
|
+
,0x0e,0x3b,0xe8,0x25,0x0c,0x46,0xf0,0x6d
|
34
|
+
,0xce,0xea,0x3a,0x7f,0xa1,0x34,0x80,0x57
|
35
|
+
,0xe2,0xf6,0x55,0x6a,0xd6,0xb1,0x31,0x8a
|
36
|
+
,0x02,0x4a,0x83,0x8f,0x21,0xaf,0x1f,0xde
|
37
|
+
,0x04,0x89,0x77,0xeb,0x48,0xf5,0x9f,0xfd
|
38
|
+
,0x49,0x24,0xca,0x1c,0x60,0x90,0x2e,0x52
|
39
|
+
,0xf0,0xa0,0x89,0xbc,0x76,0x89,0x70,0x40
|
40
|
+
,0xe0,0x82,0xf9,0x37,0x76,0x38,0x48,0x64
|
41
|
+
,0x5e,0x07,0x05
|
42
|
+
} ;
|
43
|
+
|
44
|
+
unsigned char c[163];
|
45
|
+
|
46
|
+
int main(void)
|
47
|
+
{
|
48
|
+
int i;
|
49
|
+
crypto_secretbox_xsalsa20poly1305(
|
50
|
+
c,m,163,nonce,firstkey
|
51
|
+
);
|
52
|
+
for (i = 16;i < 163;++i) {
|
53
|
+
printf(",0x%02x",(unsigned int) c[i]);
|
54
|
+
if (i % 8 == 7) printf("\n");
|
55
|
+
}
|
56
|
+
printf("\n");
|
57
|
+
return 0;
|
58
|
+
}
|
@@ -0,0 +1,19 @@
|
|
1
|
+
,0xf3,0xff,0xc7,0x70,0x3f,0x94,0x00,0xe5
|
2
|
+
,0x2a,0x7d,0xfb,0x4b,0x3d,0x33,0x05,0xd9
|
3
|
+
,0x8e,0x99,0x3b,0x9f,0x48,0x68,0x12,0x73
|
4
|
+
,0xc2,0x96,0x50,0xba,0x32,0xfc,0x76,0xce
|
5
|
+
,0x48,0x33,0x2e,0xa7,0x16,0x4d,0x96,0xa4
|
6
|
+
,0x47,0x6f,0xb8,0xc5,0x31,0xa1,0x18,0x6a
|
7
|
+
,0xc0,0xdf,0xc1,0x7c,0x98,0xdc,0xe8,0x7b
|
8
|
+
,0x4d,0xa7,0xf0,0x11,0xec,0x48,0xc9,0x72
|
9
|
+
,0x71,0xd2,0xc2,0x0f,0x9b,0x92,0x8f,0xe2
|
10
|
+
,0x27,0x0d,0x6f,0xb8,0x63,0xd5,0x17,0x38
|
11
|
+
,0xb4,0x8e,0xee,0xe3,0x14,0xa7,0xcc,0x8a
|
12
|
+
,0xb9,0x32,0x16,0x45,0x48,0xe5,0x26,0xae
|
13
|
+
,0x90,0x22,0x43,0x68,0x51,0x7a,0xcf,0xea
|
14
|
+
,0xbd,0x6b,0xb3,0x73,0x2b,0xc0,0xe9,0xda
|
15
|
+
,0x99,0x83,0x2b,0x61,0xca,0x01,0xb6,0xde
|
16
|
+
,0x56,0x24,0x4a,0x9e,0x88,0xd5,0xf9,0xb3
|
17
|
+
,0x79,0x73,0xf6,0x22,0xa4,0x3d,0x14,0xa6
|
18
|
+
,0x59,0x9b,0x1f,0x65,0x4c,0xb4,0x5a,0x74
|
19
|
+
,0xe3,0x55,0xa5
|
@@ -0,0 +1,59 @@
|
|
1
|
+
#include <stdio.h>
|
2
|
+
|
3
|
+
#define TEST_NAME "secretbox2"
|
4
|
+
#include "cmptest.h"
|
5
|
+
|
6
|
+
unsigned char firstkey[32] = {
|
7
|
+
0x1b,0x27,0x55,0x64,0x73,0xe9,0x85,0xd4
|
8
|
+
,0x62,0xcd,0x51,0x19,0x7a,0x9a,0x46,0xc7
|
9
|
+
,0x60,0x09,0x54,0x9e,0xac,0x64,0x74,0xf2
|
10
|
+
,0x06,0xc4,0xee,0x08,0x44,0xf6,0x83,0x89
|
11
|
+
} ;
|
12
|
+
|
13
|
+
unsigned char nonce[24] = {
|
14
|
+
0x69,0x69,0x6e,0xe9,0x55,0xb6,0x2b,0x73
|
15
|
+
,0xcd,0x62,0xbd,0xa8,0x75,0xfc,0x73,0xd6
|
16
|
+
,0x82,0x19,0xe0,0x03,0x6b,0x7a,0x0b,0x37
|
17
|
+
} ;
|
18
|
+
|
19
|
+
// API requires first 16 bytes to be 0
|
20
|
+
unsigned char c[163] = {
|
21
|
+
0, 0, 0, 0, 0, 0, 0, 0
|
22
|
+
, 0, 0, 0, 0, 0, 0, 0, 0
|
23
|
+
,0xf3,0xff,0xc7,0x70,0x3f,0x94,0x00,0xe5
|
24
|
+
,0x2a,0x7d,0xfb,0x4b,0x3d,0x33,0x05,0xd9
|
25
|
+
,0x8e,0x99,0x3b,0x9f,0x48,0x68,0x12,0x73
|
26
|
+
,0xc2,0x96,0x50,0xba,0x32,0xfc,0x76,0xce
|
27
|
+
,0x48,0x33,0x2e,0xa7,0x16,0x4d,0x96,0xa4
|
28
|
+
,0x47,0x6f,0xb8,0xc5,0x31,0xa1,0x18,0x6a
|
29
|
+
,0xc0,0xdf,0xc1,0x7c,0x98,0xdc,0xe8,0x7b
|
30
|
+
,0x4d,0xa7,0xf0,0x11,0xec,0x48,0xc9,0x72
|
31
|
+
,0x71,0xd2,0xc2,0x0f,0x9b,0x92,0x8f,0xe2
|
32
|
+
,0x27,0x0d,0x6f,0xb8,0x63,0xd5,0x17,0x38
|
33
|
+
,0xb4,0x8e,0xee,0xe3,0x14,0xa7,0xcc,0x8a
|
34
|
+
,0xb9,0x32,0x16,0x45,0x48,0xe5,0x26,0xae
|
35
|
+
,0x90,0x22,0x43,0x68,0x51,0x7a,0xcf,0xea
|
36
|
+
,0xbd,0x6b,0xb3,0x73,0x2b,0xc0,0xe9,0xda
|
37
|
+
,0x99,0x83,0x2b,0x61,0xca,0x01,0xb6,0xde
|
38
|
+
,0x56,0x24,0x4a,0x9e,0x88,0xd5,0xf9,0xb3
|
39
|
+
,0x79,0x73,0xf6,0x22,0xa4,0x3d,0x14,0xa6
|
40
|
+
,0x59,0x9b,0x1f,0x65,0x4c,0xb4,0x5a,0x74
|
41
|
+
,0xe3,0x55,0xa5
|
42
|
+
} ;
|
43
|
+
|
44
|
+
unsigned char m[163];
|
45
|
+
|
46
|
+
int main(void)
|
47
|
+
{
|
48
|
+
int i;
|
49
|
+
if (crypto_secretbox_xsalsa20poly1305_open(
|
50
|
+
m,c,163,nonce,firstkey
|
51
|
+
) == 0) {
|
52
|
+
for (i = 32;i < 163;++i) {
|
53
|
+
printf(",0x%02x",(unsigned int) m[i]);
|
54
|
+
if (i % 8 == 7) printf("\n");
|
55
|
+
}
|
56
|
+
printf("\n");
|
57
|
+
}
|
58
|
+
return 0;
|
59
|
+
}
|
@@ -0,0 +1,17 @@
|
|
1
|
+
,0xbe,0x07,0x5f,0xc5,0x3c,0x81,0xf2,0xd5
|
2
|
+
,0xcf,0x14,0x13,0x16,0xeb,0xeb,0x0c,0x7b
|
3
|
+
,0x52,0x28,0xc5,0x2a,0x4c,0x62,0xcb,0xd4
|
4
|
+
,0x4b,0x66,0x84,0x9b,0x64,0x24,0x4f,0xfc
|
5
|
+
,0xe5,0xec,0xba,0xaf,0x33,0xbd,0x75,0x1a
|
6
|
+
,0x1a,0xc7,0x28,0xd4,0x5e,0x6c,0x61,0x29
|
7
|
+
,0x6c,0xdc,0x3c,0x01,0x23,0x35,0x61,0xf4
|
8
|
+
,0x1d,0xb6,0x6c,0xce,0x31,0x4a,0xdb,0x31
|
9
|
+
,0x0e,0x3b,0xe8,0x25,0x0c,0x46,0xf0,0x6d
|
10
|
+
,0xce,0xea,0x3a,0x7f,0xa1,0x34,0x80,0x57
|
11
|
+
,0xe2,0xf6,0x55,0x6a,0xd6,0xb1,0x31,0x8a
|
12
|
+
,0x02,0x4a,0x83,0x8f,0x21,0xaf,0x1f,0xde
|
13
|
+
,0x04,0x89,0x77,0xeb,0x48,0xf5,0x9f,0xfd
|
14
|
+
,0x49,0x24,0xca,0x1c,0x60,0x90,0x2e,0x52
|
15
|
+
,0xf0,0xa0,0x89,0xbc,0x76,0x89,0x70,0x40
|
16
|
+
,0xe0,0x82,0xf9,0x37,0x76,0x38,0x48,0x64
|
17
|
+
,0x5e,0x07,0x05
|
@@ -0,0 +1,33 @@
|
|
1
|
+
#include <stdio.h>
|
2
|
+
|
3
|
+
#define TEST_NAME "secretbox7"
|
4
|
+
#include "cmptest.h"
|
5
|
+
|
6
|
+
unsigned char k[crypto_secretbox_KEYBYTES];
|
7
|
+
unsigned char n[crypto_secretbox_NONCEBYTES];
|
8
|
+
unsigned char m[10000];
|
9
|
+
unsigned char c[10000];
|
10
|
+
unsigned char m2[10000];
|
11
|
+
|
12
|
+
int main(void)
|
13
|
+
{
|
14
|
+
size_t mlen;
|
15
|
+
size_t i;
|
16
|
+
|
17
|
+
for (mlen = 0;mlen < 1000 && mlen + crypto_secretbox_ZEROBYTES < sizeof m;++mlen) {
|
18
|
+
randombytes(k,crypto_secretbox_KEYBYTES);
|
19
|
+
randombytes(n,crypto_secretbox_NONCEBYTES);
|
20
|
+
randombytes(m + crypto_secretbox_ZEROBYTES,mlen);
|
21
|
+
crypto_secretbox(c,m,mlen + crypto_secretbox_ZEROBYTES,n,k);
|
22
|
+
if (crypto_secretbox_open(m2,c,mlen + crypto_secretbox_ZEROBYTES,n,k) == 0) {
|
23
|
+
for (i = 0;i < mlen + crypto_secretbox_ZEROBYTES;++i)
|
24
|
+
if (m2[i] != m[i]) {
|
25
|
+
printf("bad decryption\n");
|
26
|
+
break;
|
27
|
+
}
|
28
|
+
} else {
|
29
|
+
printf("ciphertext fails verification\n");
|
30
|
+
}
|
31
|
+
}
|
32
|
+
return 0;
|
33
|
+
}
|
File without changes
|
@@ -0,0 +1,40 @@
|
|
1
|
+
#include <stdio.h>
|
2
|
+
#include <stdlib.h>
|
3
|
+
#include "windows/windows-quirks.h"
|
4
|
+
|
5
|
+
#define TEST_NAME "secretbox8"
|
6
|
+
#include "cmptest.h"
|
7
|
+
|
8
|
+
unsigned char k[crypto_secretbox_KEYBYTES];
|
9
|
+
unsigned char n[crypto_secretbox_NONCEBYTES];
|
10
|
+
unsigned char m[10000];
|
11
|
+
unsigned char c[10000];
|
12
|
+
unsigned char m2[10000];
|
13
|
+
|
14
|
+
int main(void)
|
15
|
+
{
|
16
|
+
size_t mlen;
|
17
|
+
size_t i;
|
18
|
+
int caught;
|
19
|
+
|
20
|
+
for (mlen = 0;mlen < 1000 && mlen + crypto_secretbox_ZEROBYTES < sizeof m;++mlen) {
|
21
|
+
randombytes(k,crypto_secretbox_KEYBYTES);
|
22
|
+
randombytes(n,crypto_secretbox_NONCEBYTES);
|
23
|
+
randombytes(m + crypto_secretbox_ZEROBYTES,mlen);
|
24
|
+
crypto_secretbox(c,m,mlen + crypto_secretbox_ZEROBYTES,n,k);
|
25
|
+
caught = 0;
|
26
|
+
while (caught < 10) {
|
27
|
+
c[rand() % (mlen + crypto_secretbox_ZEROBYTES)] = rand();
|
28
|
+
if (crypto_secretbox_open(m2,c,mlen + crypto_secretbox_ZEROBYTES,n,k) == 0) {
|
29
|
+
for (i = 0;i < mlen + crypto_secretbox_ZEROBYTES;++i)
|
30
|
+
if (m2[i] != m[i]) {
|
31
|
+
printf("forgery\n");
|
32
|
+
return 100;
|
33
|
+
}
|
34
|
+
} else {
|
35
|
+
++caught;
|
36
|
+
}
|
37
|
+
}
|
38
|
+
}
|
39
|
+
return 0;
|
40
|
+
}
|
File without changes
|
@@ -0,0 +1,23 @@
|
|
1
|
+
#include <stdio.h>
|
2
|
+
|
3
|
+
#include "crypto_uint8.h"
|
4
|
+
|
5
|
+
#define TEST_NAME "shorthash"
|
6
|
+
#include "cmptest.h"
|
7
|
+
|
8
|
+
int main(void)
|
9
|
+
{
|
10
|
+
#define MAXLEN 64
|
11
|
+
crypto_uint8 in[MAXLEN], out[crypto_shorthash_BYTES], k[crypto_shorthash_KEYBYTES];
|
12
|
+
size_t i,j;
|
13
|
+
|
14
|
+
for( i = 0; i < crypto_shorthash_KEYBYTES; ++i ) k[i] = i;
|
15
|
+
|
16
|
+
for(i=0;i<MAXLEN;++i) {
|
17
|
+
in[i]=i;
|
18
|
+
crypto_shorthash( out, in, i, k );
|
19
|
+
for (j = 0;j < crypto_shorthash_BYTES;++j) printf("%02x",(unsigned int) out[j]);
|
20
|
+
printf("\n");
|
21
|
+
}
|
22
|
+
return 0;
|
23
|
+
}
|
@@ -0,0 +1,64 @@
|
|
1
|
+
310e0edd47db6f72
|
2
|
+
fd67dc93c539f874
|
3
|
+
5a4fa9d909806c0d
|
4
|
+
2d7efbd796666785
|
5
|
+
b7877127e09427cf
|
6
|
+
8da699cd64557618
|
7
|
+
cee3fe586e46c9cb
|
8
|
+
37d1018bf50002ab
|
9
|
+
6224939a79f5f593
|
10
|
+
b0e4a90bdf82009e
|
11
|
+
f3b9dd94c5bb5d7a
|
12
|
+
a7ad6b22462fb3f4
|
13
|
+
fbe50e86bc8f1e75
|
14
|
+
903d84c02756ea14
|
15
|
+
eef27a8e90ca23f7
|
16
|
+
e545be4961ca29a1
|
17
|
+
db9bc2577fcc2a3f
|
18
|
+
9447be2cf5e99a69
|
19
|
+
9cd38d96f0b3c14b
|
20
|
+
bd6179a71dc96dbb
|
21
|
+
98eea21af25cd6be
|
22
|
+
c7673b2eb0cbf2d0
|
23
|
+
883ea3e395675393
|
24
|
+
c8ce5ccd8c030ca8
|
25
|
+
94af49f6c650adb8
|
26
|
+
eab8858ade92e1bc
|
27
|
+
f315bb5bb835d817
|
28
|
+
adcf6b0763612e2f
|
29
|
+
a5c91da7acaa4dde
|
30
|
+
716595876650a2a6
|
31
|
+
28ef495c53a387ad
|
32
|
+
42c341d8fa92d832
|
33
|
+
ce7cf2722f512771
|
34
|
+
e37859f94623f3a7
|
35
|
+
381205bb1ab0e012
|
36
|
+
ae97a10fd434e015
|
37
|
+
b4a31508beff4d31
|
38
|
+
81396229f0907902
|
39
|
+
4d0cf49ee5d4dcca
|
40
|
+
5c73336a76d8bf9a
|
41
|
+
d0a704536ba93e0e
|
42
|
+
925958fcd6420cad
|
43
|
+
a915c29bc8067318
|
44
|
+
952b79f3bc0aa6d4
|
45
|
+
f21df2e41d4535f9
|
46
|
+
87577519048f53a9
|
47
|
+
10a56cf5dfcd9adb
|
48
|
+
eb75095ccd986cd0
|
49
|
+
51a9cb9ecba312e6
|
50
|
+
96afadfc2ce666c7
|
51
|
+
72fe52975a4364ee
|
52
|
+
5a1645b276d592a1
|
53
|
+
b274cb8ebf87870a
|
54
|
+
6f9bb4203de7b381
|
55
|
+
eaecb2a30b22a87f
|
56
|
+
9924a43cc1315724
|
57
|
+
bd838d3aafbf8db7
|
58
|
+
0b1a2a3265d51aea
|
59
|
+
135079a3231ce660
|
60
|
+
932b2846e4d70666
|
61
|
+
e1915f5cb1eca46c
|
62
|
+
f325965ca16d629f
|
63
|
+
575ff28e60381be5
|
64
|
+
724506eb4c328a95
|
@@ -0,0 +1 @@
|
|
1
|
+
1
|
@@ -0,0 +1,27 @@
|
|
1
|
+
#include <stdio.h>
|
2
|
+
#include <string.h>
|
3
|
+
|
4
|
+
#define TEST_NAME "sodium_utils"
|
5
|
+
#include "cmptest.h"
|
6
|
+
|
7
|
+
int main(void)
|
8
|
+
{
|
9
|
+
unsigned char buf1[1000];
|
10
|
+
unsigned char buf2[1000];
|
11
|
+
char buf3[33];
|
12
|
+
|
13
|
+
randombytes(buf1, sizeof buf1);
|
14
|
+
memcpy(buf2, buf1, sizeof buf2);
|
15
|
+
printf("%d\n", sodium_memcmp(buf1, buf2, sizeof buf1));
|
16
|
+
sodium_memzero(buf1, 0U);
|
17
|
+
printf("%d\n", sodium_memcmp(buf1, buf2, sizeof buf1));
|
18
|
+
sodium_memzero(buf1, sizeof buf1 / 2);
|
19
|
+
printf("%d\n", sodium_memcmp(buf1, buf2, sizeof buf1));
|
20
|
+
printf("%d\n", sodium_memcmp(buf1, buf2, 0U));
|
21
|
+
sodium_memzero(buf2, sizeof buf2 / 2);
|
22
|
+
printf("%d\n", sodium_memcmp(buf1, buf2, sizeof buf1));
|
23
|
+
printf("%s\n", sodium_bin2hex(buf3, 33U,
|
24
|
+
(const unsigned char *)
|
25
|
+
"0123456789ABCDEF", 16U));
|
26
|
+
return 0;
|
27
|
+
}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
#include <stdio.h>
|
2
|
+
|
3
|
+
#define TEST_NAME "sodium_version"
|
4
|
+
#include "cmptest.h"
|
5
|
+
|
6
|
+
int main(void)
|
7
|
+
{
|
8
|
+
printf ("%d\n", sodium_version_string() != NULL);
|
9
|
+
printf ("%d\n", sodium_library_version_major() > 0);
|
10
|
+
printf ("%d\n", sodium_library_version_minor() > 0);
|
11
|
+
|
12
|
+
return 0;
|
13
|
+
}
|
@@ -0,0 +1,30 @@
|
|
1
|
+
#include <stdio.h>
|
2
|
+
|
3
|
+
#define TEST_NAME "stream"
|
4
|
+
#include "cmptest.h"
|
5
|
+
|
6
|
+
unsigned char firstkey[32] = {
|
7
|
+
0x1b,0x27,0x55,0x64,0x73,0xe9,0x85,0xd4
|
8
|
+
,0x62,0xcd,0x51,0x19,0x7a,0x9a,0x46,0xc7
|
9
|
+
,0x60,0x09,0x54,0x9e,0xac,0x64,0x74,0xf2
|
10
|
+
,0x06,0xc4,0xee,0x08,0x44,0xf6,0x83,0x89
|
11
|
+
} ;
|
12
|
+
|
13
|
+
unsigned char nonce[24] = {
|
14
|
+
0x69,0x69,0x6e,0xe9,0x55,0xb6,0x2b,0x73
|
15
|
+
,0xcd,0x62,0xbd,0xa8,0x75,0xfc,0x73,0xd6
|
16
|
+
,0x82,0x19,0xe0,0x03,0x6b,0x7a,0x0b,0x37
|
17
|
+
} ;
|
18
|
+
|
19
|
+
unsigned char output[4194304];
|
20
|
+
|
21
|
+
unsigned char h[32];
|
22
|
+
|
23
|
+
int main(void)
|
24
|
+
{
|
25
|
+
int i;
|
26
|
+
crypto_stream_xsalsa20(output,4194304,nonce,firstkey);
|
27
|
+
crypto_hash_sha256(h,output,sizeof output);
|
28
|
+
for (i = 0;i < 32;++i) printf("%02x",h[i]); printf("\n");
|
29
|
+
return 0;
|
30
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
662b9d0e3463029156069b12f918691a98f7dfb2ca0393c96bbfc6b1fbd630a2
|
@@ -0,0 +1,28 @@
|
|
1
|
+
#include <stdio.h>
|
2
|
+
|
3
|
+
#define TEST_NAME "stream2"
|
4
|
+
#include "cmptest.h"
|
5
|
+
|
6
|
+
unsigned char secondkey[32] = {
|
7
|
+
0xdc,0x90,0x8d,0xda,0x0b,0x93,0x44,0xa9
|
8
|
+
,0x53,0x62,0x9b,0x73,0x38,0x20,0x77,0x88
|
9
|
+
,0x80,0xf3,0xce,0xb4,0x21,0xbb,0x61,0xb9
|
10
|
+
,0x1c,0xbd,0x4c,0x3e,0x66,0x25,0x6c,0xe4
|
11
|
+
} ;
|
12
|
+
|
13
|
+
unsigned char noncesuffix[8] = {
|
14
|
+
0x82,0x19,0xe0,0x03,0x6b,0x7a,0x0b,0x37
|
15
|
+
} ;
|
16
|
+
|
17
|
+
unsigned char output[4194304];
|
18
|
+
|
19
|
+
unsigned char h[32];
|
20
|
+
|
21
|
+
int main(void)
|
22
|
+
{
|
23
|
+
int i;
|
24
|
+
crypto_stream_salsa20(output,4194304,noncesuffix,secondkey);
|
25
|
+
crypto_hash_sha256(h,output,sizeof output);
|
26
|
+
for (i = 0;i < 32;++i) printf("%02x",h[i]); printf("\n");
|
27
|
+
return 0;
|
28
|
+
}
|