react-native-quick-crypto 1.0.0-beta.16 → 1.0.0-beta.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (605) hide show
  1. package/android/CMakeLists.txt +2 -0
  2. package/cpp/cipher/ChaCha20Cipher.cpp +97 -0
  3. package/cpp/cipher/ChaCha20Cipher.hpp +25 -0
  4. package/cpp/cipher/ChaCha20Poly1305Cipher.cpp +170 -0
  5. package/cpp/cipher/ChaCha20Poly1305Cipher.hpp +30 -0
  6. package/cpp/cipher/HybridCipherFactory.hpp +19 -1
  7. package/deps/fastpbkdf2/fastpbkdf2.c +5 -1
  8. package/lib/commonjs/cipher.js.map +1 -1
  9. package/lib/module/cipher.js.map +1 -1
  10. package/lib/tsconfig.tsbuildinfo +1 -1
  11. package/lib/typescript/cipher.d.ts +3 -1
  12. package/lib/typescript/cipher.d.ts.map +1 -1
  13. package/package.json +3 -3
  14. package/src/cipher.ts +7 -0
  15. package/ios/libsodium-stable/.github/workflows/autocloser.yml +0 -12
  16. package/ios/libsodium-stable/.github/workflows/ci.yml +0 -180
  17. package/ios/libsodium-stable/.github/workflows/cifuzz.yml +0 -32
  18. package/ios/libsodium-stable/.github/workflows/codeql-analysis.yml +0 -48
  19. package/ios/libsodium-stable/.github/workflows/dotnet-core.yml +0 -388
  20. package/ios/libsodium-stable/AUTHORS +0 -144
  21. package/ios/libsodium-stable/CITATION.cff +0 -18
  22. package/ios/libsodium-stable/ChangeLog +0 -658
  23. package/ios/libsodium-stable/LICENSE +0 -18
  24. package/ios/libsodium-stable/Makefile.am +0 -23
  25. package/ios/libsodium-stable/README.markdown +0 -76
  26. package/ios/libsodium-stable/THANKS +0 -92
  27. package/ios/libsodium-stable/appveyor.yml +0 -24
  28. package/ios/libsodium-stable/autogen.sh +0 -117
  29. package/ios/libsodium-stable/azure-pipelines.yml +0 -122
  30. package/ios/libsodium-stable/build.zig +0 -281
  31. package/ios/libsodium-stable/builds/Makefile.am +0 -81
  32. package/ios/libsodium-stable/builds/msvc/build/buildall.bat +0 -18
  33. package/ios/libsodium-stable/builds/msvc/build/buildbase.bat +0 -132
  34. package/ios/libsodium-stable/builds/msvc/properties/ARM64.props +0 -23
  35. package/ios/libsodium-stable/builds/msvc/properties/Common.props +0 -21
  36. package/ios/libsodium-stable/builds/msvc/properties/DLL.props +0 -16
  37. package/ios/libsodium-stable/builds/msvc/properties/Debug.props +0 -29
  38. package/ios/libsodium-stable/builds/msvc/properties/DebugDEXE.props +0 -21
  39. package/ios/libsodium-stable/builds/msvc/properties/DebugDLL.props +0 -20
  40. package/ios/libsodium-stable/builds/msvc/properties/DebugLEXE.props +0 -20
  41. package/ios/libsodium-stable/builds/msvc/properties/DebugLIB.props +0 -21
  42. package/ios/libsodium-stable/builds/msvc/properties/DebugLTCG.props +0 -20
  43. package/ios/libsodium-stable/builds/msvc/properties/DebugSEXE.props +0 -21
  44. package/ios/libsodium-stable/builds/msvc/properties/EXE.props +0 -17
  45. package/ios/libsodium-stable/builds/msvc/properties/LIB.props +0 -16
  46. package/ios/libsodium-stable/builds/msvc/properties/LTCG.props +0 -13
  47. package/ios/libsodium-stable/builds/msvc/properties/Link.props +0 -21
  48. package/ios/libsodium-stable/builds/msvc/properties/Messages.props +0 -15
  49. package/ios/libsodium-stable/builds/msvc/properties/Output.props +0 -30
  50. package/ios/libsodium-stable/builds/msvc/properties/Release.props +0 -41
  51. package/ios/libsodium-stable/builds/msvc/properties/ReleaseDEXE.props +0 -20
  52. package/ios/libsodium-stable/builds/msvc/properties/ReleaseDLL.props +0 -19
  53. package/ios/libsodium-stable/builds/msvc/properties/ReleaseLEXE.props +0 -20
  54. package/ios/libsodium-stable/builds/msvc/properties/ReleaseLIB.props +0 -19
  55. package/ios/libsodium-stable/builds/msvc/properties/ReleaseLTCG.props +0 -19
  56. package/ios/libsodium-stable/builds/msvc/properties/ReleaseSEXE.props +0 -20
  57. package/ios/libsodium-stable/builds/msvc/properties/Win32.props +0 -23
  58. package/ios/libsodium-stable/builds/msvc/properties/x64.props +0 -26
  59. package/ios/libsodium-stable/builds/msvc/resource.h +0 -14
  60. package/ios/libsodium-stable/builds/msvc/resource.rc +0 -65
  61. package/ios/libsodium-stable/builds/msvc/version.h +0 -33
  62. package/ios/libsodium-stable/builds/msvc/vs2010/libsodium/libsodium.props +0 -48
  63. package/ios/libsodium-stable/builds/msvc/vs2010/libsodium/libsodium.vcxproj +0 -346
  64. package/ios/libsodium-stable/builds/msvc/vs2010/libsodium/libsodium.vcxproj.filters +0 -1088
  65. package/ios/libsodium-stable/builds/msvc/vs2010/libsodium/libsodium.xml +0 -15
  66. package/ios/libsodium-stable/builds/msvc/vs2010/libsodium.import.props +0 -52
  67. package/ios/libsodium-stable/builds/msvc/vs2010/libsodium.import.xml +0 -17
  68. package/ios/libsodium-stable/builds/msvc/vs2010/libsodium.sln +0 -50
  69. package/ios/libsodium-stable/builds/msvc/vs2012/libsodium/libsodium.props +0 -48
  70. package/ios/libsodium-stable/builds/msvc/vs2012/libsodium/libsodium.vcxproj +0 -346
  71. package/ios/libsodium-stable/builds/msvc/vs2012/libsodium/libsodium.vcxproj.filters +0 -1088
  72. package/ios/libsodium-stable/builds/msvc/vs2012/libsodium/libsodium.xml +0 -15
  73. package/ios/libsodium-stable/builds/msvc/vs2012/libsodium.import.props +0 -52
  74. package/ios/libsodium-stable/builds/msvc/vs2012/libsodium.import.xml +0 -17
  75. package/ios/libsodium-stable/builds/msvc/vs2012/libsodium.sln +0 -50
  76. package/ios/libsodium-stable/builds/msvc/vs2013/libsodium/libsodium.props +0 -48
  77. package/ios/libsodium-stable/builds/msvc/vs2013/libsodium/libsodium.vcxproj +0 -346
  78. package/ios/libsodium-stable/builds/msvc/vs2013/libsodium/libsodium.vcxproj.filters +0 -1088
  79. package/ios/libsodium-stable/builds/msvc/vs2013/libsodium/libsodium.xml +0 -15
  80. package/ios/libsodium-stable/builds/msvc/vs2013/libsodium.import.props +0 -52
  81. package/ios/libsodium-stable/builds/msvc/vs2013/libsodium.import.xml +0 -17
  82. package/ios/libsodium-stable/builds/msvc/vs2013/libsodium.sln +0 -52
  83. package/ios/libsodium-stable/builds/msvc/vs2015/libsodium/libsodium.props +0 -48
  84. package/ios/libsodium-stable/builds/msvc/vs2015/libsodium/libsodium.vcxproj +0 -346
  85. package/ios/libsodium-stable/builds/msvc/vs2015/libsodium/libsodium.vcxproj.filters +0 -1088
  86. package/ios/libsodium-stable/builds/msvc/vs2015/libsodium/libsodium.xml +0 -15
  87. package/ios/libsodium-stable/builds/msvc/vs2015/libsodium.import.props +0 -52
  88. package/ios/libsodium-stable/builds/msvc/vs2015/libsodium.import.xml +0 -17
  89. package/ios/libsodium-stable/builds/msvc/vs2015/libsodium.sln +0 -52
  90. package/ios/libsodium-stable/builds/msvc/vs2017/libsodium/libsodium.props +0 -48
  91. package/ios/libsodium-stable/builds/msvc/vs2017/libsodium/libsodium.vcxproj +0 -346
  92. package/ios/libsodium-stable/builds/msvc/vs2017/libsodium/libsodium.vcxproj.filters +0 -1088
  93. package/ios/libsodium-stable/builds/msvc/vs2017/libsodium/libsodium.xml +0 -15
  94. package/ios/libsodium-stable/builds/msvc/vs2017/libsodium.import.props +0 -52
  95. package/ios/libsodium-stable/builds/msvc/vs2017/libsodium.import.xml +0 -17
  96. package/ios/libsodium-stable/builds/msvc/vs2017/libsodium.sln +0 -52
  97. package/ios/libsodium-stable/builds/msvc/vs2019/libsodium/libsodium.props +0 -48
  98. package/ios/libsodium-stable/builds/msvc/vs2019/libsodium/libsodium.vcxproj +0 -370
  99. package/ios/libsodium-stable/builds/msvc/vs2019/libsodium/libsodium.vcxproj.filters +0 -1088
  100. package/ios/libsodium-stable/builds/msvc/vs2019/libsodium/libsodium.xml +0 -15
  101. package/ios/libsodium-stable/builds/msvc/vs2019/libsodium.import.props +0 -52
  102. package/ios/libsodium-stable/builds/msvc/vs2019/libsodium.import.xml +0 -17
  103. package/ios/libsodium-stable/builds/msvc/vs2019/libsodium.sln +0 -52
  104. package/ios/libsodium-stable/builds/msvc/vs2022/libsodium/libsodium.props +0 -48
  105. package/ios/libsodium-stable/builds/msvc/vs2022/libsodium/libsodium.vcxproj +0 -370
  106. package/ios/libsodium-stable/builds/msvc/vs2022/libsodium/libsodium.vcxproj.filters +0 -1088
  107. package/ios/libsodium-stable/builds/msvc/vs2022/libsodium/libsodium.xml +0 -15
  108. package/ios/libsodium-stable/builds/msvc/vs2022/libsodium.import.props +0 -52
  109. package/ios/libsodium-stable/builds/msvc/vs2022/libsodium.import.xml +0 -17
  110. package/ios/libsodium-stable/builds/msvc/vs2022/libsodium.sln +0 -70
  111. package/ios/libsodium-stable/ci/appveyor/libsodium.sln +0 -40
  112. package/ios/libsodium-stable/ci/appveyor/libsodium.vcxproj +0 -594
  113. package/ios/libsodium-stable/ci/appveyor/libsodium.vcxproj.filters +0 -813
  114. package/ios/libsodium-stable/ci/appveyor/msvc-scripts/process.bat +0 -5
  115. package/ios/libsodium-stable/ci/appveyor/msvc-scripts/rep.vbs +0 -12
  116. package/ios/libsodium-stable/ci/appveyor/msvc-scripts/sodium.props +0 -29
  117. package/ios/libsodium-stable/configure.ac +0 -1004
  118. package/ios/libsodium-stable/contrib/Findsodium.cmake +0 -297
  119. package/ios/libsodium-stable/contrib/Makefile.am +0 -3
  120. package/ios/libsodium-stable/dist-build/Makefile.am +0 -14
  121. package/ios/libsodium-stable/dist-build/android-aar.sh +0 -194
  122. package/ios/libsodium-stable/dist-build/android-armv7-a.sh +0 -5
  123. package/ios/libsodium-stable/dist-build/android-armv8-a.sh +0 -5
  124. package/ios/libsodium-stable/dist-build/android-build.sh +0 -95
  125. package/ios/libsodium-stable/dist-build/android-x86.sh +0 -5
  126. package/ios/libsodium-stable/dist-build/android-x86_64.sh +0 -5
  127. package/ios/libsodium-stable/dist-build/apple-xcframework.sh +0 -628
  128. package/ios/libsodium-stable/dist-build/emscripten-symbols.def +0 -651
  129. package/ios/libsodium-stable/dist-build/emscripten.sh +0 -206
  130. package/ios/libsodium-stable/dist-build/generate-emscripten-symbols.sh +0 -59
  131. package/ios/libsodium-stable/dist-build/macos.sh +0 -26
  132. package/ios/libsodium-stable/dist-build/msys2-win32.sh +0 -18
  133. package/ios/libsodium-stable/dist-build/msys2-win64.sh +0 -18
  134. package/ios/libsodium-stable/dist-build/wasm32-wasi.sh +0 -45
  135. package/ios/libsodium-stable/lgtm.yml +0 -6
  136. package/ios/libsodium-stable/libsodium-uninstalled.pc.in +0 -7
  137. package/ios/libsodium-stable/libsodium.pc.in +0 -12
  138. package/ios/libsodium-stable/logo.png +0 -0
  139. package/ios/libsodium-stable/m4/ax_add_fortify_source.m4 +0 -121
  140. package/ios/libsodium-stable/m4/ax_check_catchable_abrt.m4 +0 -57
  141. package/ios/libsodium-stable/m4/ax_check_catchable_segv.m4 +0 -47
  142. package/ios/libsodium-stable/m4/ax_check_compile_flag.m4 +0 -55
  143. package/ios/libsodium-stable/m4/ax_check_define.m4 +0 -73
  144. package/ios/libsodium-stable/m4/ax_check_gnu_make.m4 +0 -95
  145. package/ios/libsodium-stable/m4/ax_check_link_flag.m4 +0 -75
  146. package/ios/libsodium-stable/m4/ax_pthread.m4 +0 -522
  147. package/ios/libsodium-stable/m4/ax_tls.m4 +0 -71
  148. package/ios/libsodium-stable/m4/ax_valgrind_check.m4 +0 -241
  149. package/ios/libsodium-stable/m4/ld-output-def.m4 +0 -29
  150. package/ios/libsodium-stable/packaging/dotnet-core/libsodium.pkgproj +0 -49
  151. package/ios/libsodium-stable/packaging/dotnet-core/test.cs +0 -43
  152. package/ios/libsodium-stable/packaging/nuget/package.bat +0 -13
  153. package/ios/libsodium-stable/packaging/nuget/package.config +0 -4
  154. package/ios/libsodium-stable/packaging/nuget/package.gsl +0 -260
  155. package/ios/libsodium-stable/regen-msvc/libsodium.vcxproj +0 -326
  156. package/ios/libsodium-stable/regen-msvc/libsodium.vcxproj.filters +0 -23
  157. package/ios/libsodium-stable/regen-msvc/libsodium.vcxproj.filters.tpl +0 -35
  158. package/ios/libsodium-stable/regen-msvc/libsodium.vcxproj.tpl +0 -37
  159. package/ios/libsodium-stable/regen-msvc/regen-msvc.py +0 -240
  160. package/ios/libsodium-stable/regen-msvc/tl_libsodium.vcxproj.filters.tpl +0 -23
  161. package/ios/libsodium-stable/regen-msvc/tl_libsodium.vcxproj.tpl +0 -332
  162. package/ios/libsodium-stable/src/Makefile.am +0 -3
  163. package/ios/libsodium-stable/src/libsodium/Makefile.am +0 -314
  164. package/ios/libsodium-stable/src/libsodium/crypto_aead/aegis128l/aead_aegis128l.c +0 -159
  165. package/ios/libsodium-stable/src/libsodium/crypto_aead/aegis128l/aegis128l_aesni.c +0 -70
  166. package/ios/libsodium-stable/src/libsodium/crypto_aead/aegis128l/aegis128l_aesni.h +0 -8
  167. package/ios/libsodium-stable/src/libsodium/crypto_aead/aegis128l/aegis128l_armcrypto.c +0 -72
  168. package/ios/libsodium-stable/src/libsodium/crypto_aead/aegis128l/aegis128l_armcrypto.h +0 -8
  169. package/ios/libsodium-stable/src/libsodium/crypto_aead/aegis128l/aegis128l_common.h +0 -248
  170. package/ios/libsodium-stable/src/libsodium/crypto_aead/aegis128l/aegis128l_soft.c +0 -59
  171. package/ios/libsodium-stable/src/libsodium/crypto_aead/aegis128l/aegis128l_soft.h +0 -8
  172. package/ios/libsodium-stable/src/libsodium/crypto_aead/aegis128l/implementations.h +0 -17
  173. package/ios/libsodium-stable/src/libsodium/crypto_aead/aegis256/aead_aegis256.c +0 -158
  174. package/ios/libsodium-stable/src/libsodium/crypto_aead/aegis256/aegis256_aesni.c +0 -65
  175. package/ios/libsodium-stable/src/libsodium/crypto_aead/aegis256/aegis256_aesni.h +0 -8
  176. package/ios/libsodium-stable/src/libsodium/crypto_aead/aegis256/aegis256_armcrypto.c +0 -70
  177. package/ios/libsodium-stable/src/libsodium/crypto_aead/aegis256/aegis256_armcrypto.h +0 -8
  178. package/ios/libsodium-stable/src/libsodium/crypto_aead/aegis256/aegis256_common.h +0 -231
  179. package/ios/libsodium-stable/src/libsodium/crypto_aead/aegis256/aegis256_soft.c +0 -54
  180. package/ios/libsodium-stable/src/libsodium/crypto_aead/aegis256/aegis256_soft.h +0 -8
  181. package/ios/libsodium-stable/src/libsodium/crypto_aead/aegis256/implementations.h +0 -17
  182. package/ios/libsodium-stable/src/libsodium/crypto_aead/aes256gcm/aead_aes256gcm.c +0 -157
  183. package/ios/libsodium-stable/src/libsodium/crypto_aead/aes256gcm/aesni/aead_aes256gcm_aesni.c +0 -1015
  184. package/ios/libsodium-stable/src/libsodium/crypto_aead/aes256gcm/armcrypto/aead_aes256gcm_armcrypto.c +0 -1032
  185. package/ios/libsodium-stable/src/libsodium/crypto_aead/chacha20poly1305/aead_chacha20poly1305.c +0 -400
  186. package/ios/libsodium-stable/src/libsodium/crypto_aead/xchacha20poly1305/aead_xchacha20poly1305.c +0 -262
  187. package/ios/libsodium-stable/src/libsodium/crypto_auth/crypto_auth.c +0 -41
  188. package/ios/libsodium-stable/src/libsodium/crypto_auth/hmacsha256/auth_hmacsha256.c +0 -118
  189. package/ios/libsodium-stable/src/libsodium/crypto_auth/hmacsha512/auth_hmacsha512.c +0 -118
  190. package/ios/libsodium-stable/src/libsodium/crypto_auth/hmacsha512256/auth_hmacsha512256.c +0 -93
  191. package/ios/libsodium-stable/src/libsodium/crypto_box/crypto_box.c +0 -114
  192. package/ios/libsodium-stable/src/libsodium/crypto_box/crypto_box_easy.c +0 -115
  193. package/ios/libsodium-stable/src/libsodium/crypto_box/crypto_box_seal.c +0 -68
  194. package/ios/libsodium-stable/src/libsodium/crypto_box/curve25519xchacha20poly1305/box_curve25519xchacha20poly1305.c +0 -204
  195. package/ios/libsodium-stable/src/libsodium/crypto_box/curve25519xchacha20poly1305/box_seal_curve25519xchacha20poly1305.c +0 -79
  196. package/ios/libsodium-stable/src/libsodium/crypto_box/curve25519xsalsa20poly1305/box_curve25519xsalsa20poly1305.c +0 -156
  197. package/ios/libsodium-stable/src/libsodium/crypto_core/ed25519/core_ed25519.c +0 -225
  198. package/ios/libsodium-stable/src/libsodium/crypto_core/ed25519/core_ristretto255.c +0 -156
  199. package/ios/libsodium-stable/src/libsodium/crypto_core/ed25519/ref10/ed25519_ref10.c +0 -2873
  200. package/ios/libsodium-stable/src/libsodium/crypto_core/ed25519/ref10/fe_25_5/base.h +0 -1344
  201. package/ios/libsodium-stable/src/libsodium/crypto_core/ed25519/ref10/fe_25_5/base2.h +0 -40
  202. package/ios/libsodium-stable/src/libsodium/crypto_core/ed25519/ref10/fe_25_5/constants.h +0 -40
  203. package/ios/libsodium-stable/src/libsodium/crypto_core/ed25519/ref10/fe_25_5/fe.h +0 -220
  204. package/ios/libsodium-stable/src/libsodium/crypto_core/ed25519/ref10/fe_51/base.h +0 -1344
  205. package/ios/libsodium-stable/src/libsodium/crypto_core/ed25519/ref10/fe_51/base2.h +0 -40
  206. package/ios/libsodium-stable/src/libsodium/crypto_core/ed25519/ref10/fe_51/constants.h +0 -41
  207. package/ios/libsodium-stable/src/libsodium/crypto_core/ed25519/ref10/fe_51/fe.h +0 -116
  208. package/ios/libsodium-stable/src/libsodium/crypto_core/hchacha20/core_hchacha20.c +0 -93
  209. package/ios/libsodium-stable/src/libsodium/crypto_core/hsalsa20/core_hsalsa20.c +0 -21
  210. package/ios/libsodium-stable/src/libsodium/crypto_core/hsalsa20/ref2/core_hsalsa20_ref2.c +0 -95
  211. package/ios/libsodium-stable/src/libsodium/crypto_core/salsa/ref/core_salsa_ref.c +0 -195
  212. package/ios/libsodium-stable/src/libsodium/crypto_core/softaes/softaes.c +0 -340
  213. package/ios/libsodium-stable/src/libsodium/crypto_generichash/blake2b/generichash_blake2.c +0 -55
  214. package/ios/libsodium-stable/src/libsodium/crypto_generichash/blake2b/ref/blake2.h +0 -106
  215. package/ios/libsodium-stable/src/libsodium/crypto_generichash/blake2b/ref/blake2b-compress-avx2.c +0 -52
  216. package/ios/libsodium-stable/src/libsodium/crypto_generichash/blake2b/ref/blake2b-compress-avx2.h +0 -142
  217. package/ios/libsodium-stable/src/libsodium/crypto_generichash/blake2b/ref/blake2b-compress-ref.c +0 -93
  218. package/ios/libsodium-stable/src/libsodium/crypto_generichash/blake2b/ref/blake2b-compress-sse41.c +0 -91
  219. package/ios/libsodium-stable/src/libsodium/crypto_generichash/blake2b/ref/blake2b-compress-sse41.h +0 -106
  220. package/ios/libsodium-stable/src/libsodium/crypto_generichash/blake2b/ref/blake2b-compress-ssse3.c +0 -95
  221. package/ios/libsodium-stable/src/libsodium/crypto_generichash/blake2b/ref/blake2b-compress-ssse3.h +0 -106
  222. package/ios/libsodium-stable/src/libsodium/crypto_generichash/blake2b/ref/blake2b-load-avx2.h +0 -340
  223. package/ios/libsodium-stable/src/libsodium/crypto_generichash/blake2b/ref/blake2b-load-sse2.h +0 -164
  224. package/ios/libsodium-stable/src/libsodium/crypto_generichash/blake2b/ref/blake2b-load-sse41.h +0 -307
  225. package/ios/libsodium-stable/src/libsodium/crypto_generichash/blake2b/ref/blake2b-ref.c +0 -438
  226. package/ios/libsodium-stable/src/libsodium/crypto_generichash/blake2b/ref/generichash_blake2b.c +0 -116
  227. package/ios/libsodium-stable/src/libsodium/crypto_generichash/crypto_generichash.c +0 -91
  228. package/ios/libsodium-stable/src/libsodium/crypto_hash/crypto_hash.c +0 -20
  229. package/ios/libsodium-stable/src/libsodium/crypto_hash/sha256/cp/hash_sha256_cp.c +0 -256
  230. package/ios/libsodium-stable/src/libsodium/crypto_hash/sha256/hash_sha256.c +0 -13
  231. package/ios/libsodium-stable/src/libsodium/crypto_hash/sha512/cp/hash_sha512_cp.c +0 -284
  232. package/ios/libsodium-stable/src/libsodium/crypto_hash/sha512/hash_sha512.c +0 -13
  233. package/ios/libsodium-stable/src/libsodium/crypto_kdf/blake2b/kdf_blake2b.c +0 -52
  234. package/ios/libsodium-stable/src/libsodium/crypto_kdf/crypto_kdf.c +0 -49
  235. package/ios/libsodium-stable/src/libsodium/crypto_kdf/hkdf/kdf_hkdf_sha256.c +0 -123
  236. package/ios/libsodium-stable/src/libsodium/crypto_kdf/hkdf/kdf_hkdf_sha512.c +0 -123
  237. package/ios/libsodium-stable/src/libsodium/crypto_kx/crypto_kx.c +0 -143
  238. package/ios/libsodium-stable/src/libsodium/crypto_onetimeauth/crypto_onetimeauth.c +0 -71
  239. package/ios/libsodium-stable/src/libsodium/crypto_onetimeauth/poly1305/donna/poly1305_donna.c +0 -124
  240. package/ios/libsodium-stable/src/libsodium/crypto_onetimeauth/poly1305/donna/poly1305_donna.h +0 -12
  241. package/ios/libsodium-stable/src/libsodium/crypto_onetimeauth/poly1305/donna/poly1305_donna32.h +0 -235
  242. package/ios/libsodium-stable/src/libsodium/crypto_onetimeauth/poly1305/donna/poly1305_donna64.h +0 -221
  243. package/ios/libsodium-stable/src/libsodium/crypto_onetimeauth/poly1305/onetimeauth_poly1305.c +0 -90
  244. package/ios/libsodium-stable/src/libsodium/crypto_onetimeauth/poly1305/onetimeauth_poly1305.h +0 -21
  245. package/ios/libsodium-stable/src/libsodium/crypto_onetimeauth/poly1305/sse2/poly1305_sse2.c +0 -957
  246. package/ios/libsodium-stable/src/libsodium/crypto_onetimeauth/poly1305/sse2/poly1305_sse2.h +0 -12
  247. package/ios/libsodium-stable/src/libsodium/crypto_pwhash/argon2/argon2-core.c +0 -556
  248. package/ios/libsodium-stable/src/libsodium/crypto_pwhash/argon2/argon2-core.h +0 -271
  249. package/ios/libsodium-stable/src/libsodium/crypto_pwhash/argon2/argon2-encoding.c +0 -306
  250. package/ios/libsodium-stable/src/libsodium/crypto_pwhash/argon2/argon2-encoding.h +0 -34
  251. package/ios/libsodium-stable/src/libsodium/crypto_pwhash/argon2/argon2-fill-block-avx2.c +0 -243
  252. package/ios/libsodium-stable/src/libsodium/crypto_pwhash/argon2/argon2-fill-block-avx512f.c +0 -251
  253. package/ios/libsodium-stable/src/libsodium/crypto_pwhash/argon2/argon2-fill-block-ref.c +0 -234
  254. package/ios/libsodium-stable/src/libsodium/crypto_pwhash/argon2/argon2-fill-block-ssse3.c +0 -244
  255. package/ios/libsodium-stable/src/libsodium/crypto_pwhash/argon2/argon2.c +0 -283
  256. package/ios/libsodium-stable/src/libsodium/crypto_pwhash/argon2/argon2.h +0 -305
  257. package/ios/libsodium-stable/src/libsodium/crypto_pwhash/argon2/blake2b-long.c +0 -79
  258. package/ios/libsodium-stable/src/libsodium/crypto_pwhash/argon2/blake2b-long.h +0 -8
  259. package/ios/libsodium-stable/src/libsodium/crypto_pwhash/argon2/blamka-round-avx2.h +0 -150
  260. package/ios/libsodium-stable/src/libsodium/crypto_pwhash/argon2/blamka-round-avx512f.h +0 -145
  261. package/ios/libsodium-stable/src/libsodium/crypto_pwhash/argon2/blamka-round-ref.h +0 -40
  262. package/ios/libsodium-stable/src/libsodium/crypto_pwhash/argon2/blamka-round-ssse3.h +0 -124
  263. package/ios/libsodium-stable/src/libsodium/crypto_pwhash/argon2/pwhash_argon2i.c +0 -294
  264. package/ios/libsodium-stable/src/libsodium/crypto_pwhash/argon2/pwhash_argon2id.c +0 -238
  265. package/ios/libsodium-stable/src/libsodium/crypto_pwhash/crypto_pwhash.c +0 -212
  266. package/ios/libsodium-stable/src/libsodium/crypto_pwhash/scryptsalsa208sha256/crypto_scrypt-common.c +0 -268
  267. package/ios/libsodium-stable/src/libsodium/crypto_pwhash/scryptsalsa208sha256/crypto_scrypt.h +0 -92
  268. package/ios/libsodium-stable/src/libsodium/crypto_pwhash/scryptsalsa208sha256/nosse/pwhash_scryptsalsa208sha256_nosse.c +0 -318
  269. package/ios/libsodium-stable/src/libsodium/crypto_pwhash/scryptsalsa208sha256/pbkdf2-sha256.c +0 -96
  270. package/ios/libsodium-stable/src/libsodium/crypto_pwhash/scryptsalsa208sha256/pbkdf2-sha256.h +0 -45
  271. package/ios/libsodium-stable/src/libsodium/crypto_pwhash/scryptsalsa208sha256/pwhash_scryptsalsa208sha256.c +0 -301
  272. package/ios/libsodium-stable/src/libsodium/crypto_pwhash/scryptsalsa208sha256/scrypt_platform.c +0 -112
  273. package/ios/libsodium-stable/src/libsodium/crypto_pwhash/scryptsalsa208sha256/sse/pwhash_scryptsalsa208sha256_sse.c +0 -406
  274. package/ios/libsodium-stable/src/libsodium/crypto_scalarmult/crypto_scalarmult.c +0 -33
  275. package/ios/libsodium-stable/src/libsodium/crypto_scalarmult/curve25519/ref10/x25519_ref10.c +0 -182
  276. package/ios/libsodium-stable/src/libsodium/crypto_scalarmult/curve25519/ref10/x25519_ref10.h +0 -10
  277. package/ios/libsodium-stable/src/libsodium/crypto_scalarmult/curve25519/sandy2x/consts.S +0 -25
  278. package/ios/libsodium-stable/src/libsodium/crypto_scalarmult/curve25519/sandy2x/consts_namespace.h +0 -20
  279. package/ios/libsodium-stable/src/libsodium/crypto_scalarmult/curve25519/sandy2x/curve25519_sandy2x.c +0 -71
  280. package/ios/libsodium-stable/src/libsodium/crypto_scalarmult/curve25519/sandy2x/curve25519_sandy2x.h +0 -9
  281. package/ios/libsodium-stable/src/libsodium/crypto_scalarmult/curve25519/sandy2x/fe.h +0 -26
  282. package/ios/libsodium-stable/src/libsodium/crypto_scalarmult/curve25519/sandy2x/fe51.h +0 -35
  283. package/ios/libsodium-stable/src/libsodium/crypto_scalarmult/curve25519/sandy2x/fe51_invert.c +0 -58
  284. package/ios/libsodium-stable/src/libsodium/crypto_scalarmult/curve25519/sandy2x/fe51_mul.S +0 -200
  285. package/ios/libsodium-stable/src/libsodium/crypto_scalarmult/curve25519/sandy2x/fe51_namespace.h +0 -16
  286. package/ios/libsodium-stable/src/libsodium/crypto_scalarmult/curve25519/sandy2x/fe51_nsquare.S +0 -174
  287. package/ios/libsodium-stable/src/libsodium/crypto_scalarmult/curve25519/sandy2x/fe51_pack.S +0 -228
  288. package/ios/libsodium-stable/src/libsodium/crypto_scalarmult/curve25519/sandy2x/fe_frombytes_sandy2x.c +0 -78
  289. package/ios/libsodium-stable/src/libsodium/crypto_scalarmult/curve25519/sandy2x/ladder.S +0 -1442
  290. package/ios/libsodium-stable/src/libsodium/crypto_scalarmult/curve25519/sandy2x/ladder.h +0 -18
  291. package/ios/libsodium-stable/src/libsodium/crypto_scalarmult/curve25519/sandy2x/ladder_namespace.h +0 -8
  292. package/ios/libsodium-stable/src/libsodium/crypto_scalarmult/curve25519/sandy2x/sandy2x.S +0 -16
  293. package/ios/libsodium-stable/src/libsodium/crypto_scalarmult/curve25519/scalarmult_curve25519.c +0 -60
  294. package/ios/libsodium-stable/src/libsodium/crypto_scalarmult/curve25519/scalarmult_curve25519.h +0 -11
  295. package/ios/libsodium-stable/src/libsodium/crypto_scalarmult/ed25519/ref10/scalarmult_ed25519_ref10.c +0 -121
  296. package/ios/libsodium-stable/src/libsodium/crypto_scalarmult/ristretto255/ref10/scalarmult_ristretto255_ref10.c +0 -63
  297. package/ios/libsodium-stable/src/libsodium/crypto_secretbox/crypto_secretbox.c +0 -67
  298. package/ios/libsodium-stable/src/libsodium/crypto_secretbox/crypto_secretbox_easy.c +0 -145
  299. package/ios/libsodium-stable/src/libsodium/crypto_secretbox/xchacha20poly1305/secretbox_xchacha20poly1305.c +0 -177
  300. package/ios/libsodium-stable/src/libsodium/crypto_secretbox/xsalsa20poly1305/secretbox_xsalsa20poly1305.c +0 -89
  301. package/ios/libsodium-stable/src/libsodium/crypto_secretstream/xchacha20poly1305/secretstream_xchacha20poly1305.c +0 -313
  302. package/ios/libsodium-stable/src/libsodium/crypto_shorthash/crypto_shorthash.c +0 -34
  303. package/ios/libsodium-stable/src/libsodium/crypto_shorthash/siphash24/ref/shorthash_siphash24_ref.c +0 -71
  304. package/ios/libsodium-stable/src/libsodium/crypto_shorthash/siphash24/ref/shorthash_siphash_ref.h +0 -24
  305. package/ios/libsodium-stable/src/libsodium/crypto_shorthash/siphash24/ref/shorthash_siphashx24_ref.c +0 -77
  306. package/ios/libsodium-stable/src/libsodium/crypto_shorthash/siphash24/shorthash_siphash24.c +0 -11
  307. package/ios/libsodium-stable/src/libsodium/crypto_shorthash/siphash24/shorthash_siphashx24.c +0 -11
  308. package/ios/libsodium-stable/src/libsodium/crypto_sign/crypto_sign.c +0 -115
  309. package/ios/libsodium-stable/src/libsodium/crypto_sign/ed25519/ref10/keypair.c +0 -84
  310. package/ios/libsodium-stable/src/libsodium/crypto_sign/ed25519/ref10/obsolete.c +0 -118
  311. package/ios/libsodium-stable/src/libsodium/crypto_sign/ed25519/ref10/open.c +0 -98
  312. package/ios/libsodium-stable/src/libsodium/crypto_sign/ed25519/ref10/sign.c +0 -128
  313. package/ios/libsodium-stable/src/libsodium/crypto_sign/ed25519/ref10/sign_ed25519_ref10.h +0 -18
  314. package/ios/libsodium-stable/src/libsodium/crypto_sign/ed25519/sign_ed25519.c +0 -97
  315. package/ios/libsodium-stable/src/libsodium/crypto_stream/chacha20/dolbeau/chacha20_dolbeau-avx2.c +0 -180
  316. package/ios/libsodium-stable/src/libsodium/crypto_stream/chacha20/dolbeau/chacha20_dolbeau-avx2.h +0 -8
  317. package/ios/libsodium-stable/src/libsodium/crypto_stream/chacha20/dolbeau/chacha20_dolbeau-ssse3.c +0 -176
  318. package/ios/libsodium-stable/src/libsodium/crypto_stream/chacha20/dolbeau/chacha20_dolbeau-ssse3.h +0 -8
  319. package/ios/libsodium-stable/src/libsodium/crypto_stream/chacha20/dolbeau/u0.h +0 -86
  320. package/ios/libsodium-stable/src/libsodium/crypto_stream/chacha20/dolbeau/u1.h +0 -98
  321. package/ios/libsodium-stable/src/libsodium/crypto_stream/chacha20/dolbeau/u4.h +0 -177
  322. package/ios/libsodium-stable/src/libsodium/crypto_stream/chacha20/dolbeau/u8.h +0 -326
  323. package/ios/libsodium-stable/src/libsodium/crypto_stream/chacha20/ref/chacha20_ref.c +0 -312
  324. package/ios/libsodium-stable/src/libsodium/crypto_stream/chacha20/ref/chacha20_ref.h +0 -8
  325. package/ios/libsodium-stable/src/libsodium/crypto_stream/chacha20/stream_chacha20.c +0 -184
  326. package/ios/libsodium-stable/src/libsodium/crypto_stream/chacha20/stream_chacha20.h +0 -22
  327. package/ios/libsodium-stable/src/libsodium/crypto_stream/crypto_stream.c +0 -49
  328. package/ios/libsodium-stable/src/libsodium/crypto_stream/salsa20/ref/salsa20_ref.c +0 -120
  329. package/ios/libsodium-stable/src/libsodium/crypto_stream/salsa20/ref/salsa20_ref.h +0 -8
  330. package/ios/libsodium-stable/src/libsodium/crypto_stream/salsa20/stream_salsa20.c +0 -100
  331. package/ios/libsodium-stable/src/libsodium/crypto_stream/salsa20/stream_salsa20.h +0 -16
  332. package/ios/libsodium-stable/src/libsodium/crypto_stream/salsa20/xmm6/salsa20_xmm6-asm.S +0 -965
  333. package/ios/libsodium-stable/src/libsodium/crypto_stream/salsa20/xmm6/salsa20_xmm6.c +0 -31
  334. package/ios/libsodium-stable/src/libsodium/crypto_stream/salsa20/xmm6/salsa20_xmm6.h +0 -8
  335. package/ios/libsodium-stable/src/libsodium/crypto_stream/salsa20/xmm6int/salsa20_xmm6int-avx2.c +0 -134
  336. package/ios/libsodium-stable/src/libsodium/crypto_stream/salsa20/xmm6int/salsa20_xmm6int-avx2.h +0 -8
  337. package/ios/libsodium-stable/src/libsodium/crypto_stream/salsa20/xmm6int/salsa20_xmm6int-sse2.c +0 -128
  338. package/ios/libsodium-stable/src/libsodium/crypto_stream/salsa20/xmm6int/salsa20_xmm6int-sse2.h +0 -8
  339. package/ios/libsodium-stable/src/libsodium/crypto_stream/salsa20/xmm6int/u0.h +0 -195
  340. package/ios/libsodium-stable/src/libsodium/crypto_stream/salsa20/xmm6int/u1.h +0 -207
  341. package/ios/libsodium-stable/src/libsodium/crypto_stream/salsa20/xmm6int/u4.h +0 -547
  342. package/ios/libsodium-stable/src/libsodium/crypto_stream/salsa20/xmm6int/u8.h +0 -477
  343. package/ios/libsodium-stable/src/libsodium/crypto_stream/salsa2012/ref/stream_salsa2012_ref.c +0 -106
  344. package/ios/libsodium-stable/src/libsodium/crypto_stream/salsa2012/stream_salsa2012.c +0 -26
  345. package/ios/libsodium-stable/src/libsodium/crypto_stream/salsa208/ref/stream_salsa208_ref.c +0 -106
  346. package/ios/libsodium-stable/src/libsodium/crypto_stream/salsa208/stream_salsa208.c +0 -26
  347. package/ios/libsodium-stable/src/libsodium/crypto_stream/xchacha20/stream_xchacha20.c +0 -69
  348. package/ios/libsodium-stable/src/libsodium/crypto_stream/xsalsa20/stream_xsalsa20.c +0 -66
  349. package/ios/libsodium-stable/src/libsodium/crypto_verify/verify.c +0 -103
  350. package/ios/libsodium-stable/src/libsodium/include/Makefile.am +0 -76
  351. package/ios/libsodium-stable/src/libsodium/include/sodium/core.h +0 -28
  352. package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_aead_aegis128l.h +0 -92
  353. package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_aead_aegis256.h +0 -92
  354. package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_aead_aes256gcm.h +0 -179
  355. package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_aead_chacha20poly1305.h +0 -180
  356. package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_aead_xchacha20poly1305.h +0 -100
  357. package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_auth.h +0 -46
  358. package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_auth_hmacsha256.h +0 -70
  359. package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_auth_hmacsha512.h +0 -68
  360. package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_auth_hmacsha512256.h +0 -65
  361. package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_box.h +0 -177
  362. package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_box_curve25519xchacha20poly1305.h +0 -164
  363. package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_box_curve25519xsalsa20poly1305.h +0 -112
  364. package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_core_ed25519.h +0 -100
  365. package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_core_hchacha20.h +0 -36
  366. package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_core_hsalsa20.h +0 -36
  367. package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_core_ristretto255.h +0 -100
  368. package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_core_salsa20.h +0 -36
  369. package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_core_salsa2012.h +0 -36
  370. package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_core_salsa208.h +0 -40
  371. package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_generichash.h +0 -84
  372. package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_generichash_blake2b.h +0 -122
  373. package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_hash.h +0 -40
  374. package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_hash_sha256.h +0 -60
  375. package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_hash_sha512.h +0 -60
  376. package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_kdf.h +0 -53
  377. package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_kdf_blake2b.h +0 -44
  378. package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_kdf_hkdf_sha256.h +0 -74
  379. package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_kdf_hkdf_sha512.h +0 -75
  380. package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_kx.h +0 -66
  381. package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_onetimeauth.h +0 -65
  382. package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_onetimeauth_poly1305.h +0 -72
  383. package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_pwhash.h +0 -147
  384. package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_pwhash_argon2i.h +0 -122
  385. package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_pwhash_argon2id.h +0 -122
  386. package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_pwhash_scryptsalsa208sha256.h +0 -120
  387. package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_scalarmult.h +0 -46
  388. package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_scalarmult_curve25519.h +0 -42
  389. package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_scalarmult_ed25519.h +0 -51
  390. package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_scalarmult_ristretto255.h +0 -43
  391. package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_secretbox.h +0 -93
  392. package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_secretbox_xchacha20poly1305.h +0 -70
  393. package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_secretbox_xsalsa20poly1305.h +0 -69
  394. package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_secretstream_xchacha20poly1305.h +0 -108
  395. package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_shorthash.h +0 -41
  396. package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_shorthash_siphash24.h +0 -50
  397. package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_sign.h +0 -107
  398. package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_sign_ed25519.h +0 -124
  399. package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_sign_edwards25519sha512batch.h +0 -55
  400. package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_stream.h +0 -59
  401. package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_stream_chacha20.h +0 -106
  402. package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_stream_salsa20.h +0 -61
  403. package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_stream_salsa2012.h +0 -53
  404. package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_stream_salsa208.h +0 -56
  405. package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_stream_xchacha20.h +0 -61
  406. package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_stream_xsalsa20.h +0 -61
  407. package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_verify_16.h +0 -23
  408. package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_verify_32.h +0 -23
  409. package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_verify_64.h +0 -23
  410. package/ios/libsodium-stable/src/libsodium/include/sodium/export.h +0 -57
  411. package/ios/libsodium-stable/src/libsodium/include/sodium/private/asm_cet.h +0 -11
  412. package/ios/libsodium-stable/src/libsodium/include/sodium/private/chacha20_ietf_ext.h +0 -16
  413. package/ios/libsodium-stable/src/libsodium/include/sodium/private/common.h +0 -296
  414. package/ios/libsodium-stable/src/libsodium/include/sodium/private/ed25519_ref10.h +0 -142
  415. package/ios/libsodium-stable/src/libsodium/include/sodium/private/ed25519_ref10_fe_25_5.h +0 -1030
  416. package/ios/libsodium-stable/src/libsodium/include/sodium/private/ed25519_ref10_fe_51.h +0 -508
  417. package/ios/libsodium-stable/src/libsodium/include/sodium/private/implementations.h +0 -13
  418. package/ios/libsodium-stable/src/libsodium/include/sodium/private/mutex.h +0 -7
  419. package/ios/libsodium-stable/src/libsodium/include/sodium/private/softaes.h +0 -56
  420. package/ios/libsodium-stable/src/libsodium/include/sodium/private/sse2_64_32.h +0 -50
  421. package/ios/libsodium-stable/src/libsodium/include/sodium/randombytes.h +0 -72
  422. package/ios/libsodium-stable/src/libsodium/include/sodium/randombytes_internal_random.h +0 -22
  423. package/ios/libsodium-stable/src/libsodium/include/sodium/randombytes_sysrandom.h +0 -19
  424. package/ios/libsodium-stable/src/libsodium/include/sodium/runtime.h +0 -55
  425. package/ios/libsodium-stable/src/libsodium/include/sodium/utils.h +0 -179
  426. package/ios/libsodium-stable/src/libsodium/include/sodium/version.h.in +0 -33
  427. package/ios/libsodium-stable/src/libsodium/include/sodium.h +0 -75
  428. package/ios/libsodium-stable/src/libsodium/randombytes/internal/randombytes_internal_random.c +0 -646
  429. package/ios/libsodium-stable/src/libsodium/randombytes/randombytes.c +0 -200
  430. package/ios/libsodium-stable/src/libsodium/randombytes/sysrandom/randombytes_sysrandom.c +0 -396
  431. package/ios/libsodium-stable/src/libsodium/sodium/codecs.c +0 -335
  432. package/ios/libsodium-stable/src/libsodium/sodium/core.c +0 -216
  433. package/ios/libsodium-stable/src/libsodium/sodium/runtime.c +0 -391
  434. package/ios/libsodium-stable/src/libsodium/sodium/utils.c +0 -809
  435. package/ios/libsodium-stable/src/libsodium/sodium/version.c +0 -30
  436. package/ios/libsodium-stable/test/Makefile.am +0 -5
  437. package/ios/libsodium-stable/test/constcheck.sh +0 -22
  438. package/ios/libsodium-stable/test/default/Makefile.am +0 -525
  439. package/ios/libsodium-stable/test/default/aead_aegis128l.c +0 -642
  440. package/ios/libsodium-stable/test/default/aead_aegis128l.exp +0 -1
  441. package/ios/libsodium-stable/test/default/aead_aegis256.c +0 -723
  442. package/ios/libsodium-stable/test/default/aead_aegis256.exp +0 -1
  443. package/ios/libsodium-stable/test/default/aead_aes256gcm.c +0 -3328
  444. package/ios/libsodium-stable/test/default/aead_aes256gcm.exp +0 -1
  445. package/ios/libsodium-stable/test/default/aead_aes256gcm2.c +0 -276
  446. package/ios/libsodium-stable/test/default/aead_aes256gcm2.exp +0 -1
  447. package/ios/libsodium-stable/test/default/aead_chacha20poly1305.c +0 -372
  448. package/ios/libsodium-stable/test/default/aead_chacha20poly1305.exp +0 -63
  449. package/ios/libsodium-stable/test/default/aead_chacha20poly13052.c +0 -1046
  450. package/ios/libsodium-stable/test/default/aead_chacha20poly13052.exp +0 -1
  451. package/ios/libsodium-stable/test/default/aead_xchacha20poly1305.c +0 -203
  452. package/ios/libsodium-stable/test/default/aead_xchacha20poly1305.exp +0 -51
  453. package/ios/libsodium-stable/test/default/auth.c +0 -141
  454. package/ios/libsodium-stable/test/default/auth.exp +0 -30
  455. package/ios/libsodium-stable/test/default/auth2.c +0 -34
  456. package/ios/libsodium-stable/test/default/auth2.exp +0 -4
  457. package/ios/libsodium-stable/test/default/auth3.c +0 -36
  458. package/ios/libsodium-stable/test/default/auth3.exp +0 -1
  459. package/ios/libsodium-stable/test/default/auth5.c +0 -41
  460. package/ios/libsodium-stable/test/default/auth5.exp +0 -0
  461. package/ios/libsodium-stable/test/default/auth6.c +0 -23
  462. package/ios/libsodium-stable/test/default/auth6.exp +0 -8
  463. package/ios/libsodium-stable/test/default/auth7.c +0 -41
  464. package/ios/libsodium-stable/test/default/auth7.exp +0 -0
  465. package/ios/libsodium-stable/test/default/box.c +0 -112
  466. package/ios/libsodium-stable/test/default/box.exp +0 -38
  467. package/ios/libsodium-stable/test/default/box2.c +0 -80
  468. package/ios/libsodium-stable/test/default/box2.exp +0 -34
  469. package/ios/libsodium-stable/test/default/box7.c +0 -50
  470. package/ios/libsodium-stable/test/default/box7.exp +0 -0
  471. package/ios/libsodium-stable/test/default/box8.c +0 -58
  472. package/ios/libsodium-stable/test/default/box8.exp +0 -0
  473. package/ios/libsodium-stable/test/default/box_easy.c +0 -72
  474. package/ios/libsodium-stable/test/default/box_easy.exp +0 -3
  475. package/ios/libsodium-stable/test/default/box_easy2.c +0 -149
  476. package/ios/libsodium-stable/test/default/box_easy2.exp +0 -7
  477. package/ios/libsodium-stable/test/default/box_seal.c +0 -165
  478. package/ios/libsodium-stable/test/default/box_seal.exp +0 -8
  479. package/ios/libsodium-stable/test/default/box_seed.c +0 -30
  480. package/ios/libsodium-stable/test/default/box_seed.exp +0 -8
  481. package/ios/libsodium-stable/test/default/chacha20.c +0 -186
  482. package/ios/libsodium-stable/test/default/chacha20.exp +0 -64
  483. package/ios/libsodium-stable/test/default/cmptest.h +0 -238
  484. package/ios/libsodium-stable/test/default/codecs.c +0 -251
  485. package/ios/libsodium-stable/test/default/codecs.exp +0 -30
  486. package/ios/libsodium-stable/test/default/core1.c +0 -41
  487. package/ios/libsodium-stable/test/default/core1.exp +0 -4
  488. package/ios/libsodium-stable/test/default/core2.c +0 -38
  489. package/ios/libsodium-stable/test/default/core2.exp +0 -4
  490. package/ios/libsodium-stable/test/default/core3.c +0 -115
  491. package/ios/libsodium-stable/test/default/core3.exp +0 -3
  492. package/ios/libsodium-stable/test/default/core4.c +0 -36
  493. package/ios/libsodium-stable/test/default/core4.exp +0 -8
  494. package/ios/libsodium-stable/test/default/core5.c +0 -33
  495. package/ios/libsodium-stable/test/default/core5.exp +0 -4
  496. package/ios/libsodium-stable/test/default/core6.c +0 -52
  497. package/ios/libsodium-stable/test/default/core6.exp +0 -4
  498. package/ios/libsodium-stable/test/default/core_ed25519.c +0 -545
  499. package/ios/libsodium-stable/test/default/core_ed25519.exp +0 -55
  500. package/ios/libsodium-stable/test/default/core_ristretto255.c +0 -271
  501. package/ios/libsodium-stable/test/default/core_ristretto255.exp +0 -8
  502. package/ios/libsodium-stable/test/default/ed25519_convert.c +0 -70
  503. package/ios/libsodium-stable/test/default/ed25519_convert.exp +0 -3
  504. package/ios/libsodium-stable/test/default/generichash.c +0 -1406
  505. package/ios/libsodium-stable/test/default/generichash.exp +0 -65
  506. package/ios/libsodium-stable/test/default/generichash2.c +0 -62
  507. package/ios/libsodium-stable/test/default/generichash2.exp +0 -64
  508. package/ios/libsodium-stable/test/default/generichash3.c +0 -176
  509. package/ios/libsodium-stable/test/default/generichash3.exp +0 -75
  510. package/ios/libsodium-stable/test/default/hash.c +0 -47
  511. package/ios/libsodium-stable/test/default/hash.exp +0 -4
  512. package/ios/libsodium-stable/test/default/hash3.c +0 -20
  513. package/ios/libsodium-stable/test/default/hash3.exp +0 -1
  514. package/ios/libsodium-stable/test/default/index.html.tpl +0 -98
  515. package/ios/libsodium-stable/test/default/kdf.c +0 -71
  516. package/ios/libsodium-stable/test/default/kdf.exp +0 -77
  517. package/ios/libsodium-stable/test/default/kdf_hkdf.c +0 -102
  518. package/ios/libsodium-stable/test/default/kdf_hkdf.exp +0 -205
  519. package/ios/libsodium-stable/test/default/keygen.c +0 -67
  520. package/ios/libsodium-stable/test/default/keygen.exp +0 -1
  521. package/ios/libsodium-stable/test/default/kx.c +0 -149
  522. package/ios/libsodium-stable/test/default/kx.exp +0 -7
  523. package/ios/libsodium-stable/test/default/metamorphic.c +0 -187
  524. package/ios/libsodium-stable/test/default/metamorphic.exp +0 -1
  525. package/ios/libsodium-stable/test/default/misuse.c +0 -187
  526. package/ios/libsodium-stable/test/default/misuse.exp +0 -0
  527. package/ios/libsodium-stable/test/default/onetimeauth.c +0 -63
  528. package/ios/libsodium-stable/test/default/onetimeauth.exp +0 -4
  529. package/ios/libsodium-stable/test/default/onetimeauth2.c +0 -33
  530. package/ios/libsodium-stable/test/default/onetimeauth2.exp +0 -1
  531. package/ios/libsodium-stable/test/default/onetimeauth7.c +0 -36
  532. package/ios/libsodium-stable/test/default/onetimeauth7.exp +0 -0
  533. package/ios/libsodium-stable/test/default/pre.js.inc +0 -22
  534. package/ios/libsodium-stable/test/default/pwhash_argon2i.c +0 -467
  535. package/ios/libsodium-stable/test/default/pwhash_argon2i.exp +0 -11
  536. package/ios/libsodium-stable/test/default/pwhash_argon2id.c +0 -517
  537. package/ios/libsodium-stable/test/default/pwhash_argon2id.exp +0 -14
  538. package/ios/libsodium-stable/test/default/pwhash_scrypt.c +0 -393
  539. package/ios/libsodium-stable/test/default/pwhash_scrypt.exp +0 -37
  540. package/ios/libsodium-stable/test/default/pwhash_scrypt_ll.c +0 -59
  541. package/ios/libsodium-stable/test/default/pwhash_scrypt_ll.exp +0 -15
  542. package/ios/libsodium-stable/test/default/randombytes.c +0 -164
  543. package/ios/libsodium-stable/test/default/randombytes.exp +0 -2
  544. package/ios/libsodium-stable/test/default/run.sh +0 -9
  545. package/ios/libsodium-stable/test/default/scalarmult.c +0 -77
  546. package/ios/libsodium-stable/test/default/scalarmult.exp +0 -5
  547. package/ios/libsodium-stable/test/default/scalarmult2.c +0 -22
  548. package/ios/libsodium-stable/test/default/scalarmult2.exp +0 -1
  549. package/ios/libsodium-stable/test/default/scalarmult5.c +0 -30
  550. package/ios/libsodium-stable/test/default/scalarmult5.exp +0 -1
  551. package/ios/libsodium-stable/test/default/scalarmult6.c +0 -54
  552. package/ios/libsodium-stable/test/default/scalarmult6.exp +0 -4
  553. package/ios/libsodium-stable/test/default/scalarmult7.c +0 -34
  554. package/ios/libsodium-stable/test/default/scalarmult7.exp +0 -1
  555. package/ios/libsodium-stable/test/default/scalarmult8.c +0 -580
  556. package/ios/libsodium-stable/test/default/scalarmult8.exp +0 -65
  557. package/ios/libsodium-stable/test/default/scalarmult_ed25519.c +0 -134
  558. package/ios/libsodium-stable/test/default/scalarmult_ed25519.exp +0 -1
  559. package/ios/libsodium-stable/test/default/scalarmult_ristretto255.c +0 -51
  560. package/ios/libsodium-stable/test/default/scalarmult_ristretto255.exp +0 -18
  561. package/ios/libsodium-stable/test/default/secretbox.c +0 -84
  562. package/ios/libsodium-stable/test/default/secretbox.exp +0 -38
  563. package/ios/libsodium-stable/test/default/secretbox2.c +0 -55
  564. package/ios/libsodium-stable/test/default/secretbox2.exp +0 -17
  565. package/ios/libsodium-stable/test/default/secretbox7.c +0 -36
  566. package/ios/libsodium-stable/test/default/secretbox7.exp +0 -0
  567. package/ios/libsodium-stable/test/default/secretbox8.c +0 -41
  568. package/ios/libsodium-stable/test/default/secretbox8.exp +0 -0
  569. package/ios/libsodium-stable/test/default/secretbox_easy.c +0 -124
  570. package/ios/libsodium-stable/test/default/secretbox_easy.exp +0 -9
  571. package/ios/libsodium-stable/test/default/secretbox_easy2.c +0 -72
  572. package/ios/libsodium-stable/test/default/secretbox_easy2.exp +0 -5
  573. package/ios/libsodium-stable/test/default/secretstream_xchacha20poly1305.c +0 -329
  574. package/ios/libsodium-stable/test/default/secretstream_xchacha20poly1305.exp +0 -1
  575. package/ios/libsodium-stable/test/default/shorthash.c +0 -35
  576. package/ios/libsodium-stable/test/default/shorthash.exp +0 -64
  577. package/ios/libsodium-stable/test/default/sign.c +0 -1324
  578. package/ios/libsodium-stable/test/default/sign.exp +0 -5
  579. package/ios/libsodium-stable/test/default/siphashx24.c +0 -33
  580. package/ios/libsodium-stable/test/default/siphashx24.exp +0 -64
  581. package/ios/libsodium-stable/test/default/sodium_core.c +0 -43
  582. package/ios/libsodium-stable/test/default/sodium_core.exp +0 -1
  583. package/ios/libsodium-stable/test/default/sodium_utils.c +0 -224
  584. package/ios/libsodium-stable/test/default/sodium_utils.exp +0 -25
  585. package/ios/libsodium-stable/test/default/sodium_utils2.c +0 -120
  586. package/ios/libsodium-stable/test/default/sodium_utils2.exp +0 -3
  587. package/ios/libsodium-stable/test/default/sodium_utils3.c +0 -90
  588. package/ios/libsodium-stable/test/default/sodium_utils3.exp +0 -2
  589. package/ios/libsodium-stable/test/default/sodium_version.c +0 -18
  590. package/ios/libsodium-stable/test/default/sodium_version.exp +0 -3
  591. package/ios/libsodium-stable/test/default/stream.c +0 -84
  592. package/ios/libsodium-stable/test/default/stream.exp +0 -83
  593. package/ios/libsodium-stable/test/default/stream2.c +0 -59
  594. package/ios/libsodium-stable/test/default/stream2.exp +0 -2
  595. package/ios/libsodium-stable/test/default/stream3.c +0 -32
  596. package/ios/libsodium-stable/test/default/stream3.exp +0 -4
  597. package/ios/libsodium-stable/test/default/stream4.c +0 -51
  598. package/ios/libsodium-stable/test/default/stream4.exp +0 -17
  599. package/ios/libsodium-stable/test/default/verify1.c +0 -76
  600. package/ios/libsodium-stable/test/default/verify1.exp +0 -2
  601. package/ios/libsodium-stable/test/default/wasi-test-wrapper.sh +0 -98
  602. package/ios/libsodium-stable/test/default/wintest.bat +0 -61
  603. package/ios/libsodium-stable/test/default/xchacha20.c +0 -428
  604. package/ios/libsodium-stable/test/default/xchacha20.exp +0 -5
  605. package/ios/libsodium-stable/test/quirks/quirks.h +0 -34
