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.
Files changed (282) hide show
  1. checksums.yaml +4 -4
  2. data/lib/rbnacl/libsodium/version.rb +1 -1
  3. data/vendor/libsodium/AUTHORS +14 -9
  4. data/vendor/libsodium/ChangeLog +26 -0
  5. data/vendor/libsodium/LICENSE +1 -1
  6. data/vendor/libsodium/Makefile.am +1 -0
  7. data/vendor/libsodium/README.markdown +185 -46
  8. data/vendor/libsodium/THANKS +10 -0
  9. data/vendor/libsodium/builds/msvc/properties/Common.props +21 -0
  10. data/vendor/libsodium/builds/msvc/properties/DLL.props +16 -0
  11. data/vendor/libsodium/builds/msvc/properties/Debug.props +29 -0
  12. data/vendor/libsodium/builds/msvc/properties/DebugDEXE.props +21 -0
  13. data/vendor/libsodium/builds/msvc/properties/DebugDLL.props +20 -0
  14. data/vendor/libsodium/builds/msvc/properties/DebugLEXE.props +20 -0
  15. data/vendor/libsodium/builds/msvc/properties/DebugLIB.props +20 -0
  16. data/vendor/libsodium/builds/msvc/properties/DebugLTCG.props +19 -0
  17. data/vendor/libsodium/builds/msvc/properties/DebugSEXE.props +21 -0
  18. data/vendor/libsodium/builds/msvc/properties/EXE.props +17 -0
  19. data/vendor/libsodium/builds/msvc/properties/LIB.props +16 -0
  20. data/vendor/libsodium/builds/msvc/properties/LTCG.props +13 -0
  21. data/vendor/libsodium/builds/msvc/properties/Link.props +21 -0
  22. data/vendor/libsodium/builds/msvc/properties/Messages.props +15 -0
  23. data/vendor/libsodium/builds/msvc/properties/Output.props +30 -0
  24. data/vendor/libsodium/builds/msvc/properties/Release.props +41 -0
  25. data/vendor/libsodium/builds/msvc/properties/ReleaseDEXE.props +20 -0
  26. data/vendor/libsodium/builds/msvc/properties/ReleaseDLL.props +19 -0
  27. data/vendor/libsodium/builds/msvc/properties/ReleaseLEXE.props +20 -0
  28. data/vendor/libsodium/builds/msvc/properties/ReleaseLIB.props +19 -0
  29. data/vendor/libsodium/builds/msvc/properties/ReleaseLTCG.props +19 -0
  30. data/vendor/libsodium/builds/msvc/properties/ReleaseSEXE.props +20 -0
  31. data/vendor/libsodium/builds/msvc/properties/Win32.props +20 -0
  32. data/vendor/libsodium/builds/msvc/properties/x64.props +23 -0
  33. data/vendor/libsodium/builds/msvc/resource.h +0 -0
  34. data/vendor/libsodium/builds/msvc/resource.rc +0 -0
  35. data/vendor/libsodium/builds/msvc/version.h +29 -0
  36. data/vendor/libsodium/builds/msvc/vs2010/libsodium.import.props +52 -0
  37. data/vendor/libsodium/builds/msvc/vs2010/libsodium.import.xml +17 -0
  38. data/vendor/libsodium/builds/msvc/vs2010/libsodium.sln +79 -0
  39. data/vendor/libsodium/builds/msvc/vs2010/libsodium/libsodium.props +43 -0
  40. data/vendor/libsodium/builds/msvc/vs2010/libsodium/libsodium.vcxproj +345 -0
  41. data/vendor/libsodium/builds/msvc/vs2010/libsodium/libsodium.vcxproj.filters +1037 -0
  42. data/vendor/libsodium/builds/msvc/vs2010/libsodium/libsodium.xml +15 -0
  43. data/vendor/libsodium/builds/msvc/vs2010/test/test.props +37 -0
  44. data/vendor/libsodium/builds/msvc/vs2010/test/test.runner.bat +78 -0
  45. data/vendor/libsodium/builds/msvc/vs2010/test/test.vcxproj +220 -0
  46. data/vendor/libsodium/builds/msvc/vs2010/test/test.vcxproj.filters +168 -0
  47. data/vendor/libsodium/builds/msvc/vs2012/libsodium.import.props +52 -0
  48. data/vendor/libsodium/builds/msvc/vs2012/libsodium.import.xml +17 -0
  49. data/vendor/libsodium/builds/msvc/vs2012/libsodium.sln +79 -0
  50. data/vendor/libsodium/builds/msvc/vs2012/libsodium/libsodium.props +43 -0
  51. data/vendor/libsodium/builds/msvc/vs2012/libsodium/libsodium.vcxproj +345 -0
  52. data/vendor/libsodium/builds/msvc/vs2012/libsodium/libsodium.vcxproj.filters +1037 -0
  53. data/vendor/libsodium/builds/msvc/vs2012/libsodium/libsodium.xml +15 -0
  54. data/vendor/libsodium/builds/msvc/vs2012/test/test.props +37 -0
  55. data/vendor/libsodium/builds/msvc/vs2012/test/test.runner.bat +78 -0
  56. data/vendor/libsodium/builds/msvc/vs2012/test/test.vcxproj +220 -0
  57. data/vendor/libsodium/builds/msvc/vs2012/test/test.vcxproj.filters +168 -0
  58. data/vendor/libsodium/builds/msvc/vs2013/libsodium.import.props +52 -0
  59. data/vendor/libsodium/builds/msvc/vs2013/libsodium.import.xml +17 -0
  60. data/vendor/libsodium/builds/msvc/vs2013/libsodium.sln +81 -0
  61. data/vendor/libsodium/builds/msvc/vs2013/libsodium/libsodium.props +43 -0
  62. data/vendor/libsodium/builds/msvc/vs2013/libsodium/libsodium.vcxproj +345 -0
  63. data/vendor/libsodium/builds/msvc/vs2013/libsodium/libsodium.vcxproj.filters +1037 -0
  64. data/vendor/libsodium/builds/msvc/vs2013/libsodium/libsodium.xml +15 -0
  65. data/vendor/libsodium/builds/msvc/vs2013/test/test.props +37 -0
  66. data/vendor/libsodium/builds/msvc/vs2013/test/test.runner.bat +78 -0
  67. data/vendor/libsodium/builds/msvc/vs2013/test/test.vcxproj +220 -0
  68. data/vendor/libsodium/builds/msvc/vs2013/test/test.vcxproj.filters +168 -0
  69. data/vendor/libsodium/configure.ac +87 -68
  70. data/vendor/libsodium/dist-build/Makefile.am +10 -0
  71. data/vendor/libsodium/dist-build/android-arm.sh +3 -0
  72. data/vendor/libsodium/dist-build/android-armv7.sh +3 -0
  73. data/vendor/libsodium/dist-build/android-build.sh +37 -0
  74. data/vendor/libsodium/dist-build/android-mips.sh +3 -0
  75. data/vendor/libsodium/dist-build/android-x86.sh +3 -0
  76. data/vendor/libsodium/dist-build/emscripten.sh +13 -0
  77. data/vendor/libsodium/dist-build/{iphone.sh → ios.sh} +2 -2
  78. data/vendor/libsodium/dist-build/msys2-win32.sh +10 -0
  79. data/vendor/libsodium/dist-build/msys2-win64.sh +10 -0
  80. data/vendor/libsodium/libsodium.vcxproj +25 -13
  81. data/vendor/libsodium/libsodium.vcxproj.filters +60 -24
  82. data/vendor/libsodium/msvc-scripts/process.bat +3 -7
  83. data/vendor/libsodium/packaging/nuget/package.bat +13 -0
  84. data/vendor/libsodium/packaging/nuget/package.config +4 -0
  85. data/vendor/libsodium/packaging/nuget/package.gsl +255 -0
  86. data/vendor/libsodium/packaging/nuget/package.nuspec +93 -0
  87. data/vendor/libsodium/packaging/nuget/package.targets +128 -0
  88. data/vendor/libsodium/packaging/nuget/package.xml +22 -0
  89. data/vendor/libsodium/src/libsodium/Makefile.am +32 -20
  90. data/vendor/libsodium/src/libsodium/crypto_auth/hmacsha256/auth_hmacsha256_api.c +0 -5
  91. data/vendor/libsodium/src/libsodium/crypto_auth/hmacsha256/{ref → cp}/api.h +0 -1
  92. data/vendor/libsodium/src/libsodium/crypto_auth/hmacsha256/cp/hmac_hmacsha256.c +110 -0
  93. data/vendor/libsodium/src/libsodium/crypto_auth/hmacsha256/{ref → cp}/verify_hmacsha256.c +0 -0
  94. data/vendor/libsodium/src/libsodium/crypto_auth/hmacsha512/auth_hmacsha512_api.c +11 -0
  95. data/vendor/libsodium/src/libsodium/crypto_auth/hmacsha512/cp/api.h +9 -0
  96. data/vendor/libsodium/src/libsodium/crypto_auth/hmacsha512/cp/hmac_hmacsha512.c +110 -0
  97. data/vendor/libsodium/src/libsodium/crypto_auth/hmacsha512/cp/verify_hmacsha512.c +10 -0
  98. data/vendor/libsodium/src/libsodium/crypto_auth/hmacsha512256/auth_hmacsha512256_api.c +0 -5
  99. data/vendor/libsodium/src/libsodium/crypto_auth/hmacsha512256/{ref → cp}/api.h +0 -1
  100. data/vendor/libsodium/src/libsodium/crypto_auth/hmacsha512256/cp/hmac_hmacsha512256.c +54 -0
  101. data/vendor/libsodium/src/libsodium/crypto_auth/hmacsha512256/{ref → cp}/verify_hmacsha512256.c +2 -1
  102. data/vendor/libsodium/src/libsodium/crypto_box/crypto_box_easy.c +94 -0
  103. data/vendor/libsodium/src/libsodium/crypto_box/curve25519xsalsa20poly1305/box_curve25519xsalsa20poly1305_api.c +0 -5
  104. data/vendor/libsodium/src/libsodium/crypto_box/curve25519xsalsa20poly1305/ref/api.h +0 -1
  105. data/vendor/libsodium/src/libsodium/crypto_core/hsalsa20/core_hsalsa20_api.c +0 -5
  106. data/vendor/libsodium/src/libsodium/crypto_core/hsalsa20/ref2/api.h +0 -1
  107. data/vendor/libsodium/src/libsodium/crypto_core/salsa20/core_salsa20_api.c +0 -5
  108. data/vendor/libsodium/src/libsodium/crypto_core/salsa20/ref/api.h +0 -1
  109. data/vendor/libsodium/src/libsodium/crypto_core/salsa2012/core_salsa2012_api.c +0 -5
  110. data/vendor/libsodium/src/libsodium/crypto_core/salsa2012/ref/api.h +0 -1
  111. data/vendor/libsodium/src/libsodium/crypto_core/salsa208/core_salsa208_api.c +0 -5
  112. data/vendor/libsodium/src/libsodium/crypto_core/salsa208/ref/api.h +0 -1
  113. data/vendor/libsodium/src/libsodium/crypto_generichash/blake2/generichash_blake2_api.c +15 -5
  114. data/vendor/libsodium/src/libsodium/crypto_generichash/blake2/ref/api.h +0 -2
  115. data/vendor/libsodium/src/libsodium/crypto_generichash/blake2/ref/blake2.h +14 -6
  116. data/vendor/libsodium/src/libsodium/crypto_generichash/blake2/ref/blake2b-ref.c +95 -0
  117. data/vendor/libsodium/src/libsodium/crypto_generichash/blake2/ref/generichash_blake2b.c +50 -3
  118. data/vendor/libsodium/src/libsodium/crypto_generichash/crypto_generichash.c +4 -10
  119. data/vendor/libsodium/src/libsodium/crypto_hash/crypto_hash.c +11 -0
  120. data/vendor/libsodium/src/libsodium/crypto_hash/sha256/{ref → cp}/api.h +3 -1
  121. data/vendor/libsodium/src/libsodium/crypto_hash/sha256/cp/hash_sha256.c +294 -0
  122. data/vendor/libsodium/src/libsodium/crypto_hash/sha256/hash_sha256_api.c +0 -5
  123. data/vendor/libsodium/src/libsodium/crypto_hash/sha512/{ref → cp}/api.h +3 -1
  124. data/vendor/libsodium/src/libsodium/crypto_hash/sha512/cp/hash_sha512.c +321 -0
  125. data/vendor/libsodium/src/libsodium/crypto_hash/sha512/hash_sha512_api.c +0 -5
  126. data/vendor/libsodium/src/libsodium/crypto_onetimeauth/poly1305/donna/auth_poly1305_donna.c +51 -127
  127. data/vendor/libsodium/src/libsodium/crypto_onetimeauth/poly1305/donna/poly1305_donna.h +12 -0
  128. data/vendor/libsodium/src/libsodium/crypto_onetimeauth/poly1305/donna/poly1305_donna32.h +221 -0
  129. data/vendor/libsodium/src/libsodium/crypto_onetimeauth/poly1305/donna/poly1305_donna64.h +209 -0
  130. data/vendor/libsodium/src/libsodium/crypto_onetimeauth/poly1305/onetimeauth_poly1305_api.c +0 -5
  131. data/vendor/libsodium/src/libsodium/crypto_onetimeauth/poly1305/onetimeauth_poly1305_try.c +1 -140
  132. data/vendor/libsodium/src/libsodium/crypto_pwhash/scryptxsalsa208sha256/crypto_scrypt-common.c +250 -0
  133. data/vendor/libsodium/src/libsodium/crypto_pwhash/scryptxsalsa208sha256/crypto_scrypt.h +100 -0
  134. data/vendor/libsodium/src/libsodium/crypto_pwhash/scryptxsalsa208sha256/nosse/pwhash_scryptxsalsa208sha256_nosse.c +302 -0
  135. data/vendor/libsodium/src/libsodium/crypto_pwhash/scryptxsalsa208sha256/pbkdf2-sha256.c +94 -0
  136. data/vendor/libsodium/src/libsodium/crypto_pwhash/scryptxsalsa208sha256/pbkdf2-sha256.h +45 -0
  137. data/vendor/libsodium/src/libsodium/crypto_pwhash/scryptxsalsa208sha256/pwhash_scryptxsalsa208sha256.c +172 -0
  138. data/vendor/libsodium/src/libsodium/crypto_pwhash/scryptxsalsa208sha256/scrypt_platform.c +96 -0
  139. data/vendor/libsodium/src/libsodium/crypto_pwhash/scryptxsalsa208sha256/sse/pwhash_scryptxsalsa208sha256_sse.c +391 -0
  140. data/vendor/libsodium/src/libsodium/crypto_pwhash/scryptxsalsa208sha256/sysendian.h +146 -0
  141. data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/donna_c64/api.h +2 -2
  142. data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/donna_c64/smult_curve25519_donna_c64.c +39 -9
  143. data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/ref/api.h +2 -2
  144. data/vendor/libsodium/src/libsodium/crypto_secretbox/crypto_secretbox.c +6 -0
  145. data/vendor/libsodium/src/libsodium/crypto_secretbox/crypto_secretbox_easy.c +94 -0
  146. data/vendor/libsodium/src/libsodium/crypto_secretbox/xsalsa20poly1305/ref/api.h +0 -1
  147. data/vendor/libsodium/src/libsodium/crypto_secretbox/xsalsa20poly1305/secretbox_xsalsa20poly1305_api.c +3 -3
  148. data/vendor/libsodium/src/libsodium/crypto_shorthash/siphash24/ref/api.h +0 -1
  149. data/vendor/libsodium/src/libsodium/crypto_shorthash/siphash24/shorthash_siphash24_api.c +3 -3
  150. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/api.h +0 -1
  151. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_scalarmult_base.c +6 -0
  152. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/keypair.c +5 -3
  153. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/open.c +28 -18
  154. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/sign.c +14 -9
  155. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/sign_ed25519_api.c +0 -5
  156. data/vendor/libsodium/src/libsodium/crypto_sign/edwards25519sha512batch/ref/api.h +0 -1
  157. data/vendor/libsodium/src/libsodium/crypto_sign/edwards25519sha512batch/sign_edwards25519sha512batch_api.c +0 -5
  158. data/vendor/libsodium/src/libsodium/crypto_stream/aes128ctr/portable/afternm_aes128ctr.c +21 -21
  159. data/vendor/libsodium/src/libsodium/crypto_stream/aes128ctr/portable/api.h +0 -1
  160. data/vendor/libsodium/src/libsodium/crypto_stream/aes128ctr/portable/int128.h +6 -0
  161. data/vendor/libsodium/src/libsodium/crypto_stream/aes128ctr/portable/xor_afternm_aes128ctr.c +42 -42
  162. data/vendor/libsodium/src/libsodium/crypto_stream/aes128ctr/stream_aes128ctr_api.c +0 -5
  163. data/vendor/libsodium/src/libsodium/crypto_stream/aes256estream/hongjun/aes-table-be.h +4 -4
  164. data/vendor/libsodium/src/libsodium/crypto_stream/aes256estream/hongjun/aes-table-le.h +4 -4
  165. data/vendor/libsodium/src/libsodium/crypto_stream/aes256estream/hongjun/aes256-ctr.c +15 -14
  166. data/vendor/libsodium/src/libsodium/crypto_stream/aes256estream/hongjun/api.h +0 -1
  167. data/vendor/libsodium/src/libsodium/crypto_stream/aes256estream/hongjun/ecrypt-sync.h +1 -1
  168. data/vendor/libsodium/src/libsodium/crypto_stream/aes256estream/stream_aes256estream_api.c +0 -5
  169. data/vendor/libsodium/src/libsodium/crypto_stream/salsa20/amd64_xmm6/stream_salsa20_amd64_xmm6.S +153 -160
  170. data/vendor/libsodium/src/libsodium/crypto_stream/salsa20/ref/api.h +2 -5
  171. data/vendor/libsodium/src/libsodium/crypto_stream/salsa20/ref/stream_salsa20_ref.c +9 -3
  172. data/vendor/libsodium/src/libsodium/crypto_stream/salsa20/ref/xor_salsa20_ref.c +9 -3
  173. data/vendor/libsodium/src/libsodium/crypto_stream/salsa20/stream_salsa20_api.c +0 -5
  174. data/vendor/libsodium/src/libsodium/crypto_stream/salsa2012/ref/api.h +0 -1
  175. data/vendor/libsodium/src/libsodium/crypto_stream/salsa2012/stream_salsa2012_api.c +0 -5
  176. data/vendor/libsodium/src/libsodium/crypto_stream/salsa208/ref/api.h +0 -1
  177. data/vendor/libsodium/src/libsodium/crypto_stream/salsa208/stream_salsa208_api.c +0 -5
  178. data/vendor/libsodium/src/libsodium/crypto_stream/xsalsa20/ref/api.h +0 -1
  179. data/vendor/libsodium/src/libsodium/crypto_stream/xsalsa20/stream_xsalsa20_api.c +0 -5
  180. data/vendor/libsodium/src/libsodium/crypto_verify/64/ref/api.h +2 -0
  181. data/vendor/libsodium/src/libsodium/crypto_verify/64/ref/verify_64.c +72 -0
  182. data/vendor/libsodium/src/libsodium/crypto_verify/64/verify_64_api.c +6 -0
  183. data/vendor/libsodium/src/libsodium/include/Makefile.am +6 -7
  184. data/vendor/libsodium/src/libsodium/include/sodium.h +4 -3
  185. data/vendor/libsodium/src/libsodium/include/sodium/crypto_auth.h +3 -0
  186. data/vendor/libsodium/src/libsodium/include/sodium/crypto_auth_hmacsha256.h +31 -9
  187. data/vendor/libsodium/src/libsodium/include/sodium/crypto_auth_hmacsha512.h +58 -0
  188. data/vendor/libsodium/src/libsodium/include/sodium/crypto_auth_hmacsha512256.h +26 -9
  189. data/vendor/libsodium/src/libsodium/include/sodium/crypto_box.h +13 -0
  190. data/vendor/libsodium/src/libsodium/include/sodium/crypto_box_curve25519xsalsa20poly1305.h +38 -24
  191. data/vendor/libsodium/src/libsodium/include/sodium/crypto_core_hsalsa20.h +6 -11
  192. data/vendor/libsodium/src/libsodium/include/sodium/crypto_core_salsa20.h +6 -11
  193. data/vendor/libsodium/src/libsodium/include/sodium/crypto_core_salsa2012.h +6 -11
  194. data/vendor/libsodium/src/libsodium/include/sodium/crypto_core_salsa208.h +6 -11
  195. data/vendor/libsodium/src/libsodium/include/sodium/crypto_generichash.h +7 -8
  196. data/vendor/libsodium/src/libsodium/include/sodium/crypto_generichash_blake2b.h +36 -16
  197. data/vendor/libsodium/src/libsodium/include/sodium/crypto_hash.h +13 -4
  198. data/vendor/libsodium/src/libsodium/include/sodium/crypto_hash_sha256.h +25 -7
  199. data/vendor/libsodium/src/libsodium/include/sodium/crypto_hash_sha512.h +25 -7
  200. data/vendor/libsodium/src/libsodium/include/sodium/crypto_onetimeauth.h +3 -0
  201. data/vendor/libsodium/src/libsodium/include/sodium/crypto_onetimeauth_poly1305.h +5 -5
  202. data/vendor/libsodium/src/libsodium/include/sodium/crypto_onetimeauth_poly1305_donna.h +3 -0
  203. data/vendor/libsodium/src/libsodium/include/sodium/crypto_pwhash_scryptxsalsa208sha256.h +48 -0
  204. data/vendor/libsodium/src/libsodium/include/sodium/crypto_scalarmult_curve25519.h +31 -0
  205. data/vendor/libsodium/src/libsodium/include/sodium/crypto_secretbox.h +17 -0
  206. data/vendor/libsodium/src/libsodium/include/sodium/crypto_secretbox_xsalsa20poly1305.h +21 -11
  207. data/vendor/libsodium/src/libsodium/include/sodium/crypto_shorthash.h +3 -0
  208. data/vendor/libsodium/src/libsodium/include/sodium/crypto_shorthash_siphash24.h +8 -7
  209. data/vendor/libsodium/src/libsodium/include/sodium/crypto_sign.h +3 -0
  210. data/vendor/libsodium/src/libsodium/include/sodium/crypto_sign_ed25519.h +16 -17
  211. data/vendor/libsodium/src/libsodium/include/sodium/crypto_sign_edwards25519sha512batch.h +18 -14
  212. data/vendor/libsodium/src/libsodium/include/sodium/crypto_stream.h +3 -0
  213. data/vendor/libsodium/src/libsodium/include/sodium/crypto_stream_aes128ctr.h +18 -18
  214. data/vendor/libsodium/src/libsodium/include/sodium/crypto_stream_aes256estream.h +19 -18
  215. data/vendor/libsodium/src/libsodium/include/sodium/{crypto_stream_salsa20.h.in → crypto_stream_salsa20.h} +8 -19
  216. data/vendor/libsodium/src/libsodium/include/sodium/crypto_stream_salsa2012.h +8 -8
  217. data/vendor/libsodium/src/libsodium/include/sodium/crypto_stream_salsa208.h +8 -8
  218. data/vendor/libsodium/src/libsodium/include/sodium/crypto_stream_xsalsa20.h +10 -11
  219. data/vendor/libsodium/src/libsodium/include/sodium/crypto_verify_16.h +1 -4
  220. data/vendor/libsodium/src/libsodium/include/sodium/crypto_verify_32.h +1 -4
  221. data/vendor/libsodium/src/libsodium/include/sodium/crypto_verify_64.h +22 -0
  222. data/vendor/libsodium/src/libsodium/include/sodium/randombytes.h +3 -0
  223. data/vendor/libsodium/src/libsodium/include/sodium/runtime.h +27 -0
  224. data/vendor/libsodium/src/libsodium/include/sodium/utils.h +15 -3
  225. data/vendor/libsodium/src/libsodium/randombytes/randombytes.c +3 -1
  226. data/vendor/libsodium/src/libsodium/randombytes/salsa20/randombytes_salsa20_random.c +18 -7
  227. data/vendor/libsodium/src/libsodium/randombytes/sysrandom/randombytes_sysrandom.c +57 -9
  228. data/vendor/libsodium/src/libsodium/sodium/compat.c +62 -0
  229. data/vendor/libsodium/src/libsodium/sodium/core.c +2 -0
  230. data/vendor/libsodium/src/libsodium/sodium/runtime.c +134 -0
  231. data/vendor/libsodium/src/libsodium/sodium/utils.c +100 -8
  232. data/vendor/libsodium/test/default/Makefile.am +63 -3
  233. data/vendor/libsodium/test/default/auth6.c +21 -0
  234. data/vendor/libsodium/test/default/auth6.exp +8 -0
  235. data/vendor/libsodium/test/default/auth7.c +37 -0
  236. data/vendor/libsodium/test/default/auth7.exp +0 -0
  237. data/vendor/libsodium/test/default/box_easy.c +59 -0
  238. data/vendor/libsodium/test/default/box_easy.exp +19 -0
  239. data/vendor/libsodium/test/default/box_easy2.c +31 -0
  240. data/vendor/libsodium/test/default/box_easy2.exp +1 -0
  241. data/vendor/libsodium/test/default/cmptest.h +7 -1
  242. data/vendor/libsodium/test/default/generichash3.c +36 -0
  243. data/vendor/libsodium/test/default/generichash3.exp +64 -0
  244. data/vendor/libsodium/test/default/pwhash.c +59 -0
  245. data/vendor/libsodium/test/default/pwhash.exp +2 -0
  246. data/vendor/libsodium/test/default/scalarmult7.c +0 -2
  247. data/vendor/libsodium/test/default/scalarmult8.c +0 -2
  248. data/vendor/libsodium/test/default/secretbox_easy.c +51 -0
  249. data/vendor/libsodium/test/default/secretbox_easy.exp +19 -0
  250. data/vendor/libsodium/test/default/secretbox_easy2.c +27 -0
  251. data/vendor/libsodium/test/default/secretbox_easy2.exp +1 -0
  252. data/vendor/libsodium/test/default/sign.c +1106 -0
  253. data/vendor/libsodium/test/default/sign.exp +3 -0
  254. data/vendor/libsodium/test/default/sodium_utils.c +8 -0
  255. data/vendor/libsodium/test/default/sodium_utils.exp +2 -1
  256. data/vendor/libsodium/test/default/sodium_version.c +1 -1
  257. data/vendor/libsodium/test/default/verify1.c +34 -0
  258. data/vendor/libsodium/test/default/verify1.exp +6 -0
  259. metadata +138 -33
  260. data/vendor/libsodium/dist-build/android.sh +0 -48
  261. data/vendor/libsodium/dist-build/msys.sh +0 -9
  262. data/vendor/libsodium/src/libsodium/crypto_auth/hmacsha256/ref/hmac_hmacsha256.c +0 -83
  263. data/vendor/libsodium/src/libsodium/crypto_auth/hmacsha512256/ref/hmac_hmacsha512256.c +0 -86
  264. data/vendor/libsodium/src/libsodium/crypto_hash/sha256/ref/hash_sha256.c +0 -69
  265. data/vendor/libsodium/src/libsodium/crypto_hash/sha512/ref/hash_sha512.c +0 -71
  266. data/vendor/libsodium/src/libsodium/crypto_hashblocks/sha256/checksum +0 -1
  267. data/vendor/libsodium/src/libsodium/crypto_hashblocks/sha256/hashblocks_sha256_api.c +0 -16
  268. data/vendor/libsodium/src/libsodium/crypto_hashblocks/sha256/ref/api.h +0 -9
  269. data/vendor/libsodium/src/libsodium/crypto_hashblocks/sha256/ref/blocks_sha256.c +0 -212
  270. data/vendor/libsodium/src/libsodium/crypto_hashblocks/sha512/checksum +0 -1
  271. data/vendor/libsodium/src/libsodium/crypto_hashblocks/sha512/hashblocks_sha512_api.c +0 -16
  272. data/vendor/libsodium/src/libsodium/crypto_hashblocks/sha512/ref/api.h +0 -9
  273. data/vendor/libsodium/src/libsodium/crypto_hashblocks/sha512/ref/blocks_sha512.c +0 -239
  274. data/vendor/libsodium/src/libsodium/crypto_hashblocks/try.c +0 -78
  275. data/vendor/libsodium/src/libsodium/crypto_onetimeauth/poly1305/53/api.h +0 -8
  276. data/vendor/libsodium/src/libsodium/crypto_onetimeauth/poly1305/53/auth_poly1305_53.c +0 -1661
  277. data/vendor/libsodium/src/libsodium/crypto_onetimeauth/poly1305/53/verify_poly1305_53.c +0 -10
  278. data/vendor/libsodium/src/libsodium/crypto_onetimeauth/poly1305/donna/portable-jane.h +0 -772
  279. data/vendor/libsodium/src/libsodium/include/sodium/crypto_hashblocks_sha256.h +0 -32
  280. data/vendor/libsodium/src/libsodium/include/sodium/crypto_hashblocks_sha512.h +0 -32
  281. data/vendor/libsodium/src/libsodium/include/sodium/crypto_onetimeauth_poly1305_53.h +0 -34
  282. data/vendor/libsodium/src/libsodium/include/sodium/crypto_scalarmult_curve25519.h.in +0 -44