@@ -1,1030 +0,0 @@
1
- #include <string.h>
2
-
3
- #include "private/common.h"
4
- #include "utils.h"
5
-
6
- /*
7
- h = 0
8
- */
9
-
10
- static inline void
11
- fe25519_0(fe25519 h)
12
- {
13
- memset(&h[0], 0, 10 * sizeof h[0]);
14
- }
15
-
16
- /*
17
- h = 1
18
- */
19
-
20
- static inline void
21
- fe25519_1(fe25519 h)
22
- {
23
- h[0] = 1;
24
- h[1] = 0;
25
- memset(&h[2], 0, 8 * sizeof h[0]);
26
- }
27
-
28
- /*
29
- h = f + g
30
- Can overlap h with f or g.
31
- *
32
- Preconditions:
33
- |f| bounded by 1.1*2^25,1.1*2^24,1.1*2^25,1.1*2^24,etc.
34
- |g| bounded by 1.1*2^25,1.1*2^24,1.1*2^25,1.1*2^24,etc.
35
- *
36
- Postconditions:
37
- |h| bounded by 1.1*2^26,1.1*2^25,1.1*2^26,1.1*2^25,etc.
38
- */
39
-
40
- static inline void
41
- fe25519_add(fe25519 h, const fe25519 f, const fe25519 g)
42
- {
43
- int32_t h0 = f[0] + g[0];
44
- int32_t h1 = f[1] + g[1];
45
- int32_t h2 = f[2] + g[2];
46
- int32_t h3 = f[3] + g[3];
47
- int32_t h4 = f[4] + g[4];
48
- int32_t h5 = f[5] + g[5];
49
- int32_t h6 = f[6] + g[6];
50
- int32_t h7 = f[7] + g[7];
51
- int32_t h8 = f[8] + g[8];
52
- int32_t h9 = f[9] + g[9];
53
-
54
- h[0] = h0;
55
- h[1] = h1;
56
- h[2] = h2;
57
- h[3] = h3;
58
- h[4] = h4;
59
- h[5] = h5;
60
- h[6] = h6;
61
- h[7] = h7;
62
- h[8] = h8;
63
- h[9] = h9;
64
- }
65
-
66
- /*
67
- h = f - g
68
- Can overlap h with f or g.
69
- *
70
- Preconditions:
71
- |f| bounded by 1.1*2^25,1.1*2^24,1.1*2^25,1.1*2^24,etc.
72
- |g| bounded by 1.1*2^25,1.1*2^24,1.1*2^25,1.1*2^24,etc.
73
- *
74
- Postconditions:
75
- |h| bounded by 1.1*2^26,1.1*2^25,1.1*2^26,1.1*2^25,etc.
76
- */
77
-
78
- static void
79
- fe25519_sub(fe25519 h, const fe25519 f, const fe25519 g)
80
- {
81
- int32_t h0 = f[0] - g[0];
82
- int32_t h1 = f[1] - g[1];
83
- int32_t h2 = f[2] - g[2];
84
- int32_t h3 = f[3] - g[3];
85
- int32_t h4 = f[4] - g[4];
86
- int32_t h5 = f[5] - g[5];
87
- int32_t h6 = f[6] - g[6];
88
- int32_t h7 = f[7] - g[7];
89
- int32_t h8 = f[8] - g[8];
90
- int32_t h9 = f[9] - g[9];
91
-
92
- h[0] = h0;
93
- h[1] = h1;
94
- h[2] = h2;
95
- h[3] = h3;
96
- h[4] = h4;
97
- h[5] = h5;
98
- h[6] = h6;
99
- h[7] = h7;
100
- h[8] = h8;
101
- h[9] = h9;
102
- }
103
-
104
- /*
105
- h = -f
106
- *
107
- Preconditions:
108
- |f| bounded by 1.1*2^25,1.1*2^24,1.1*2^25,1.1*2^24,etc.
109
- *
110
- Postconditions:
111
- |h| bounded by 1.1*2^25,1.1*2^24,1.1*2^25,1.1*2^24,etc.
112
- */
113
-
114
- static inline void
115
- fe25519_neg(fe25519 h, const fe25519 f)
116
- {
117
- int32_t h0 = -f[0];
118
- int32_t h1 = -f[1];
119
- int32_t h2 = -f[2];
120
- int32_t h3 = -f[3];
121
- int32_t h4 = -f[4];
122
- int32_t h5 = -f[5];
123
- int32_t h6 = -f[6];
124
- int32_t h7 = -f[7];
125
- int32_t h8 = -f[8];
126
- int32_t h9 = -f[9];
127
-
128
- h[0] = h0;
129
- h[1] = h1;
130
- h[2] = h2;
131
- h[3] = h3;
132
- h[4] = h4;
133
- h[5] = h5;
134
- h[6] = h6;
135
- h[7] = h7;
136
- h[8] = h8;
137
- h[9] = h9;
138
- }
139
-
140
- /*
141
- Replace (f,g) with (g,g) if b == 1;
142
- replace (f,g) with (f,g) if b == 0.
143
- *
144
- Preconditions: b in {0,1}.
145
- */
146
-
147
- static void
148
- fe25519_cmov(fe25519 f, const fe25519 g, unsigned int b)
149
- {
150
- const uint32_t mask = (uint32_t) (-(int32_t) b);
151
-
152
- int32_t f0 = f[0];
153
- int32_t f1 = f[1];
154
- int32_t f2 = f[2];
155
- int32_t f3 = f[3];
156
- int32_t f4 = f[4];
157
- int32_t f5 = f[5];
158
- int32_t f6 = f[6];
159
- int32_t f7 = f[7];
160
- int32_t f8 = f[8];
161
- int32_t f9 = f[9];
162
-
163
- int32_t x0 = f0 ^ g[0];
164
- int32_t x1 = f1 ^ g[1];
165
- int32_t x2 = f2 ^ g[2];
166
- int32_t x3 = f3 ^ g[3];
167
- int32_t x4 = f4 ^ g[4];
168
- int32_t x5 = f5 ^ g[5];
169
- int32_t x6 = f6 ^ g[6];
170
- int32_t x7 = f7 ^ g[7];
171
- int32_t x8 = f8 ^ g[8];
172
- int32_t x9 = f9 ^ g[9];
173
-
174
- x0 &= mask;
175
- x1 &= mask;
176
- x2 &= mask;
177
- x3 &= mask;
178
- x4 &= mask;
179
- x5 &= mask;
180
- x6 &= mask;
181
- x7 &= mask;
182
- x8 &= mask;
183
- x9 &= mask;
184
-
185
- f[0] = f0 ^ x0;
186
- f[1] = f1 ^ x1;
187
- f[2] = f2 ^ x2;
188
- f[3] = f3 ^ x3;
189
- f[4] = f4 ^ x4;
190
- f[5] = f5 ^ x5;
191
- f[6] = f6 ^ x6;
192
- f[7] = f7 ^ x7;
193
- f[8] = f8 ^ x8;
194
- f[9] = f9 ^ x9;
195
- }
196
-
197
- static void
198
- fe25519_cswap(fe25519 f, fe25519 g, unsigned int b)
199
- {
200
- const uint32_t mask = (uint32_t) (-(int64_t) b);
201
-
202
- int32_t f0 = f[0];
203
- int32_t f1 = f[1];
204
- int32_t f2 = f[2];
205
- int32_t f3 = f[3];
206
- int32_t f4 = f[4];
207
- int32_t f5 = f[5];
208
- int32_t f6 = f[6];
209
- int32_t f7 = f[7];
210
- int32_t f8 = f[8];
211
- int32_t f9 = f[9];
212
-
213
- int32_t g0 = g[0];
214
- int32_t g1 = g[1];
215
- int32_t g2 = g[2];
216
- int32_t g3 = g[3];
217
- int32_t g4 = g[4];
218
- int32_t g5 = g[5];
219
- int32_t g6 = g[6];
220
- int32_t g7 = g[7];
221
- int32_t g8 = g[8];
222
- int32_t g9 = g[9];
223
-
224
- int32_t x0 = f0 ^ g0;
225
- int32_t x1 = f1 ^ g1;
226
- int32_t x2 = f2 ^ g2;
227
- int32_t x3 = f3 ^ g3;
228
- int32_t x4 = f4 ^ g4;
229
- int32_t x5 = f5 ^ g5;
230
- int32_t x6 = f6 ^ g6;
231
- int32_t x7 = f7 ^ g7;
232
- int32_t x8 = f8 ^ g8;
233
- int32_t x9 = f9 ^ g9;
234
-
235
- x0 &= mask;
236
- x1 &= mask;
237
- x2 &= mask;
238
- x3 &= mask;
239
- x4 &= mask;
240
- x5 &= mask;
241
- x6 &= mask;
242
- x7 &= mask;
243
- x8 &= mask;
244
- x9 &= mask;
245
-
246
- f[0] = f0 ^ x0;
247
- f[1] = f1 ^ x1;
248
- f[2] = f2 ^ x2;
249
- f[3] = f3 ^ x3;
250
- f[4] = f4 ^ x4;
251
- f[5] = f5 ^ x5;
252
- f[6] = f6 ^ x6;
253
- f[7] = f7 ^ x7;
254
- f[8] = f8 ^ x8;
255
- f[9] = f9 ^ x9;
256
-
257
- g[0] = g0 ^ x0;
258
- g[1] = g1 ^ x1;
259
- g[2] = g2 ^ x2;
260
- g[3] = g3 ^ x3;
261
- g[4] = g4 ^ x4;
262
- g[5] = g5 ^ x5;
263
- g[6] = g6 ^ x6;
264
- g[7] = g7 ^ x7;
265
- g[8] = g8 ^ x8;
266
- g[9] = g9 ^ x9;
267
- }
268
-
269
- /*
270
- h = f
271
- */
272
-
273
- static inline void
274
- fe25519_copy(fe25519 h, const fe25519 f)
275
- {
276
- memcpy(h, f, 10 * sizeof h[0]);
277
- }
278
-
279
- /*
280
- return 1 if f is in {1,3,5,...,q-2}
281
- return 0 if f is in {0,2,4,...,q-1}
282
-
283
- Preconditions:
284
- |f| bounded by 1.1*2^26,1.1*2^25,1.1*2^26,1.1*2^25,etc.
285
- */
286
-
287
- static inline int
288
- fe25519_isnegative(const fe25519 f)
289
- {
290
- unsigned char s[32];
291
-
292
- fe25519_tobytes(s, f);
293
-
294
- return s[0] & 1;
295
- }
296
-
297
- /*
298
- return 1 if f == 0
299
- return 0 if f != 0
300
-
301
- Preconditions:
302
- |f| bounded by 1.1*2^26,1.1*2^25,1.1*2^26,1.1*2^25,etc.
303
- */
304
-
305
- static inline int
306
- fe25519_iszero(const fe25519 f)
307
- {
308
- unsigned char s[32];
309
-
310
- fe25519_tobytes(s, f);
311
-
312
- return sodium_is_zero(s, 32);
313
- }
314
-
315
- /*
316
- h = f * g
317
- Can overlap h with f or g.
318
- *
319
- Preconditions:
320
- |f| bounded by 1.65*2^26,1.65*2^25,1.65*2^26,1.65*2^25,etc.
321
- |g| bounded by 1.65*2^26,1.65*2^25,1.65*2^26,1.65*2^25,etc.
322
- *
323
- Postconditions:
324
- |h| bounded by 1.01*2^25,1.01*2^24,1.01*2^25,1.01*2^24,etc.
325
- */
326
-
327
- /*
328
- Notes on implementation strategy:
329
- *
330
- Using schoolbook multiplication.
331
- Karatsuba would save a little in some cost models.
332
- *
333
- Most multiplications by 2 and 19 are 32-bit precomputations;
334
- cheaper than 64-bit postcomputations.
335
- *
336
- There is one remaining multiplication by 19 in the carry chain;
337
- one *19 precomputation can be merged into this,
338
- but the resulting data flow is considerably less clean.
339
- *
340
- There are 12 carries below.
341
- 10 of them are 2-way parallelizable and vectorizable.
342
- Can get away with 11 carries, but then data flow is much deeper.
343
- *
344
- With tighter constraints on inputs can squeeze carries into int32.
345
- */
346
-
347
- static void
348
- fe25519_mul(fe25519 h, const fe25519 f, const fe25519 g)
349
- {
350
- int32_t f0 = f[0];
351
- int32_t f1 = f[1];
352
- int32_t f2 = f[2];
353
- int32_t f3 = f[3];
354
- int32_t f4 = f[4];
355
- int32_t f5 = f[5];
356
- int32_t f6 = f[6];
357
- int32_t f7 = f[7];
358
- int32_t f8 = f[8];
359
- int32_t f9 = f[9];
360
-
361
- int32_t g0 = g[0];
362
- int32_t g1 = g[1];
363
- int32_t g2 = g[2];
364
- int32_t g3 = g[3];
365
- int32_t g4 = g[4];
366
- int32_t g5 = g[5];
367
- int32_t g6 = g[6];
368
- int32_t g7 = g[7];
369
- int32_t g8 = g[8];
370
- int32_t g9 = g[9];
371
-
372
- int32_t g1_19 = 19 * g1; /* 1.959375*2^29 */
373
- int32_t g2_19 = 19 * g2; /* 1.959375*2^30; still ok */
374
- int32_t g3_19 = 19 * g3;
375
- int32_t g4_19 = 19 * g4;
376
- int32_t g5_19 = 19 * g5;
377
- int32_t g6_19 = 19 * g6;
378
- int32_t g7_19 = 19 * g7;
379
- int32_t g8_19 = 19 * g8;
380
- int32_t g9_19 = 19 * g9;
381
- int32_t f1_2 = 2 * f1;
382
- int32_t f3_2 = 2 * f3;
383
- int32_t f5_2 = 2 * f5;
384
- int32_t f7_2 = 2 * f7;
385
- int32_t f9_2 = 2 * f9;
386
-
387
- int64_t f0g0 = f0 * (int64_t) g0;
388
- int64_t f0g1 = f0 * (int64_t) g1;
389
- int64_t f0g2 = f0 * (int64_t) g2;
390
- int64_t f0g3 = f0 * (int64_t) g3;
391
- int64_t f0g4 = f0 * (int64_t) g4;
392
- int64_t f0g5 = f0 * (int64_t) g5;
393
- int64_t f0g6 = f0 * (int64_t) g6;
394
- int64_t f0g7 = f0 * (int64_t) g7;
395
- int64_t f0g8 = f0 * (int64_t) g8;
396
- int64_t f0g9 = f0 * (int64_t) g9;
397
- int64_t f1g0 = f1 * (int64_t) g0;
398
- int64_t f1g1_2 = f1_2 * (int64_t) g1;
399
- int64_t f1g2 = f1 * (int64_t) g2;
400
- int64_t f1g3_2 = f1_2 * (int64_t) g3;
401
- int64_t f1g4 = f1 * (int64_t) g4;
402
- int64_t f1g5_2 = f1_2 * (int64_t) g5;
403
- int64_t f1g6 = f1 * (int64_t) g6;
404
- int64_t f1g7_2 = f1_2 * (int64_t) g7;
405
- int64_t f1g8 = f1 * (int64_t) g8;
406
- int64_t f1g9_38 = f1_2 * (int64_t) g9_19;
407
- int64_t f2g0 = f2 * (int64_t) g0;
408
- int64_t f2g1 = f2 * (int64_t) g1;
409
- int64_t f2g2 = f2 * (int64_t) g2;
410
- int64_t f2g3 = f2 * (int64_t) g3;
411
- int64_t f2g4 = f2 * (int64_t) g4;
412
- int64_t f2g5 = f2 * (int64_t) g5;
413
- int64_t f2g6 = f2 * (int64_t) g6;
414
- int64_t f2g7 = f2 * (int64_t) g7;
415
- int64_t f2g8_19 = f2 * (int64_t) g8_19;
416
- int64_t f2g9_19 = f2 * (int64_t) g9_19;
417
- int64_t f3g0 = f3 * (int64_t) g0;
418
- int64_t f3g1_2 = f3_2 * (int64_t) g1;
419
- int64_t f3g2 = f3 * (int64_t) g2;
420
- int64_t f3g3_2 = f3_2 * (int64_t) g3;
421
- int64_t f3g4 = f3 * (int64_t) g4;
422
- int64_t f3g5_2 = f3_2 * (int64_t) g5;
423
- int64_t f3g6 = f3 * (int64_t) g6;
424
- int64_t f3g7_38 = f3_2 * (int64_t) g7_19;
425
- int64_t f3g8_19 = f3 * (int64_t) g8_19;
426
- int64_t f3g9_38 = f3_2 * (int64_t) g9_19;
427
- int64_t f4g0 = f4 * (int64_t) g0;
428
- int64_t f4g1 = f4 * (int64_t) g1;
429
- int64_t f4g2 = f4 * (int64_t) g2;
430
- int64_t f4g3 = f4 * (int64_t) g3;
431
- int64_t f4g4 = f4 * (int64_t) g4;
432
- int64_t f4g5 = f4 * (int64_t) g5;
433
- int64_t f4g6_19 = f4 * (int64_t) g6_19;
434
- int64_t f4g7_19 = f4 * (int64_t) g7_19;
435
- int64_t f4g8_19 = f4 * (int64_t) g8_19;
436
- int64_t f4g9_19 = f4 * (int64_t) g9_19;
437
- int64_t f5g0 = f5 * (int64_t) g0;
438
- int64_t f5g1_2 = f5_2 * (int64_t) g1;
439
- int64_t f5g2 = f5 * (int64_t) g2;
440
- int64_t f5g3_2 = f5_2 * (int64_t) g3;
441
- int64_t f5g4 = f5 * (int64_t) g4;
442
- int64_t f5g5_38 = f5_2 * (int64_t) g5_19;
443
- int64_t f5g6_19 = f5 * (int64_t) g6_19;
444
- int64_t f5g7_38 = f5_2 * (int64_t) g7_19;
445
- int64_t f5g8_19 = f5 * (int64_t) g8_19;
446
- int64_t f5g9_38 = f5_2 * (int64_t) g9_19;
447
- int64_t f6g0 = f6 * (int64_t) g0;
448
- int64_t f6g1 = f6 * (int64_t) g1;
449
- int64_t f6g2 = f6 * (int64_t) g2;
450
- int64_t f6g3 = f6 * (int64_t) g3;
451
- int64_t f6g4_19 = f6 * (int64_t) g4_19;
452
- int64_t f6g5_19 = f6 * (int64_t) g5_19;
453
- int64_t f6g6_19 = f6 * (int64_t) g6_19;
454
- int64_t f6g7_19 = f6 * (int64_t) g7_19;
455
- int64_t f6g8_19 = f6 * (int64_t) g8_19;
456
- int64_t f6g9_19 = f6 * (int64_t) g9_19;
457
- int64_t f7g0 = f7 * (int64_t) g0;
458
- int64_t f7g1_2 = f7_2 * (int64_t) g1;
459
- int64_t f7g2 = f7 * (int64_t) g2;
460
- int64_t f7g3_38 = f7_2 * (int64_t) g3_19;
461
- int64_t f7g4_19 = f7 * (int64_t) g4_19;
462
- int64_t f7g5_38 = f7_2 * (int64_t) g5_19;
463
- int64_t f7g6_19 = f7 * (int64_t) g6_19;
464
- int64_t f7g7_38 = f7_2 * (int64_t) g7_19;
465
- int64_t f7g8_19 = f7 * (int64_t) g8_19;
466
- int64_t f7g9_38 = f7_2 * (int64_t) g9_19;
467
- int64_t f8g0 = f8 * (int64_t) g0;
468
- int64_t f8g1 = f8 * (int64_t) g1;
469
- int64_t f8g2_19 = f8 * (int64_t) g2_19;
470
- int64_t f8g3_19 = f8 * (int64_t) g3_19;
471
- int64_t f8g4_19 = f8 * (int64_t) g4_19;
472
- int64_t f8g5_19 = f8 * (int64_t) g5_19;
473
- int64_t f8g6_19 = f8 * (int64_t) g6_19;
474
- int64_t f8g7_19 = f8 * (int64_t) g7_19;
475
- int64_t f8g8_19 = f8 * (int64_t) g8_19;
476
- int64_t f8g9_19 = f8 * (int64_t) g9_19;
477
- int64_t f9g0 = f9 * (int64_t) g0;
478
- int64_t f9g1_38 = f9_2 * (int64_t) g1_19;
479
- int64_t f9g2_19 = f9 * (int64_t) g2_19;
480
- int64_t f9g3_38 = f9_2 * (int64_t) g3_19;
481
- int64_t f9g4_19 = f9 * (int64_t) g4_19;
482
- int64_t f9g5_38 = f9_2 * (int64_t) g5_19;
483
- int64_t f9g6_19 = f9 * (int64_t) g6_19;
484
- int64_t f9g7_38 = f9_2 * (int64_t) g7_19;
485
- int64_t f9g8_19 = f9 * (int64_t) g8_19;
486
- int64_t f9g9_38 = f9_2 * (int64_t) g9_19;
487
-
488
- int64_t h0 = f0g0 + f1g9_38 + f2g8_19 + f3g7_38 + f4g6_19 + f5g5_38 +
489
- f6g4_19 + f7g3_38 + f8g2_19 + f9g1_38;
490
- int64_t h1 = f0g1 + f1g0 + f2g9_19 + f3g8_19 + f4g7_19 + f5g6_19 + f6g5_19 +
491
- f7g4_19 + f8g3_19 + f9g2_19;
492
- int64_t h2 = f0g2 + f1g1_2 + f2g0 + f3g9_38 + f4g8_19 + f5g7_38 + f6g6_19 +
493
- f7g5_38 + f8g4_19 + f9g3_38;
494
- int64_t h3 = f0g3 + f1g2 + f2g1 + f3g0 + f4g9_19 + f5g8_19 + f6g7_19 +
495
- f7g6_19 + f8g5_19 + f9g4_19;
496
- int64_t h4 = f0g4 + f1g3_2 + f2g2 + f3g1_2 + f4g0 + f5g9_38 + f6g8_19 +
497
- f7g7_38 + f8g6_19 + f9g5_38;
498
- int64_t h5 = f0g5 + f1g4 + f2g3 + f3g2 + f4g1 + f5g0 + f6g9_19 + f7g8_19 +
499
- f8g7_19 + f9g6_19;
500
- int64_t h6 = f0g6 + f1g5_2 + f2g4 + f3g3_2 + f4g2 + f5g1_2 + f6g0 +
501
- f7g9_38 + f8g8_19 + f9g7_38;
502
- int64_t h7 = f0g7 + f1g6 + f2g5 + f3g4 + f4g3 + f5g2 + f6g1 + f7g0 +
503
- f8g9_19 + f9g8_19;
504
- int64_t h8 = f0g8 + f1g7_2 + f2g6 + f3g5_2 + f4g4 + f5g3_2 + f6g2 + f7g1_2 +
505
- f8g0 + f9g9_38;
506
- int64_t h9 =
507
- f0g9 + f1g8 + f2g7 + f3g6 + f4g5 + f5g4 + f6g3 + f7g2 + f8g1 + f9g0;
508
-
509
- int64_t carry0;
510
- int64_t carry1;
511
- int64_t carry2;
512
- int64_t carry3;
513
- int64_t carry4;
514
- int64_t carry5;
515
- int64_t carry6;
516
- int64_t carry7;
517
- int64_t carry8;
518
- int64_t carry9;
519
-
520
- /*
521
- |h0| <= (1.65*1.65*2^52*(1+19+19+19+19)+1.65*1.65*2^50*(38+38+38+38+38))
522
- i.e. |h0| <= 1.4*2^60; narrower ranges for h2, h4, h6, h8
523
- |h1| <= (1.65*1.65*2^51*(1+1+19+19+19+19+19+19+19+19))
524
- i.e. |h1| <= 1.7*2^59; narrower ranges for h3, h5, h7, h9
525
- */
526
-
527
- carry0 = (h0 + (int64_t)(1L << 25)) >> 26;
528
- h1 += carry0;
529
- h0 -= carry0 * ((uint64_t) 1L << 26);
530
- carry4 = (h4 + (int64_t)(1L << 25)) >> 26;
531
- h5 += carry4;
532
- h4 -= carry4 * ((uint64_t) 1L << 26);
533
- /* |h0| <= 2^25 */
534
- /* |h4| <= 2^25 */
535
- /* |h1| <= 1.71*2^59 */
536
- /* |h5| <= 1.71*2^59 */
537
-
538
- carry1 = (h1 + (int64_t)(1L << 24)) >> 25;
539
- h2 += carry1;
540
- h1 -= carry1 * ((uint64_t) 1L << 25);
541
- carry5 = (h5 + (int64_t)(1L << 24)) >> 25;
542
- h6 += carry5;
543
- h5 -= carry5 * ((uint64_t) 1L << 25);
544
- /* |h1| <= 2^24; from now on fits into int32 */
545
- /* |h5| <= 2^24; from now on fits into int32 */
546
- /* |h2| <= 1.41*2^60 */
547
- /* |h6| <= 1.41*2^60 */
548
-
549
- carry2 = (h2 + (int64_t)(1L << 25)) >> 26;
550
- h3 += carry2;
551
- h2 -= carry2 * ((uint64_t) 1L << 26);
552
- carry6 = (h6 + (int64_t)(1L << 25)) >> 26;
553
- h7 += carry6;
554
- h6 -= carry6 * ((uint64_t) 1L << 26);
555
- /* |h2| <= 2^25; from now on fits into int32 unchanged */
556
- /* |h6| <= 2^25; from now on fits into int32 unchanged */
557
- /* |h3| <= 1.71*2^59 */
558
- /* |h7| <= 1.71*2^59 */
559
-
560
- carry3 = (h3 + (int64_t)(1L << 24)) >> 25;
561
- h4 += carry3;
562
- h3 -= carry3 * ((uint64_t) 1L << 25);
563
- carry7 = (h7 + (int64_t)(1L << 24)) >> 25;
564
- h8 += carry7;
565
- h7 -= carry7 * ((uint64_t) 1L << 25);
566
- /* |h3| <= 2^24; from now on fits into int32 unchanged */
567
- /* |h7| <= 2^24; from now on fits into int32 unchanged */
568
- /* |h4| <= 1.72*2^34 */
569
- /* |h8| <= 1.41*2^60 */
570
-
571
- carry4 = (h4 + (int64_t)(1L << 25)) >> 26;
572
- h5 += carry4;
573
- h4 -= carry4 * ((uint64_t) 1L << 26);
574
- carry8 = (h8 + (int64_t)(1L << 25)) >> 26;
575
- h9 += carry8;
576
- h8 -= carry8 * ((uint64_t) 1L << 26);
577
- /* |h4| <= 2^25; from now on fits into int32 unchanged */
578
- /* |h8| <= 2^25; from now on fits into int32 unchanged */
579
- /* |h5| <= 1.01*2^24 */
580
- /* |h9| <= 1.71*2^59 */
581
-
582
- carry9 = (h9 + (int64_t)(1L << 24)) >> 25;
583
- h0 += carry9 * 19;
584
- h9 -= carry9 * ((uint64_t) 1L << 25);
585
- /* |h9| <= 2^24; from now on fits into int32 unchanged */
586
- /* |h0| <= 1.1*2^39 */
587
-
588
- carry0 = (h0 + (int64_t)(1L << 25)) >> 26;
589
- h1 += carry0;
590
- h0 -= carry0 * ((uint64_t) 1L << 26);
591
- /* |h0| <= 2^25; from now on fits into int32 unchanged */
592
- /* |h1| <= 1.01*2^24 */
593
-
594
- h[0] = (int32_t) h0;
595
- h[1] = (int32_t) h1;
596
- h[2] = (int32_t) h2;
597
- h[3] = (int32_t) h3;
598
- h[4] = (int32_t) h4;
599
- h[5] = (int32_t) h5;
600
- h[6] = (int32_t) h6;
601
- h[7] = (int32_t) h7;
602
- h[8] = (int32_t) h8;
603
- h[9] = (int32_t) h9;
604
- }
605
-
606
- /*
607
- h = f * f
608
- Can overlap h with f.
609
- *
610
- Preconditions:
611
- |f| bounded by 1.65*2^26,1.65*2^25,1.65*2^26,1.65*2^25,etc.
612
- *
613
- Postconditions:
614
- |h| bounded by 1.01*2^25,1.01*2^24,1.01*2^25,1.01*2^24,etc.
615
- */
616
-
617
- static void
618
- fe25519_sq(fe25519 h, const fe25519 f)
619
- {
620
- int32_t f0 = f[0];
621
- int32_t f1 = f[1];
622
- int32_t f2 = f[2];
623
- int32_t f3 = f[3];
624
- int32_t f4 = f[4];
625
- int32_t f5 = f[5];
626
- int32_t f6 = f[6];
627
- int32_t f7 = f[7];
628
- int32_t f8 = f[8];
629
- int32_t f9 = f[9];
630
-
631
- int32_t f0_2 = 2 * f0;
632
- int32_t f1_2 = 2 * f1;
633
- int32_t f2_2 = 2 * f2;
634
- int32_t f3_2 = 2 * f3;
635
- int32_t f4_2 = 2 * f4;
636
- int32_t f5_2 = 2 * f5;
637
- int32_t f6_2 = 2 * f6;
638
- int32_t f7_2 = 2 * f7;
639
- int32_t f5_38 = 38 * f5; /* 1.959375*2^30 */
640
- int32_t f6_19 = 19 * f6; /* 1.959375*2^30 */
641
- int32_t f7_38 = 38 * f7; /* 1.959375*2^30 */
642
- int32_t f8_19 = 19 * f8; /* 1.959375*2^30 */
643
- int32_t f9_38 = 38 * f9; /* 1.959375*2^30 */
644
-
645
- int64_t f0f0 = f0 * (int64_t) f0;
646
- int64_t f0f1_2 = f0_2 * (int64_t) f1;
647
- int64_t f0f2_2 = f0_2 * (int64_t) f2;
648
- int64_t f0f3_2 = f0_2 * (int64_t) f3;
649
- int64_t f0f4_2 = f0_2 * (int64_t) f4;
650
- int64_t f0f5_2 = f0_2 * (int64_t) f5;
651
- int64_t f0f6_2 = f0_2 * (int64_t) f6;
652
- int64_t f0f7_2 = f0_2 * (int64_t) f7;
653
- int64_t f0f8_2 = f0_2 * (int64_t) f8;
654
- int64_t f0f9_2 = f0_2 * (int64_t) f9;
655
- int64_t f1f1_2 = f1_2 * (int64_t) f1;
656
- int64_t f1f2_2 = f1_2 * (int64_t) f2;
657
- int64_t f1f3_4 = f1_2 * (int64_t) f3_2;
658
- int64_t f1f4_2 = f1_2 * (int64_t) f4;
659
- int64_t f1f5_4 = f1_2 * (int64_t) f5_2;
660
- int64_t f1f6_2 = f1_2 * (int64_t) f6;
661
- int64_t f1f7_4 = f1_2 * (int64_t) f7_2;
662
- int64_t f1f8_2 = f1_2 * (int64_t) f8;
663
- int64_t f1f9_76 = f1_2 * (int64_t) f9_38;
664
- int64_t f2f2 = f2 * (int64_t) f2;
665
- int64_t f2f3_2 = f2_2 * (int64_t) f3;
666
- int64_t f2f4_2 = f2_2 * (int64_t) f4;
667
- int64_t f2f5_2 = f2_2 * (int64_t) f5;
668
- int64_t f2f6_2 = f2_2 * (int64_t) f6;
669
- int64_t f2f7_2 = f2_2 * (int64_t) f7;
670
- int64_t f2f8_38 = f2_2 * (int64_t) f8_19;
671
- int64_t f2f9_38 = f2 * (int64_t) f9_38;
672
- int64_t f3f3_2 = f3_2 * (int64_t) f3;
673
- int64_t f3f4_2 = f3_2 * (int64_t) f4;
674
- int64_t f3f5_4 = f3_2 * (int64_t) f5_2;
675
- int64_t f3f6_2 = f3_2 * (int64_t) f6;
676
- int64_t f3f7_76 = f3_2 * (int64_t) f7_38;
677
- int64_t f3f8_38 = f3_2 * (int64_t) f8_19;
678
- int64_t f3f9_76 = f3_2 * (int64_t) f9_38;
679
- int64_t f4f4 = f4 * (int64_t) f4;
680
- int64_t f4f5_2 = f4_2 * (int64_t) f5;
681
- int64_t f4f6_38 = f4_2 * (int64_t) f6_19;
682
- int64_t f4f7_38 = f4 * (int64_t) f7_38;
683
- int64_t f4f8_38 = f4_2 * (int64_t) f8_19;
684
- int64_t f4f9_38 = f4 * (int64_t) f9_38;
685
- int64_t f5f5_38 = f5 * (int64_t) f5_38;
686
- int64_t f5f6_38 = f5_2 * (int64_t) f6_19;
687
- int64_t f5f7_76 = f5_2 * (int64_t) f7_38;
688
- int64_t f5f8_38 = f5_2 * (int64_t) f8_19;
689
- int64_t f5f9_76 = f5_2 * (int64_t) f9_38;
690
- int64_t f6f6_19 = f6 * (int64_t) f6_19;
691
- int64_t f6f7_38 = f6 * (int64_t) f7_38;
692
- int64_t f6f8_38 = f6_2 * (int64_t) f8_19;
693
- int64_t f6f9_38 = f6 * (int64_t) f9_38;
694
- int64_t f7f7_38 = f7 * (int64_t) f7_38;
695
- int64_t f7f8_38 = f7_2 * (int64_t) f8_19;
696
- int64_t f7f9_76 = f7_2 * (int64_t) f9_38;
697
- int64_t f8f8_19 = f8 * (int64_t) f8_19;
698
- int64_t f8f9_38 = f8 * (int64_t) f9_38;
699
- int64_t f9f9_38 = f9 * (int64_t) f9_38;
700
-
701
- int64_t h0 = f0f0 + f1f9_76 + f2f8_38 + f3f7_76 + f4f6_38 + f5f5_38;
702
- int64_t h1 = f0f1_2 + f2f9_38 + f3f8_38 + f4f7_38 + f5f6_38;
703
- int64_t h2 = f0f2_2 + f1f1_2 + f3f9_76 + f4f8_38 + f5f7_76 + f6f6_19;
704
- int64_t h3 = f0f3_2 + f1f2_2 + f4f9_38 + f5f8_38 + f6f7_38;
705
- int64_t h4 = f0f4_2 + f1f3_4 + f2f2 + f5f9_76 + f6f8_38 + f7f7_38;
706
- int64_t h5 = f0f5_2 + f1f4_2 + f2f3_2 + f6f9_38 + f7f8_38;
707
- int64_t h6 = f0f6_2 + f1f5_4 + f2f4_2 + f3f3_2 + f7f9_76 + f8f8_19;
708
- int64_t h7 = f0f7_2 + f1f6_2 + f2f5_2 + f3f4_2 + f8f9_38;
709
- int64_t h8 = f0f8_2 + f1f7_4 + f2f6_2 + f3f5_4 + f4f4 + f9f9_38;
710
- int64_t h9 = f0f9_2 + f1f8_2 + f2f7_2 + f3f6_2 + f4f5_2;
711
-
712
- int64_t carry0;
713
- int64_t carry1;
714
- int64_t carry2;
715
- int64_t carry3;
716
- int64_t carry4;
717
- int64_t carry5;
718
- int64_t carry6;
719
- int64_t carry7;
720
- int64_t carry8;
721
- int64_t carry9;
722
-
723
- carry0 = (h0 + (int64_t)(1L << 25)) >> 26;
724
- h1 += carry0;
725
- h0 -= carry0 * ((uint64_t) 1L << 26);
726
- carry4 = (h4 + (int64_t)(1L << 25)) >> 26;
727
- h5 += carry4;
728
- h4 -= carry4 * ((uint64_t) 1L << 26);
729
-
730
- carry1 = (h1 + (int64_t)(1L << 24)) >> 25;
731
- h2 += carry1;
732
- h1 -= carry1 * ((uint64_t) 1L << 25);
733
- carry5 = (h5 + (int64_t)(1L << 24)) >> 25;
734
- h6 += carry5;
735
- h5 -= carry5 * ((uint64_t) 1L << 25);
736
-
737
- carry2 = (h2 + (int64_t)(1L << 25)) >> 26;
738
- h3 += carry2;
739
- h2 -= carry2 * ((uint64_t) 1L << 26);
740
- carry6 = (h6 + (int64_t)(1L << 25)) >> 26;
741
- h7 += carry6;
742
- h6 -= carry6 * ((uint64_t) 1L << 26);
743
-
744
- carry3 = (h3 + (int64_t)(1L << 24)) >> 25;
745
- h4 += carry3;
746
- h3 -= carry3 * ((uint64_t) 1L << 25);
747
- carry7 = (h7 + (int64_t)(1L << 24)) >> 25;
748
- h8 += carry7;
749
- h7 -= carry7 * ((uint64_t) 1L << 25);
750
-
751
- carry4 = (h4 + (int64_t)(1L << 25)) >> 26;
752
- h5 += carry4;
753
- h4 -= carry4 * ((uint64_t) 1L << 26);
754
- carry8 = (h8 + (int64_t)(1L << 25)) >> 26;
755
- h9 += carry8;
756
- h8 -= carry8 * ((uint64_t) 1L << 26);
757
-
758
- carry9 = (h9 + (int64_t)(1L << 24)) >> 25;
759
- h0 += carry9 * 19;
760
- h9 -= carry9 * ((uint64_t) 1L << 25);
761
-
762
- carry0 = (h0 + (int64_t)(1L << 25)) >> 26;
763
- h1 += carry0;
764
- h0 -= carry0 * ((uint64_t) 1L << 26);
765
-
766
- h[0] = (int32_t) h0;
767
- h[1] = (int32_t) h1;
768
- h[2] = (int32_t) h2;
769
- h[3] = (int32_t) h3;
770
- h[4] = (int32_t) h4;
771
- h[5] = (int32_t) h5;
772
- h[6] = (int32_t) h6;
773
- h[7] = (int32_t) h7;
774
- h[8] = (int32_t) h8;
775
- h[9] = (int32_t) h9;
776
- }
777
-
778
- /*
779
- h = 2 * f * f
780
- Can overlap h with f.
781
- *
782
- Preconditions:
783
- |f| bounded by 1.65*2^26,1.65*2^25,1.65*2^26,1.65*2^25,etc.
784
- *
785
- Postconditions:
786
- |h| bounded by 1.01*2^25,1.01*2^24,1.01*2^25,1.01*2^24,etc.
787
- */
788
-
789
- static void
790
- fe25519_sq2(fe25519 h, const fe25519 f)
791
- {
792
- int32_t f0 = f[0];
793
- int32_t f1 = f[1];
794
- int32_t f2 = f[2];
795
- int32_t f3 = f[3];
796
- int32_t f4 = f[4];
797
- int32_t f5 = f[5];
798
- int32_t f6 = f[6];
799
- int32_t f7 = f[7];
800
- int32_t f8 = f[8];
801
- int32_t f9 = f[9];
802
-
803
- int32_t f0_2 = 2 * f0;
804
- int32_t f1_2 = 2 * f1;
805
- int32_t f2_2 = 2 * f2;
806
- int32_t f3_2 = 2 * f3;
807
- int32_t f4_2 = 2 * f4;
808
- int32_t f5_2 = 2 * f5;
809
- int32_t f6_2 = 2 * f6;
810
- int32_t f7_2 = 2 * f7;
811
- int32_t f5_38 = 38 * f5; /* 1.959375*2^30 */
812
- int32_t f6_19 = 19 * f6; /* 1.959375*2^30 */
813
- int32_t f7_38 = 38 * f7; /* 1.959375*2^30 */
814
- int32_t f8_19 = 19 * f8; /* 1.959375*2^30 */
815
- int32_t f9_38 = 38 * f9; /* 1.959375*2^30 */
816
-
817
- int64_t f0f0 = f0 * (int64_t) f0;
818
- int64_t f0f1_2 = f0_2 * (int64_t) f1;
819
- int64_t f0f2_2 = f0_2 * (int64_t) f2;
820
- int64_t f0f3_2 = f0_2 * (int64_t) f3;
821
- int64_t f0f4_2 = f0_2 * (int64_t) f4;
822
- int64_t f0f5_2 = f0_2 * (int64_t) f5;
823
- int64_t f0f6_2 = f0_2 * (int64_t) f6;
824
- int64_t f0f7_2 = f0_2 * (int64_t) f7;
825
- int64_t f0f8_2 = f0_2 * (int64_t) f8;
826
- int64_t f0f9_2 = f0_2 * (int64_t) f9;
827
- int64_t f1f1_2 = f1_2 * (int64_t) f1;
828
- int64_t f1f2_2 = f1_2 * (int64_t) f2;
829
- int64_t f1f3_4 = f1_2 * (int64_t) f3_2;
830
- int64_t f1f4_2 = f1_2 * (int64_t) f4;
831
- int64_t f1f5_4 = f1_2 * (int64_t) f5_2;
832
- int64_t f1f6_2 = f1_2 * (int64_t) f6;
833
- int64_t f1f7_4 = f1_2 * (int64_t) f7_2;
834
- int64_t f1f8_2 = f1_2 * (int64_t) f8;
835
- int64_t f1f9_76 = f1_2 * (int64_t) f9_38;
836
- int64_t f2f2 = f2 * (int64_t) f2;
837
- int64_t f2f3_2 = f2_2 * (int64_t) f3;
838
- int64_t f2f4_2 = f2_2 * (int64_t) f4;
839
- int64_t f2f5_2 = f2_2 * (int64_t) f5;
840
- int64_t f2f6_2 = f2_2 * (int64_t) f6;
841
- int64_t f2f7_2 = f2_2 * (int64_t) f7;
842
- int64_t f2f8_38 = f2_2 * (int64_t) f8_19;
843
- int64_t f2f9_38 = f2 * (int64_t) f9_38;
844
- int64_t f3f3_2 = f3_2 * (int64_t) f3;
845
- int64_t f3f4_2 = f3_2 * (int64_t) f4;
846
- int64_t f3f5_4 = f3_2 * (int64_t) f5_2;
847
- int64_t f3f6_2 = f3_2 * (int64_t) f6;
848
- int64_t f3f7_76 = f3_2 * (int64_t) f7_38;
849
- int64_t f3f8_38 = f3_2 * (int64_t) f8_19;
850
- int64_t f3f9_76 = f3_2 * (int64_t) f9_38;
851
- int64_t f4f4 = f4 * (int64_t) f4;
852
- int64_t f4f5_2 = f4_2 * (int64_t) f5;
853
- int64_t f4f6_38 = f4_2 * (int64_t) f6_19;
854
- int64_t f4f7_38 = f4 * (int64_t) f7_38;
855
- int64_t f4f8_38 = f4_2 * (int64_t) f8_19;
856
- int64_t f4f9_38 = f4 * (int64_t) f9_38;
857
- int64_t f5f5_38 = f5 * (int64_t) f5_38;
858
- int64_t f5f6_38 = f5_2 * (int64_t) f6_19;
859
- int64_t f5f7_76 = f5_2 * (int64_t) f7_38;
860
- int64_t f5f8_38 = f5_2 * (int64_t) f8_19;
861
- int64_t f5f9_76 = f5_2 * (int64_t) f9_38;
862
- int64_t f6f6_19 = f6 * (int64_t) f6_19;
863
- int64_t f6f7_38 = f6 * (int64_t) f7_38;
864
- int64_t f6f8_38 = f6_2 * (int64_t) f8_19;
865
- int64_t f6f9_38 = f6 * (int64_t) f9_38;
866
- int64_t f7f7_38 = f7 * (int64_t) f7_38;
867
- int64_t f7f8_38 = f7_2 * (int64_t) f8_19;
868
- int64_t f7f9_76 = f7_2 * (int64_t) f9_38;
869
- int64_t f8f8_19 = f8 * (int64_t) f8_19;
870
- int64_t f8f9_38 = f8 * (int64_t) f9_38;
871
- int64_t f9f9_38 = f9 * (int64_t) f9_38;
872
-
873
- int64_t h0 = f0f0 + f1f9_76 + f2f8_38 + f3f7_76 + f4f6_38 + f5f5_38;
874
- int64_t h1 = f0f1_2 + f2f9_38 + f3f8_38 + f4f7_38 + f5f6_38;
875
- int64_t h2 = f0f2_2 + f1f1_2 + f3f9_76 + f4f8_38 + f5f7_76 + f6f6_19;
876
- int64_t h3 = f0f3_2 + f1f2_2 + f4f9_38 + f5f8_38 + f6f7_38;
877
- int64_t h4 = f0f4_2 + f1f3_4 + f2f2 + f5f9_76 + f6f8_38 + f7f7_38;
878
- int64_t h5 = f0f5_2 + f1f4_2 + f2f3_2 + f6f9_38 + f7f8_38;
879
- int64_t h6 = f0f6_2 + f1f5_4 + f2f4_2 + f3f3_2 + f7f9_76 + f8f8_19;
880
- int64_t h7 = f0f7_2 + f1f6_2 + f2f5_2 + f3f4_2 + f8f9_38;
881
- int64_t h8 = f0f8_2 + f1f7_4 + f2f6_2 + f3f5_4 + f4f4 + f9f9_38;
882
- int64_t h9 = f0f9_2 + f1f8_2 + f2f7_2 + f3f6_2 + f4f5_2;
883
-
884
- int64_t carry0;
885
- int64_t carry1;
886
- int64_t carry2;
887
- int64_t carry3;
888
- int64_t carry4;
889
- int64_t carry5;
890
- int64_t carry6;
891
- int64_t carry7;
892
- int64_t carry8;
893
- int64_t carry9;
894
-
895
- h0 += h0;
896
- h1 += h1;
897
- h2 += h2;
898
- h3 += h3;
899
- h4 += h4;
900
- h5 += h5;
901
- h6 += h6;
902
- h7 += h7;
903
- h8 += h8;
904
- h9 += h9;
905
-
906
- carry0 = (h0 + (int64_t)(1L << 25)) >> 26;
907
- h1 += carry0;
908
- h0 -= carry0 * ((uint64_t) 1L << 26);
909
- carry4 = (h4 + (int64_t)(1L << 25)) >> 26;
910
- h5 += carry4;
911
- h4 -= carry4 * ((uint64_t) 1L << 26);
912
-
913
- carry1 = (h1 + (int64_t)(1L << 24)) >> 25;
914
- h2 += carry1;
915
- h1 -= carry1 * ((uint64_t) 1L << 25);
916
- carry5 = (h5 + (int64_t)(1L << 24)) >> 25;
917
- h6 += carry5;
918
- h5 -= carry5 * ((uint64_t) 1L << 25);
919
-
920
- carry2 = (h2 + (int64_t)(1L << 25)) >> 26;
921
- h3 += carry2;
922
- h2 -= carry2 * ((uint64_t) 1L << 26);
923
- carry6 = (h6 + (int64_t)(1L << 25)) >> 26;
924
- h7 += carry6;
925
- h6 -= carry6 * ((uint64_t) 1L << 26);
926
-
927
- carry3 = (h3 + (int64_t)(1L << 24)) >> 25;
928
- h4 += carry3;
929
- h3 -= carry3 * ((uint64_t) 1L << 25);
930
- carry7 = (h7 + (int64_t)(1L << 24)) >> 25;
931
- h8 += carry7;
932
- h7 -= carry7 * ((uint64_t) 1L << 25);
933
-
934
- carry4 = (h4 + (int64_t)(1L << 25)) >> 26;
935
- h5 += carry4;
936
- h4 -= carry4 * ((uint64_t) 1L << 26);
937
- carry8 = (h8 + (int64_t)(1L << 25)) >> 26;
938
- h9 += carry8;
939
- h8 -= carry8 * ((uint64_t) 1L << 26);
940
-
941
- carry9 = (h9 + (int64_t)(1L << 24)) >> 25;
942
- h0 += carry9 * 19;
943
- h9 -= carry9 * ((uint64_t) 1L << 25);
944
-
945
- carry0 = (h0 + (int64_t)(1L << 25)) >> 26;
946
- h1 += carry0;
947
- h0 -= carry0 * ((uint64_t) 1L << 26);
948
-
949
- h[0] = (int32_t) h0;
950
- h[1] = (int32_t) h1;
951
- h[2] = (int32_t) h2;
952
- h[3] = (int32_t) h3;
953
- h[4] = (int32_t) h4;
954
- h[5] = (int32_t) h5;
955
- h[6] = (int32_t) h6;
956
- h[7] = (int32_t) h7;
957
- h[8] = (int32_t) h8;
958
- h[9] = (int32_t) h9;
959
- }
960
-
961
- static inline void
962
- fe25519_mul32(fe25519 h, const fe25519 f, uint32_t n)
963
- {
964
- int64_t sn = (int64_t) n;
965
- int32_t f0 = f[0];
966
- int32_t f1 = f[1];
967
- int32_t f2 = f[2];
968
- int32_t f3 = f[3];
969
- int32_t f4 = f[4];
970
- int32_t f5 = f[5];
971
- int32_t f6 = f[6];
972
- int32_t f7 = f[7];
973
- int32_t f8 = f[8];
974
- int32_t f9 = f[9];
975
- int64_t h0 = f0 * sn;
976
- int64_t h1 = f1 * sn;
977
- int64_t h2 = f2 * sn;
978
- int64_t h3 = f3 * sn;
979
- int64_t h4 = f4 * sn;
980
- int64_t h5 = f5 * sn;
981
- int64_t h6 = f6 * sn;
982
- int64_t h7 = f7 * sn;
983
- int64_t h8 = f8 * sn;
984
- int64_t h9 = f9 * sn;
985
- int64_t carry0, carry1, carry2, carry3, carry4, carry5, carry6, carry7,
986
- carry8, carry9;
987
-
988
- carry9 = (h9 + ((int64_t) 1 << 24)) >> 25;
989
- h0 += carry9 * 19;
990
- h9 -= carry9 * ((int64_t) 1 << 25);
991
- carry1 = (h1 + ((int64_t) 1 << 24)) >> 25;
992
- h2 += carry1;
993
- h1 -= carry1 * ((int64_t) 1 << 25);
994
- carry3 = (h3 + ((int64_t) 1 << 24)) >> 25;
995
- h4 += carry3;
996
- h3 -= carry3 * ((int64_t) 1 << 25);
997
- carry5 = (h5 + ((int64_t) 1 << 24)) >> 25;
998
- h6 += carry5;
999
- h5 -= carry5 * ((int64_t) 1 << 25);
1000
- carry7 = (h7 + ((int64_t) 1 << 24)) >> 25;
1001
- h8 += carry7;
1002
- h7 -= carry7 * ((int64_t) 1 << 25);
1003
-
1004
- carry0 = (h0 + ((int64_t) 1 << 25)) >> 26;
1005
- h1 += carry0;
1006
- h0 -= carry0 * ((int64_t) 1 << 26);
1007
- carry2 = (h2 + ((int64_t) 1 << 25)) >> 26;
1008
- h3 += carry2;
1009
- h2 -= carry2 * ((int64_t) 1 << 26);
1010
- carry4 = (h4 + ((int64_t) 1 << 25)) >> 26;
1011
- h5 += carry4;
1012
- h4 -= carry4 * ((int64_t) 1 << 26);
1013
- carry6 = (h6 + ((int64_t) 1 << 25)) >> 26;
1014
- h7 += carry6;
1015
- h6 -= carry6 * ((int64_t) 1 << 26);
1016
- carry8 = (h8 + ((int64_t) 1 << 25)) >> 26;
1017
- h9 += carry8;
1018
- h8 -= carry8 * ((int64_t) 1 << 26);
1019
-
1020
- h[0] = (int32_t) h0;
1021
- h[1] = (int32_t) h1;
1022
- h[2] = (int32_t) h2;
1023
- h[3] = (int32_t) h3;
1024
- h[4] = (int32_t) h4;
1025
- h[5] = (int32_t) h5;
1026
- h[6] = (int32_t) h6;
1027
- h[7] = (int32_t) h7;
1028
- h[8] = (int32_t) h8;
1029
- h[9] = (int32_t) h9;
1030
- }