@@ -1,9 +0,0 @@
1
- #! /bin/sh
2
-
3
- export CFLAGS="-O3 -fomit-frame-pointer -march=pentium2 -mtune=nocona"
4
- export PREFIX="$(pwd)/libsodium-win32"
5
-
6
- ./configure --prefix="$PREFIX" --exec-prefix="$PREFIX" && \
7
- make && \
8
- make check && \
9
- make install
@@ -1,83 +0,0 @@
1
- /*
2
- * 20080913
3
- * D. J. Bernstein
4
- * Public domain.
5
- * */
6
-
7
- #include "api.h"
8
- #include "crypto_hashblocks_sha256.h"
9
-
10
- #define blocks crypto_hashblocks_sha256
11
-
12
- typedef unsigned int uint32;
13
-
14
- static const unsigned char iv[32] = {
15
- 0x6a,0x09,0xe6,0x67,
16
- 0xbb,0x67,0xae,0x85,
17
- 0x3c,0x6e,0xf3,0x72,
18
- 0xa5,0x4f,0xf5,0x3a,
19
- 0x51,0x0e,0x52,0x7f,
20
- 0x9b,0x05,0x68,0x8c,
21
- 0x1f,0x83,0xd9,0xab,
22
- 0x5b,0xe0,0xcd,0x19,
23
- } ;
24
-
25
- int crypto_auth(unsigned char *out,const unsigned char *in,unsigned long long inlen,const unsigned char *k)
26
- {
27
- unsigned char h[32];
28
- unsigned char padded[128];
29
- unsigned long long i;
30
- unsigned long long bits = 512 + (inlen << 3);
31
-
32
- for (i = 0;i < 32;++i) h[i] = iv[i];
33
-
34
- for (i = 0;i < 32;++i) padded[i] = k[i] ^ 0x36;
35
- for (i = 32;i < 64;++i) padded[i] = 0x36;
36
-
37
- blocks(h,padded,64);
38
- blocks(h,in,inlen);
39
- in += inlen;
40
- inlen &= 63;
41
- in -= inlen;
42
-
43
- for (i = 0;i < inlen;++i) padded[i] = in[i];
44
- padded[inlen] = 0x80;
45
-
46
- if (inlen < 56) {
47
- for (i = inlen + 1;i < 56;++i) padded[i] = 0;
48
- padded[56] = bits >> 56;
49
- padded[57] = bits >> 48;
50
- padded[58] = bits >> 40;
51
- padded[59] = bits >> 32;
52
- padded[60] = bits >> 24;
53
- padded[61] = bits >> 16;
54
- padded[62] = bits >> 8;
55
- padded[63] = bits;
56
- blocks(h,padded,64);
57
- } else {
58
- for (i = inlen + 1;i < 120;++i) padded[i] = 0;
59
- padded[120] = bits >> 56;
60
- padded[121] = bits >> 48;
61
- padded[122] = bits >> 40;
62
- padded[123] = bits >> 32;
63
- padded[124] = bits >> 24;
64
- padded[125] = bits >> 16;
65
- padded[126] = bits >> 8;
66
- padded[127] = bits;
67
- blocks(h,padded,128);
68
- }
69
-
70
- for (i = 0;i < 32;++i) padded[i] = k[i] ^ 0x5c;
71
- for (i = 32;i < 64;++i) padded[i] = 0x5c;
72
- for (i = 0;i < 32;++i) padded[64 + i] = h[i];
73
-
74
- for (i = 0;i < 32;++i) out[i] = iv[i];
75
-
76
- for (i = 32;i < 64;++i) padded[64 + i] = 0;
77
- padded[64 + 32] = 0x80;
78
- padded[64 + 62] = 3;
79
-
80
- blocks(out,padded,128);
81
-
82
- return 0;
83
- }
@@ -1,86 +0,0 @@
1
- /*
2
- * 20080913
3
- * D. J. Bernstein
4
- * Public domain.
5
- * */
6
-
7
- #include "api.h"
8
- #include "crypto_hashblocks_sha512.h"
9
-
10
- #define blocks crypto_hashblocks_sha512
11
-
12
- typedef unsigned long long uint64;
13
-
14
- static const unsigned char iv[64] = {
15
- 0x6a,0x09,0xe6,0x67,0xf3,0xbc,0xc9,0x08,
16
- 0xbb,0x67,0xae,0x85,0x84,0xca,0xa7,0x3b,
17
- 0x3c,0x6e,0xf3,0x72,0xfe,0x94,0xf8,0x2b,
18
- 0xa5,0x4f,0xf5,0x3a,0x5f,0x1d,0x36,0xf1,
19
- 0x51,0x0e,0x52,0x7f,0xad,0xe6,0x82,0xd1,
20
- 0x9b,0x05,0x68,0x8c,0x2b,0x3e,0x6c,0x1f,
21
- 0x1f,0x83,0xd9,0xab,0xfb,0x41,0xbd,0x6b,
22
- 0x5b,0xe0,0xcd,0x19,0x13,0x7e,0x21,0x79
23
- } ;
24
-
25
- int crypto_auth(unsigned char *out,const unsigned char *in,unsigned long long inlen,const unsigned char *k)
26
- {
27
- unsigned char h[64];
28
- unsigned char padded[256];
29
- unsigned long long i;
30
- unsigned long long bytes = 128 + inlen;
31
-
32
- for (i = 0;i < 64;++i) h[i] = iv[i];
33
-
34
- for (i = 0;i < 32;++i) padded[i] = k[i] ^ 0x36;
35
- for (i = 32;i < 128;++i) padded[i] = 0x36;
36
-
37
- blocks(h,padded,128);
38
- blocks(h,in,inlen);
39
- in += inlen;
40
- inlen &= 127;
41
- in -= inlen;
42
-
43
- for (i = 0;i < inlen;++i) padded[i] = in[i];
44
- padded[inlen] = 0x80;
45
-
46
- if (inlen < 112) {
47
- for (i = inlen + 1;i < 119;++i) padded[i] = 0;
48
- padded[119] = bytes >> 61;
49
- padded[120] = bytes >> 53;
50
- padded[121] = bytes >> 45;
51
- padded[122] = bytes >> 37;
52
- padded[123] = bytes >> 29;
53
- padded[124] = bytes >> 21;
54
- padded[125] = bytes >> 13;
55
- padded[126] = bytes >> 5;
56
- padded[127] = bytes << 3;
57
- blocks(h,padded,128);
58
- } else {
59
- for (i = inlen + 1;i < 247;++i) padded[i] = 0;
60
- padded[247] = bytes >> 61;
61
- padded[248] = bytes >> 53;
62
- padded[249] = bytes >> 45;
63
- padded[250] = bytes >> 37;
64
- padded[251] = bytes >> 29;
65
- padded[252] = bytes >> 21;
66
- padded[253] = bytes >> 13;
67
- padded[254] = bytes >> 5;
68
- padded[255] = bytes << 3;
69
- blocks(h,padded,256);
70
- }
71
-
72
- for (i = 0;i < 32;++i) padded[i] = k[i] ^ 0x5c;
73
- for (i = 32;i < 128;++i) padded[i] = 0x5c;
74
-
75
- for (i = 0;i < 64;++i) padded[128 + i] = h[i];
76
- for (i = 0;i < 64;++i) h[i] = iv[i];
77
-
78
- for (i = 64;i < 128;++i) padded[128 + i] = 0;
79
- padded[128 + 64] = 0x80;
80
- padded[128 + 126] = 6;
81
-
82
- blocks(h,padded,256);
83
- for (i = 0;i < 32;++i) out[i] = h[i];
84
-
85
- return 0;
86
- }
@@ -1,69 +0,0 @@
1
- /*
2
- 20080913
3
- D. J. Bernstein
4
- Public domain.
5
- */
6
-
7
- #include "api.h"
8
- #include "crypto_hashblocks_sha256.h"
9
-
10
- #define blocks crypto_hashblocks_sha256
11
-
12
- typedef unsigned int uint32;
13
-
14
- static const unsigned char iv[32] = {
15
- 0x6a,0x09,0xe6,0x67,
16
- 0xbb,0x67,0xae,0x85,
17
- 0x3c,0x6e,0xf3,0x72,
18
- 0xa5,0x4f,0xf5,0x3a,
19
- 0x51,0x0e,0x52,0x7f,
20
- 0x9b,0x05,0x68,0x8c,
21
- 0x1f,0x83,0xd9,0xab,
22
- 0x5b,0xe0,0xcd,0x19,
23
- } ;
24
-
25
- int crypto_hash(unsigned char *out,const unsigned char *in,unsigned long long inlen)
26
- {
27
- unsigned char h[32];
28
- unsigned char padded[128];
29
- unsigned long long i;
30
- unsigned long long bits = inlen << 3;
31
-
32
- for (i = 0;i < 32;++i) h[i] = iv[i];
33
-
34
- blocks(h,in,inlen);
35
- in += inlen;
36
- inlen &= 63;
37
- in -= inlen;
38
-
39
- for (i = 0;i < inlen;++i) padded[i] = in[i];
40
- padded[inlen] = 0x80;
41
-
42
- if (inlen < 56) {
43
- for (i = inlen + 1;i < 56;++i) padded[i] = 0;
44
- padded[56] = bits >> 56;
45
- padded[57] = bits >> 48;
46
- padded[58] = bits >> 40;
47
- padded[59] = bits >> 32;
48
- padded[60] = bits >> 24;
49
- padded[61] = bits >> 16;
50
- padded[62] = bits >> 8;
51
- padded[63] = bits;
52
- blocks(h,padded,64);
53
- } else {
54
- for (i = inlen + 1;i < 120;++i) padded[i] = 0;
55
- padded[120] = bits >> 56;
56
- padded[121] = bits >> 48;
57
- padded[122] = bits >> 40;
58
- padded[123] = bits >> 32;
59
- padded[124] = bits >> 24;
60
- padded[125] = bits >> 16;
61
- padded[126] = bits >> 8;
62
- padded[127] = bits;
63
- blocks(h,padded,128);
64
- }
65
-
66
- for (i = 0;i < 32;++i) out[i] = h[i];
67
-
68
- return 0;
69
- }
@@ -1,71 +0,0 @@
1
- /*
2
- 20080913
3
- D. J. Bernstein
4
- Public domain.
5
- */
6
-
7
- #include "api.h"
8
- #include "crypto_hashblocks_sha512.h"
9
-
10
- #define blocks crypto_hashblocks_sha512
11
-
12
- static const unsigned char iv[64] = {
13
- 0x6a,0x09,0xe6,0x67,0xf3,0xbc,0xc9,0x08,
14
- 0xbb,0x67,0xae,0x85,0x84,0xca,0xa7,0x3b,
15
- 0x3c,0x6e,0xf3,0x72,0xfe,0x94,0xf8,0x2b,
16
- 0xa5,0x4f,0xf5,0x3a,0x5f,0x1d,0x36,0xf1,
17
- 0x51,0x0e,0x52,0x7f,0xad,0xe6,0x82,0xd1,
18
- 0x9b,0x05,0x68,0x8c,0x2b,0x3e,0x6c,0x1f,
19
- 0x1f,0x83,0xd9,0xab,0xfb,0x41,0xbd,0x6b,
20
- 0x5b,0xe0,0xcd,0x19,0x13,0x7e,0x21,0x79
21
- } ;
22
-
23
- typedef unsigned long long uint64;
24
-
25
- int crypto_hash(unsigned char *out,const unsigned char *in,unsigned long long inlen)
26
- {
27
- unsigned char h[64];
28
- unsigned char padded[256];
29
- unsigned long long i;
30
- unsigned long long bytes = inlen;
31
-
32
- for (i = 0;i < 64;++i) h[i] = iv[i];
33
-
34
- blocks(h,in,inlen);
35
- in += inlen;
36
- inlen &= 127;
37
- in -= inlen;
38
-
39
- for (i = 0;i < inlen;++i) padded[i] = in[i];
40
- padded[inlen] = 0x80;
41
-
42
- if (inlen < 112) {
43
- for (i = inlen + 1;i < 119;++i) padded[i] = 0;
44
- padded[119] = bytes >> 61;
45
- padded[120] = bytes >> 53;
46
- padded[121] = bytes >> 45;
47
- padded[122] = bytes >> 37;
48
- padded[123] = bytes >> 29;
49
- padded[124] = bytes >> 21;
50
- padded[125] = bytes >> 13;
51
- padded[126] = bytes >> 5;
52
- padded[127] = bytes << 3;
53
- blocks(h,padded,128);
54
- } else {
55
- for (i = inlen + 1;i < 247;++i) padded[i] = 0;
56
- padded[247] = bytes >> 61;
57
- padded[248] = bytes >> 53;
58
- padded[249] = bytes >> 45;
59
- padded[250] = bytes >> 37;
60
- padded[251] = bytes >> 29;
61
- padded[252] = bytes >> 21;
62
- padded[253] = bytes >> 13;
63
- padded[254] = bytes >> 5;
64
- padded[255] = bytes << 3;
65
- blocks(h,padded,256);
66
- }
67
-
68
- for (i = 0;i < 64;++i) out[i] = h[i];
69
-
70
- return 0;
71
- }
@@ -1 +0,0 @@
1
- 69a9dc2464f9593161e462d3dbb634b84f1d68d67d26df29aaa805f9dcd8f656
@@ -1,16 +0,0 @@
1
- #include "crypto_hashblocks_sha256.h"
2
-
3
- size_t
4
- crypto_hashblocks_sha256_statebytes(void) {
5
- return crypto_hashblocks_sha256_STATEBYTES;
6
- }
7
-
8
- size_t
9
- crypto_hashblocks_sha256_blockbytes(void) {
10
- return crypto_hashblocks_sha256_BLOCKBYTES;
11
- }
12
-
13
- const char *
14
- crypto_hashblocks_sha256_primitive(void) {
15
- return "sha256";
16
- }
@@ -1,9 +0,0 @@
1
-
2
- #include "crypto_hashblocks_sha256.h"
3
-
4
- #define crypto_hashblocks crypto_hashblocks_sha256
5
- #define crypto_hashblocks_STATEBYTES crypto_hashblocks_sha256_STATEBYTES
6
- #define crypto_hashblocks_BLOCKBYTES crypto_hashblocks_sha256_BLOCKBYTES
7
- #define crypto_hashblocks_PRIMITIVE "sha256"
8
- #define crypto_hashblocks_IMPLEMENTATION crypto_hashblocks_sha256_IMPLEMENTATION
9
- #define crypto_hashblocks_VERSION crypto_hashblocks_sha256_VERSION
@@ -1,212 +0,0 @@
1
- #include "api.h"
2
-
3
- typedef unsigned int uint32;
4
-
5
- static uint32 load_bigendian(const unsigned char *x)
6
- {
7
- return
8
- (uint32) (x[3]) \
9
- | (((uint32) (x[2])) << 8) \
10
- | (((uint32) (x[1])) << 16) \
11
- | (((uint32) (x[0])) << 24)
12
- ;
13
- }
14
-
15
- static void store_bigendian(unsigned char *x,uint32 u)
16
- {
17
- x[3] = u; u >>= 8;
18
- x[2] = u; u >>= 8;
19
- x[1] = u; u >>= 8;
20
- x[0] = u;
21
- }
22
-
23
- #define SHR(x,c) ((x) >> (c))
24
- #define ROTR(x,c) (((x) >> (c)) | ((x) << (32 - (c))))
25
-
26
- #define Ch(x,y,z) ((x & y) ^ (~x & z))
27
- #define Maj(x,y,z) ((x & y) ^ (x & z) ^ (y & z))
28
- #define Sigma0(x) (ROTR(x, 2) ^ ROTR(x,13) ^ ROTR(x,22))
29
- #define Sigma1(x) (ROTR(x, 6) ^ ROTR(x,11) ^ ROTR(x,25))
30
- #define sigma0(x) (ROTR(x, 7) ^ ROTR(x,18) ^ SHR(x, 3))
31
- #define sigma1(x) (ROTR(x,17) ^ ROTR(x,19) ^ SHR(x,10))
32
-
33
- #define M(w0,w14,w9,w1) w0 = sigma1(w14) + w9 + sigma0(w1) + w0;
34
-
35
- #define EXPAND \
36
- M(w0 ,w14,w9 ,w1 ) \
37
- M(w1 ,w15,w10,w2 ) \
38
- M(w2 ,w0 ,w11,w3 ) \
39
- M(w3 ,w1 ,w12,w4 ) \
40
- M(w4 ,w2 ,w13,w5 ) \
41
- M(w5 ,w3 ,w14,w6 ) \
42
- M(w6 ,w4 ,w15,w7 ) \
43
- M(w7 ,w5 ,w0 ,w8 ) \
44
- M(w8 ,w6 ,w1 ,w9 ) \
45
- M(w9 ,w7 ,w2 ,w10) \
46
- M(w10,w8 ,w3 ,w11) \
47
- M(w11,w9 ,w4 ,w12) \
48
- M(w12,w10,w5 ,w13) \
49
- M(w13,w11,w6 ,w14) \
50
- M(w14,w12,w7 ,w15) \
51
- M(w15,w13,w8 ,w0 )
52
-
53
- #define F(w,k) \
54
- T1 = h + Sigma1(e) + Ch(e,f,g) + k + w; \
55
- T2 = Sigma0(a) + Maj(a,b,c); \
56
- h = g; \
57
- g = f; \
58
- f = e; \
59
- e = d + T1; \
60
- d = c; \
61
- c = b; \
62
- b = a; \
63
- a = T1 + T2;
64
-
65
- int crypto_hashblocks(unsigned char *statebytes,const unsigned char *in,unsigned long long inlen)
66
- {
67
- uint32 state[8];
68
- uint32 a;
69
- uint32 b;
70
- uint32 c;
71
- uint32 d;
72
- uint32 e;
73
- uint32 f;
74
- uint32 g;
75
- uint32 h;
76
- uint32 T1;
77
- uint32 T2;
78
-
79
- a = load_bigendian(statebytes + 0); state[0] = a;
80
- b = load_bigendian(statebytes + 4); state[1] = b;
81
- c = load_bigendian(statebytes + 8); state[2] = c;
82
- d = load_bigendian(statebytes + 12); state[3] = d;
83
- e = load_bigendian(statebytes + 16); state[4] = e;
84
- f = load_bigendian(statebytes + 20); state[5] = f;
85
- g = load_bigendian(statebytes + 24); state[6] = g;
86
- h = load_bigendian(statebytes + 28); state[7] = h;
87
-
88
- while (inlen >= 64) {
89
- uint32 w0 = load_bigendian(in + 0);
90
- uint32 w1 = load_bigendian(in + 4);
91
- uint32 w2 = load_bigendian(in + 8);
92
- uint32 w3 = load_bigendian(in + 12);
93
- uint32 w4 = load_bigendian(in + 16);
94
- uint32 w5 = load_bigendian(in + 20);
95
- uint32 w6 = load_bigendian(in + 24);
96
- uint32 w7 = load_bigendian(in + 28);
97
- uint32 w8 = load_bigendian(in + 32);
98
- uint32 w9 = load_bigendian(in + 36);
99
- uint32 w10 = load_bigendian(in + 40);
100
- uint32 w11 = load_bigendian(in + 44);
101
- uint32 w12 = load_bigendian(in + 48);
102
- uint32 w13 = load_bigendian(in + 52);
103
- uint32 w14 = load_bigendian(in + 56);
104
- uint32 w15 = load_bigendian(in + 60);
105
-
106
- F(w0 ,0x428a2f98)
107
- F(w1 ,0x71374491)
108
- F(w2 ,0xb5c0fbcf)
109
- F(w3 ,0xe9b5dba5)
110
- F(w4 ,0x3956c25b)
111
- F(w5 ,0x59f111f1)
112
- F(w6 ,0x923f82a4)
113
- F(w7 ,0xab1c5ed5)
114
- F(w8 ,0xd807aa98)
115
- F(w9 ,0x12835b01)
116
- F(w10,0x243185be)
117
- F(w11,0x550c7dc3)
118
- F(w12,0x72be5d74)
119
- F(w13,0x80deb1fe)
120
- F(w14,0x9bdc06a7)
121
- F(w15,0xc19bf174)
122
-
123
- EXPAND
124
-
125
- F(w0 ,0xe49b69c1)
126
- F(w1 ,0xefbe4786)
127
- F(w2 ,0x0fc19dc6)
128
- F(w3 ,0x240ca1cc)
129
- F(w4 ,0x2de92c6f)
130
- F(w5 ,0x4a7484aa)
131
- F(w6 ,0x5cb0a9dc)
132
- F(w7 ,0x76f988da)
133
- F(w8 ,0x983e5152)
134
- F(w9 ,0xa831c66d)
135
- F(w10,0xb00327c8)
136
- F(w11,0xbf597fc7)
137
- F(w12,0xc6e00bf3)
138
- F(w13,0xd5a79147)
139
- F(w14,0x06ca6351)
140
- F(w15,0x14292967)
141
-
142
- EXPAND
143
-
144
- F(w0 ,0x27b70a85)
145
- F(w1 ,0x2e1b2138)
146
- F(w2 ,0x4d2c6dfc)
147
- F(w3 ,0x53380d13)
148
- F(w4 ,0x650a7354)
149
- F(w5 ,0x766a0abb)
150
- F(w6 ,0x81c2c92e)
151
- F(w7 ,0x92722c85)
152
- F(w8 ,0xa2bfe8a1)
153
- F(w9 ,0xa81a664b)
154
- F(w10,0xc24b8b70)
155
- F(w11,0xc76c51a3)
156
- F(w12,0xd192e819)
157
- F(w13,0xd6990624)
158
- F(w14,0xf40e3585)
159
- F(w15,0x106aa070)
160
-
161
- EXPAND
162
-
163
- F(w0 ,0x19a4c116)
164
- F(w1 ,0x1e376c08)
165
- F(w2 ,0x2748774c)
166
- F(w3 ,0x34b0bcb5)
167
- F(w4 ,0x391c0cb3)
168
- F(w5 ,0x4ed8aa4a)
169
- F(w6 ,0x5b9cca4f)
170
- F(w7 ,0x682e6ff3)
171
- F(w8 ,0x748f82ee)
172
- F(w9 ,0x78a5636f)
173
- F(w10,0x84c87814)
174
- F(w11,0x8cc70208)
175
- F(w12,0x90befffa)
176
- F(w13,0xa4506ceb)
177
- F(w14,0xbef9a3f7)
178
- F(w15,0xc67178f2)
179
-
180
- a += state[0];
181
- b += state[1];
182
- c += state[2];
183
- d += state[3];
184
- e += state[4];
185
- f += state[5];
186
- g += state[6];
187
- h += state[7];
188
-
189
- state[0] = a;
190
- state[1] = b;
191
- state[2] = c;
192
- state[3] = d;
193
- state[4] = e;
194
- state[5] = f;
195
- state[6] = g;
196
- state[7] = h;
197
-
198
- in += 64;
199
- inlen -= 64;
200
- }
201
-
202
- store_bigendian(statebytes + 0,state[0]);
203
- store_bigendian(statebytes + 4,state[1]);
204
- store_bigendian(statebytes + 8,state[2]);
205
- store_bigendian(statebytes + 12,state[3]);
206
- store_bigendian(statebytes + 16,state[4]);
207
- store_bigendian(statebytes + 20,state[5]);
208
- store_bigendian(statebytes + 24,state[6]);
209
- store_bigendian(statebytes + 28,state[7]);
210
-
211
- return 0;
212
- }