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

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 (629) hide show
  1. package/app.plugin.js +3 -0
  2. package/ios/libsodium-stable/.github/workflows/autocloser.yml +12 -0
  3. package/ios/libsodium-stable/.github/workflows/ci.yml +180 -0
  4. package/ios/libsodium-stable/.github/workflows/cifuzz.yml +32 -0
  5. package/ios/libsodium-stable/.github/workflows/codeql-analysis.yml +48 -0
  6. package/ios/libsodium-stable/.github/workflows/dotnet-core.yml +388 -0
  7. package/ios/libsodium-stable/AUTHORS +144 -0
  8. package/ios/libsodium-stable/CITATION.cff +18 -0
  9. package/ios/libsodium-stable/ChangeLog +658 -0
  10. package/ios/libsodium-stable/LICENSE +18 -0
  11. package/ios/libsodium-stable/Makefile.am +23 -0
  12. package/ios/libsodium-stable/README.markdown +76 -0
  13. package/ios/libsodium-stable/THANKS +92 -0
  14. package/ios/libsodium-stable/appveyor.yml +24 -0
  15. package/ios/libsodium-stable/autogen.sh +117 -0
  16. package/ios/libsodium-stable/azure-pipelines.yml +122 -0
  17. package/ios/libsodium-stable/build.zig +281 -0
  18. package/ios/libsodium-stable/builds/Makefile.am +81 -0
  19. package/ios/libsodium-stable/builds/msvc/build/buildall.bat +18 -0
  20. package/ios/libsodium-stable/builds/msvc/build/buildbase.bat +132 -0
  21. package/ios/libsodium-stable/builds/msvc/properties/ARM64.props +23 -0
  22. package/ios/libsodium-stable/builds/msvc/properties/Common.props +21 -0
  23. package/ios/libsodium-stable/builds/msvc/properties/DLL.props +16 -0
  24. package/ios/libsodium-stable/builds/msvc/properties/Debug.props +29 -0
  25. package/ios/libsodium-stable/builds/msvc/properties/DebugDEXE.props +21 -0
  26. package/ios/libsodium-stable/builds/msvc/properties/DebugDLL.props +20 -0
  27. package/ios/libsodium-stable/builds/msvc/properties/DebugLEXE.props +20 -0
  28. package/ios/libsodium-stable/builds/msvc/properties/DebugLIB.props +21 -0
  29. package/ios/libsodium-stable/builds/msvc/properties/DebugLTCG.props +20 -0
  30. package/ios/libsodium-stable/builds/msvc/properties/DebugSEXE.props +21 -0
  31. package/ios/libsodium-stable/builds/msvc/properties/EXE.props +17 -0
  32. package/ios/libsodium-stable/builds/msvc/properties/LIB.props +16 -0
  33. package/ios/libsodium-stable/builds/msvc/properties/LTCG.props +13 -0
  34. package/ios/libsodium-stable/builds/msvc/properties/Link.props +21 -0
  35. package/ios/libsodium-stable/builds/msvc/properties/Messages.props +15 -0
  36. package/ios/libsodium-stable/builds/msvc/properties/Output.props +30 -0
  37. package/ios/libsodium-stable/builds/msvc/properties/Release.props +41 -0
  38. package/ios/libsodium-stable/builds/msvc/properties/ReleaseDEXE.props +20 -0
  39. package/ios/libsodium-stable/builds/msvc/properties/ReleaseDLL.props +19 -0
  40. package/ios/libsodium-stable/builds/msvc/properties/ReleaseLEXE.props +20 -0
  41. package/ios/libsodium-stable/builds/msvc/properties/ReleaseLIB.props +19 -0
  42. package/ios/libsodium-stable/builds/msvc/properties/ReleaseLTCG.props +19 -0
  43. package/ios/libsodium-stable/builds/msvc/properties/ReleaseSEXE.props +20 -0
  44. package/ios/libsodium-stable/builds/msvc/properties/Win32.props +23 -0
  45. package/ios/libsodium-stable/builds/msvc/properties/x64.props +26 -0
  46. package/ios/libsodium-stable/builds/msvc/resource.h +14 -0
  47. package/ios/libsodium-stable/builds/msvc/resource.rc +65 -0
  48. package/ios/libsodium-stable/builds/msvc/version.h +33 -0
  49. package/ios/libsodium-stable/builds/msvc/vs2010/libsodium/libsodium.props +48 -0
  50. package/ios/libsodium-stable/builds/msvc/vs2010/libsodium/libsodium.vcxproj +346 -0
  51. package/ios/libsodium-stable/builds/msvc/vs2010/libsodium/libsodium.vcxproj.filters +1088 -0
  52. package/ios/libsodium-stable/builds/msvc/vs2010/libsodium/libsodium.xml +15 -0
  53. package/ios/libsodium-stable/builds/msvc/vs2010/libsodium.import.props +52 -0
  54. package/ios/libsodium-stable/builds/msvc/vs2010/libsodium.import.xml +17 -0
  55. package/ios/libsodium-stable/builds/msvc/vs2010/libsodium.sln +50 -0
  56. package/ios/libsodium-stable/builds/msvc/vs2012/libsodium/libsodium.props +48 -0
  57. package/ios/libsodium-stable/builds/msvc/vs2012/libsodium/libsodium.vcxproj +346 -0
  58. package/ios/libsodium-stable/builds/msvc/vs2012/libsodium/libsodium.vcxproj.filters +1088 -0
  59. package/ios/libsodium-stable/builds/msvc/vs2012/libsodium/libsodium.xml +15 -0
  60. package/ios/libsodium-stable/builds/msvc/vs2012/libsodium.import.props +52 -0
  61. package/ios/libsodium-stable/builds/msvc/vs2012/libsodium.import.xml +17 -0
  62. package/ios/libsodium-stable/builds/msvc/vs2012/libsodium.sln +50 -0
  63. package/ios/libsodium-stable/builds/msvc/vs2013/libsodium/libsodium.props +48 -0
  64. package/ios/libsodium-stable/builds/msvc/vs2013/libsodium/libsodium.vcxproj +346 -0
  65. package/ios/libsodium-stable/builds/msvc/vs2013/libsodium/libsodium.vcxproj.filters +1088 -0
  66. package/ios/libsodium-stable/builds/msvc/vs2013/libsodium/libsodium.xml +15 -0
  67. package/ios/libsodium-stable/builds/msvc/vs2013/libsodium.import.props +52 -0
  68. package/ios/libsodium-stable/builds/msvc/vs2013/libsodium.import.xml +17 -0
  69. package/ios/libsodium-stable/builds/msvc/vs2013/libsodium.sln +52 -0
  70. package/ios/libsodium-stable/builds/msvc/vs2015/libsodium/libsodium.props +48 -0
  71. package/ios/libsodium-stable/builds/msvc/vs2015/libsodium/libsodium.vcxproj +346 -0
  72. package/ios/libsodium-stable/builds/msvc/vs2015/libsodium/libsodium.vcxproj.filters +1088 -0
  73. package/ios/libsodium-stable/builds/msvc/vs2015/libsodium/libsodium.xml +15 -0
  74. package/ios/libsodium-stable/builds/msvc/vs2015/libsodium.import.props +52 -0
  75. package/ios/libsodium-stable/builds/msvc/vs2015/libsodium.import.xml +17 -0
  76. package/ios/libsodium-stable/builds/msvc/vs2015/libsodium.sln +52 -0
  77. package/ios/libsodium-stable/builds/msvc/vs2017/libsodium/libsodium.props +48 -0
  78. package/ios/libsodium-stable/builds/msvc/vs2017/libsodium/libsodium.vcxproj +346 -0
  79. package/ios/libsodium-stable/builds/msvc/vs2017/libsodium/libsodium.vcxproj.filters +1088 -0
  80. package/ios/libsodium-stable/builds/msvc/vs2017/libsodium/libsodium.xml +15 -0
  81. package/ios/libsodium-stable/builds/msvc/vs2017/libsodium.import.props +52 -0
  82. package/ios/libsodium-stable/builds/msvc/vs2017/libsodium.import.xml +17 -0
  83. package/ios/libsodium-stable/builds/msvc/vs2017/libsodium.sln +52 -0
  84. package/ios/libsodium-stable/builds/msvc/vs2019/libsodium/libsodium.props +48 -0
  85. package/ios/libsodium-stable/builds/msvc/vs2019/libsodium/libsodium.vcxproj +370 -0
  86. package/ios/libsodium-stable/builds/msvc/vs2019/libsodium/libsodium.vcxproj.filters +1088 -0
  87. package/ios/libsodium-stable/builds/msvc/vs2019/libsodium/libsodium.xml +15 -0
  88. package/ios/libsodium-stable/builds/msvc/vs2019/libsodium.import.props +52 -0
  89. package/ios/libsodium-stable/builds/msvc/vs2019/libsodium.import.xml +17 -0
  90. package/ios/libsodium-stable/builds/msvc/vs2019/libsodium.sln +52 -0
  91. package/ios/libsodium-stable/builds/msvc/vs2022/libsodium/libsodium.props +48 -0
  92. package/ios/libsodium-stable/builds/msvc/vs2022/libsodium/libsodium.vcxproj +370 -0
  93. package/ios/libsodium-stable/builds/msvc/vs2022/libsodium/libsodium.vcxproj.filters +1088 -0
  94. package/ios/libsodium-stable/builds/msvc/vs2022/libsodium/libsodium.xml +15 -0
  95. package/ios/libsodium-stable/builds/msvc/vs2022/libsodium.import.props +52 -0
  96. package/ios/libsodium-stable/builds/msvc/vs2022/libsodium.import.xml +17 -0
  97. package/ios/libsodium-stable/builds/msvc/vs2022/libsodium.sln +70 -0
  98. package/ios/libsodium-stable/ci/appveyor/libsodium.sln +40 -0
  99. package/ios/libsodium-stable/ci/appveyor/libsodium.vcxproj +594 -0
  100. package/ios/libsodium-stable/ci/appveyor/libsodium.vcxproj.filters +813 -0
  101. package/ios/libsodium-stable/ci/appveyor/msvc-scripts/process.bat +5 -0
  102. package/ios/libsodium-stable/ci/appveyor/msvc-scripts/rep.vbs +12 -0
  103. package/ios/libsodium-stable/ci/appveyor/msvc-scripts/sodium.props +29 -0
  104. package/ios/libsodium-stable/configure.ac +1004 -0
  105. package/ios/libsodium-stable/contrib/Findsodium.cmake +297 -0
  106. package/ios/libsodium-stable/contrib/Makefile.am +3 -0
  107. package/ios/libsodium-stable/dist-build/Makefile.am +14 -0
  108. package/ios/libsodium-stable/dist-build/android-aar.sh +194 -0
  109. package/ios/libsodium-stable/dist-build/android-armv7-a.sh +5 -0
  110. package/ios/libsodium-stable/dist-build/android-armv8-a.sh +5 -0
  111. package/ios/libsodium-stable/dist-build/android-build.sh +95 -0
  112. package/ios/libsodium-stable/dist-build/android-x86.sh +5 -0
  113. package/ios/libsodium-stable/dist-build/android-x86_64.sh +5 -0
  114. package/ios/libsodium-stable/dist-build/apple-xcframework.sh +628 -0
  115. package/ios/libsodium-stable/dist-build/emscripten-symbols.def +651 -0
  116. package/ios/libsodium-stable/dist-build/emscripten.sh +206 -0
  117. package/ios/libsodium-stable/dist-build/generate-emscripten-symbols.sh +59 -0
  118. package/ios/libsodium-stable/dist-build/macos.sh +26 -0
  119. package/ios/libsodium-stable/dist-build/msys2-win32.sh +18 -0
  120. package/ios/libsodium-stable/dist-build/msys2-win64.sh +18 -0
  121. package/ios/libsodium-stable/dist-build/wasm32-wasi.sh +45 -0
  122. package/ios/libsodium-stable/lgtm.yml +6 -0
  123. package/ios/libsodium-stable/libsodium-uninstalled.pc.in +7 -0
  124. package/ios/libsodium-stable/libsodium.pc.in +12 -0
  125. package/ios/libsodium-stable/logo.png +0 -0
  126. package/ios/libsodium-stable/m4/ax_add_fortify_source.m4 +121 -0
  127. package/ios/libsodium-stable/m4/ax_check_catchable_abrt.m4 +57 -0
  128. package/ios/libsodium-stable/m4/ax_check_catchable_segv.m4 +47 -0
  129. package/ios/libsodium-stable/m4/ax_check_compile_flag.m4 +55 -0
  130. package/ios/libsodium-stable/m4/ax_check_define.m4 +73 -0
  131. package/ios/libsodium-stable/m4/ax_check_gnu_make.m4 +95 -0
  132. package/ios/libsodium-stable/m4/ax_check_link_flag.m4 +75 -0
  133. package/ios/libsodium-stable/m4/ax_pthread.m4 +522 -0
  134. package/ios/libsodium-stable/m4/ax_tls.m4 +71 -0
  135. package/ios/libsodium-stable/m4/ax_valgrind_check.m4 +241 -0
  136. package/ios/libsodium-stable/m4/ld-output-def.m4 +29 -0
  137. package/ios/libsodium-stable/packaging/dotnet-core/libsodium.pkgproj +49 -0
  138. package/ios/libsodium-stable/packaging/dotnet-core/test.cs +43 -0
  139. package/ios/libsodium-stable/packaging/nuget/package.bat +13 -0
  140. package/ios/libsodium-stable/packaging/nuget/package.config +4 -0
  141. package/ios/libsodium-stable/packaging/nuget/package.gsl +260 -0
  142. package/ios/libsodium-stable/regen-msvc/libsodium.vcxproj +326 -0
  143. package/ios/libsodium-stable/regen-msvc/libsodium.vcxproj.filters +23 -0
  144. package/ios/libsodium-stable/regen-msvc/libsodium.vcxproj.filters.tpl +35 -0
  145. package/ios/libsodium-stable/regen-msvc/libsodium.vcxproj.tpl +37 -0
  146. package/ios/libsodium-stable/regen-msvc/regen-msvc.py +240 -0
  147. package/ios/libsodium-stable/regen-msvc/tl_libsodium.vcxproj.filters.tpl +23 -0
  148. package/ios/libsodium-stable/regen-msvc/tl_libsodium.vcxproj.tpl +332 -0
  149. package/ios/libsodium-stable/src/Makefile.am +3 -0
  150. package/ios/libsodium-stable/src/libsodium/Makefile.am +314 -0
  151. package/ios/libsodium-stable/src/libsodium/crypto_aead/aegis128l/aead_aegis128l.c +159 -0
  152. package/ios/libsodium-stable/src/libsodium/crypto_aead/aegis128l/aegis128l_aesni.c +70 -0
  153. package/ios/libsodium-stable/src/libsodium/crypto_aead/aegis128l/aegis128l_aesni.h +8 -0
  154. package/ios/libsodium-stable/src/libsodium/crypto_aead/aegis128l/aegis128l_armcrypto.c +72 -0
  155. package/ios/libsodium-stable/src/libsodium/crypto_aead/aegis128l/aegis128l_armcrypto.h +8 -0
  156. package/ios/libsodium-stable/src/libsodium/crypto_aead/aegis128l/aegis128l_common.h +248 -0
  157. package/ios/libsodium-stable/src/libsodium/crypto_aead/aegis128l/aegis128l_soft.c +59 -0
  158. package/ios/libsodium-stable/src/libsodium/crypto_aead/aegis128l/aegis128l_soft.h +8 -0
  159. package/ios/libsodium-stable/src/libsodium/crypto_aead/aegis128l/implementations.h +17 -0
  160. package/ios/libsodium-stable/src/libsodium/crypto_aead/aegis256/aead_aegis256.c +158 -0
  161. package/ios/libsodium-stable/src/libsodium/crypto_aead/aegis256/aegis256_aesni.c +65 -0
  162. package/ios/libsodium-stable/src/libsodium/crypto_aead/aegis256/aegis256_aesni.h +8 -0
  163. package/ios/libsodium-stable/src/libsodium/crypto_aead/aegis256/aegis256_armcrypto.c +70 -0
  164. package/ios/libsodium-stable/src/libsodium/crypto_aead/aegis256/aegis256_armcrypto.h +8 -0
  165. package/ios/libsodium-stable/src/libsodium/crypto_aead/aegis256/aegis256_common.h +231 -0
  166. package/ios/libsodium-stable/src/libsodium/crypto_aead/aegis256/aegis256_soft.c +54 -0
  167. package/ios/libsodium-stable/src/libsodium/crypto_aead/aegis256/aegis256_soft.h +8 -0
  168. package/ios/libsodium-stable/src/libsodium/crypto_aead/aegis256/implementations.h +17 -0
  169. package/ios/libsodium-stable/src/libsodium/crypto_aead/aes256gcm/aead_aes256gcm.c +157 -0
  170. package/ios/libsodium-stable/src/libsodium/crypto_aead/aes256gcm/aesni/aead_aes256gcm_aesni.c +1015 -0
  171. package/ios/libsodium-stable/src/libsodium/crypto_aead/aes256gcm/armcrypto/aead_aes256gcm_armcrypto.c +1032 -0
  172. package/ios/libsodium-stable/src/libsodium/crypto_aead/chacha20poly1305/aead_chacha20poly1305.c +400 -0
  173. package/ios/libsodium-stable/src/libsodium/crypto_aead/xchacha20poly1305/aead_xchacha20poly1305.c +262 -0
  174. package/ios/libsodium-stable/src/libsodium/crypto_auth/crypto_auth.c +41 -0
  175. package/ios/libsodium-stable/src/libsodium/crypto_auth/hmacsha256/auth_hmacsha256.c +118 -0
  176. package/ios/libsodium-stable/src/libsodium/crypto_auth/hmacsha512/auth_hmacsha512.c +118 -0
  177. package/ios/libsodium-stable/src/libsodium/crypto_auth/hmacsha512256/auth_hmacsha512256.c +93 -0
  178. package/ios/libsodium-stable/src/libsodium/crypto_box/crypto_box.c +114 -0
  179. package/ios/libsodium-stable/src/libsodium/crypto_box/crypto_box_easy.c +115 -0
  180. package/ios/libsodium-stable/src/libsodium/crypto_box/crypto_box_seal.c +68 -0
  181. package/ios/libsodium-stable/src/libsodium/crypto_box/curve25519xchacha20poly1305/box_curve25519xchacha20poly1305.c +204 -0
  182. package/ios/libsodium-stable/src/libsodium/crypto_box/curve25519xchacha20poly1305/box_seal_curve25519xchacha20poly1305.c +79 -0
  183. package/ios/libsodium-stable/src/libsodium/crypto_box/curve25519xsalsa20poly1305/box_curve25519xsalsa20poly1305.c +156 -0
  184. package/ios/libsodium-stable/src/libsodium/crypto_core/ed25519/core_ed25519.c +225 -0
  185. package/ios/libsodium-stable/src/libsodium/crypto_core/ed25519/core_ristretto255.c +156 -0
  186. package/ios/libsodium-stable/src/libsodium/crypto_core/ed25519/ref10/ed25519_ref10.c +2873 -0
  187. package/ios/libsodium-stable/src/libsodium/crypto_core/ed25519/ref10/fe_25_5/base.h +1344 -0
  188. package/ios/libsodium-stable/src/libsodium/crypto_core/ed25519/ref10/fe_25_5/base2.h +40 -0
  189. package/ios/libsodium-stable/src/libsodium/crypto_core/ed25519/ref10/fe_25_5/constants.h +40 -0
  190. package/ios/libsodium-stable/src/libsodium/crypto_core/ed25519/ref10/fe_25_5/fe.h +220 -0
  191. package/ios/libsodium-stable/src/libsodium/crypto_core/ed25519/ref10/fe_51/base.h +1344 -0
  192. package/ios/libsodium-stable/src/libsodium/crypto_core/ed25519/ref10/fe_51/base2.h +40 -0
  193. package/ios/libsodium-stable/src/libsodium/crypto_core/ed25519/ref10/fe_51/constants.h +41 -0
  194. package/ios/libsodium-stable/src/libsodium/crypto_core/ed25519/ref10/fe_51/fe.h +116 -0
  195. package/ios/libsodium-stable/src/libsodium/crypto_core/hchacha20/core_hchacha20.c +93 -0
  196. package/ios/libsodium-stable/src/libsodium/crypto_core/hsalsa20/core_hsalsa20.c +21 -0
  197. package/ios/libsodium-stable/src/libsodium/crypto_core/hsalsa20/ref2/core_hsalsa20_ref2.c +95 -0
  198. package/ios/libsodium-stable/src/libsodium/crypto_core/salsa/ref/core_salsa_ref.c +195 -0
  199. package/ios/libsodium-stable/src/libsodium/crypto_core/softaes/softaes.c +340 -0
  200. package/ios/libsodium-stable/src/libsodium/crypto_generichash/blake2b/generichash_blake2.c +55 -0
  201. package/ios/libsodium-stable/src/libsodium/crypto_generichash/blake2b/ref/blake2.h +106 -0
  202. package/ios/libsodium-stable/src/libsodium/crypto_generichash/blake2b/ref/blake2b-compress-avx2.c +52 -0
  203. package/ios/libsodium-stable/src/libsodium/crypto_generichash/blake2b/ref/blake2b-compress-avx2.h +142 -0
  204. package/ios/libsodium-stable/src/libsodium/crypto_generichash/blake2b/ref/blake2b-compress-ref.c +93 -0
  205. package/ios/libsodium-stable/src/libsodium/crypto_generichash/blake2b/ref/blake2b-compress-sse41.c +91 -0
  206. package/ios/libsodium-stable/src/libsodium/crypto_generichash/blake2b/ref/blake2b-compress-sse41.h +106 -0
  207. package/ios/libsodium-stable/src/libsodium/crypto_generichash/blake2b/ref/blake2b-compress-ssse3.c +95 -0
  208. package/ios/libsodium-stable/src/libsodium/crypto_generichash/blake2b/ref/blake2b-compress-ssse3.h +106 -0
  209. package/ios/libsodium-stable/src/libsodium/crypto_generichash/blake2b/ref/blake2b-load-avx2.h +340 -0
  210. package/ios/libsodium-stable/src/libsodium/crypto_generichash/blake2b/ref/blake2b-load-sse2.h +164 -0
  211. package/ios/libsodium-stable/src/libsodium/crypto_generichash/blake2b/ref/blake2b-load-sse41.h +307 -0
  212. package/ios/libsodium-stable/src/libsodium/crypto_generichash/blake2b/ref/blake2b-ref.c +438 -0
  213. package/ios/libsodium-stable/src/libsodium/crypto_generichash/blake2b/ref/generichash_blake2b.c +116 -0
  214. package/ios/libsodium-stable/src/libsodium/crypto_generichash/crypto_generichash.c +91 -0
  215. package/ios/libsodium-stable/src/libsodium/crypto_hash/crypto_hash.c +20 -0
  216. package/ios/libsodium-stable/src/libsodium/crypto_hash/sha256/cp/hash_sha256_cp.c +256 -0
  217. package/ios/libsodium-stable/src/libsodium/crypto_hash/sha256/hash_sha256.c +13 -0
  218. package/ios/libsodium-stable/src/libsodium/crypto_hash/sha512/cp/hash_sha512_cp.c +284 -0
  219. package/ios/libsodium-stable/src/libsodium/crypto_hash/sha512/hash_sha512.c +13 -0
  220. package/ios/libsodium-stable/src/libsodium/crypto_kdf/blake2b/kdf_blake2b.c +52 -0
  221. package/ios/libsodium-stable/src/libsodium/crypto_kdf/crypto_kdf.c +49 -0
  222. package/ios/libsodium-stable/src/libsodium/crypto_kdf/hkdf/kdf_hkdf_sha256.c +123 -0
  223. package/ios/libsodium-stable/src/libsodium/crypto_kdf/hkdf/kdf_hkdf_sha512.c +123 -0
  224. package/ios/libsodium-stable/src/libsodium/crypto_kx/crypto_kx.c +143 -0
  225. package/ios/libsodium-stable/src/libsodium/crypto_onetimeauth/crypto_onetimeauth.c +71 -0
  226. package/ios/libsodium-stable/src/libsodium/crypto_onetimeauth/poly1305/donna/poly1305_donna.c +124 -0
  227. package/ios/libsodium-stable/src/libsodium/crypto_onetimeauth/poly1305/donna/poly1305_donna.h +12 -0
  228. package/ios/libsodium-stable/src/libsodium/crypto_onetimeauth/poly1305/donna/poly1305_donna32.h +235 -0
  229. package/ios/libsodium-stable/src/libsodium/crypto_onetimeauth/poly1305/donna/poly1305_donna64.h +221 -0
  230. package/ios/libsodium-stable/src/libsodium/crypto_onetimeauth/poly1305/onetimeauth_poly1305.c +90 -0
  231. package/ios/libsodium-stable/src/libsodium/crypto_onetimeauth/poly1305/onetimeauth_poly1305.h +21 -0
  232. package/ios/libsodium-stable/src/libsodium/crypto_onetimeauth/poly1305/sse2/poly1305_sse2.c +957 -0
  233. package/ios/libsodium-stable/src/libsodium/crypto_onetimeauth/poly1305/sse2/poly1305_sse2.h +12 -0
  234. package/ios/libsodium-stable/src/libsodium/crypto_pwhash/argon2/argon2-core.c +556 -0
  235. package/ios/libsodium-stable/src/libsodium/crypto_pwhash/argon2/argon2-core.h +271 -0
  236. package/ios/libsodium-stable/src/libsodium/crypto_pwhash/argon2/argon2-encoding.c +306 -0
  237. package/ios/libsodium-stable/src/libsodium/crypto_pwhash/argon2/argon2-encoding.h +34 -0
  238. package/ios/libsodium-stable/src/libsodium/crypto_pwhash/argon2/argon2-fill-block-avx2.c +243 -0
  239. package/ios/libsodium-stable/src/libsodium/crypto_pwhash/argon2/argon2-fill-block-avx512f.c +251 -0
  240. package/ios/libsodium-stable/src/libsodium/crypto_pwhash/argon2/argon2-fill-block-ref.c +234 -0
  241. package/ios/libsodium-stable/src/libsodium/crypto_pwhash/argon2/argon2-fill-block-ssse3.c +244 -0
  242. package/ios/libsodium-stable/src/libsodium/crypto_pwhash/argon2/argon2.c +283 -0
  243. package/ios/libsodium-stable/src/libsodium/crypto_pwhash/argon2/argon2.h +305 -0
  244. package/ios/libsodium-stable/src/libsodium/crypto_pwhash/argon2/blake2b-long.c +79 -0
  245. package/ios/libsodium-stable/src/libsodium/crypto_pwhash/argon2/blake2b-long.h +8 -0
  246. package/ios/libsodium-stable/src/libsodium/crypto_pwhash/argon2/blamka-round-avx2.h +150 -0
  247. package/ios/libsodium-stable/src/libsodium/crypto_pwhash/argon2/blamka-round-avx512f.h +145 -0
  248. package/ios/libsodium-stable/src/libsodium/crypto_pwhash/argon2/blamka-round-ref.h +40 -0
  249. package/ios/libsodium-stable/src/libsodium/crypto_pwhash/argon2/blamka-round-ssse3.h +124 -0
  250. package/ios/libsodium-stable/src/libsodium/crypto_pwhash/argon2/pwhash_argon2i.c +294 -0
  251. package/ios/libsodium-stable/src/libsodium/crypto_pwhash/argon2/pwhash_argon2id.c +238 -0
  252. package/ios/libsodium-stable/src/libsodium/crypto_pwhash/crypto_pwhash.c +212 -0
  253. package/ios/libsodium-stable/src/libsodium/crypto_pwhash/scryptsalsa208sha256/crypto_scrypt-common.c +268 -0
  254. package/ios/libsodium-stable/src/libsodium/crypto_pwhash/scryptsalsa208sha256/crypto_scrypt.h +92 -0
  255. package/ios/libsodium-stable/src/libsodium/crypto_pwhash/scryptsalsa208sha256/nosse/pwhash_scryptsalsa208sha256_nosse.c +318 -0
  256. package/ios/libsodium-stable/src/libsodium/crypto_pwhash/scryptsalsa208sha256/pbkdf2-sha256.c +96 -0
  257. package/ios/libsodium-stable/src/libsodium/crypto_pwhash/scryptsalsa208sha256/pbkdf2-sha256.h +45 -0
  258. package/ios/libsodium-stable/src/libsodium/crypto_pwhash/scryptsalsa208sha256/pwhash_scryptsalsa208sha256.c +301 -0
  259. package/ios/libsodium-stable/src/libsodium/crypto_pwhash/scryptsalsa208sha256/scrypt_platform.c +112 -0
  260. package/ios/libsodium-stable/src/libsodium/crypto_pwhash/scryptsalsa208sha256/sse/pwhash_scryptsalsa208sha256_sse.c +406 -0
  261. package/ios/libsodium-stable/src/libsodium/crypto_scalarmult/crypto_scalarmult.c +33 -0
  262. package/ios/libsodium-stable/src/libsodium/crypto_scalarmult/curve25519/ref10/x25519_ref10.c +182 -0
  263. package/ios/libsodium-stable/src/libsodium/crypto_scalarmult/curve25519/ref10/x25519_ref10.h +10 -0
  264. package/ios/libsodium-stable/src/libsodium/crypto_scalarmult/curve25519/sandy2x/consts.S +25 -0
  265. package/ios/libsodium-stable/src/libsodium/crypto_scalarmult/curve25519/sandy2x/consts_namespace.h +20 -0
  266. package/ios/libsodium-stable/src/libsodium/crypto_scalarmult/curve25519/sandy2x/curve25519_sandy2x.c +71 -0
  267. package/ios/libsodium-stable/src/libsodium/crypto_scalarmult/curve25519/sandy2x/curve25519_sandy2x.h +9 -0
  268. package/ios/libsodium-stable/src/libsodium/crypto_scalarmult/curve25519/sandy2x/fe.h +26 -0
  269. package/ios/libsodium-stable/src/libsodium/crypto_scalarmult/curve25519/sandy2x/fe51.h +35 -0
  270. package/ios/libsodium-stable/src/libsodium/crypto_scalarmult/curve25519/sandy2x/fe51_invert.c +58 -0
  271. package/ios/libsodium-stable/src/libsodium/crypto_scalarmult/curve25519/sandy2x/fe51_mul.S +200 -0
  272. package/ios/libsodium-stable/src/libsodium/crypto_scalarmult/curve25519/sandy2x/fe51_namespace.h +16 -0
  273. package/ios/libsodium-stable/src/libsodium/crypto_scalarmult/curve25519/sandy2x/fe51_nsquare.S +174 -0
  274. package/ios/libsodium-stable/src/libsodium/crypto_scalarmult/curve25519/sandy2x/fe51_pack.S +228 -0
  275. package/ios/libsodium-stable/src/libsodium/crypto_scalarmult/curve25519/sandy2x/fe_frombytes_sandy2x.c +78 -0
  276. package/ios/libsodium-stable/src/libsodium/crypto_scalarmult/curve25519/sandy2x/ladder.S +1442 -0
  277. package/ios/libsodium-stable/src/libsodium/crypto_scalarmult/curve25519/sandy2x/ladder.h +18 -0
  278. package/ios/libsodium-stable/src/libsodium/crypto_scalarmult/curve25519/sandy2x/ladder_namespace.h +8 -0
  279. package/ios/libsodium-stable/src/libsodium/crypto_scalarmult/curve25519/sandy2x/sandy2x.S +16 -0
  280. package/ios/libsodium-stable/src/libsodium/crypto_scalarmult/curve25519/scalarmult_curve25519.c +60 -0
  281. package/ios/libsodium-stable/src/libsodium/crypto_scalarmult/curve25519/scalarmult_curve25519.h +11 -0
  282. package/ios/libsodium-stable/src/libsodium/crypto_scalarmult/ed25519/ref10/scalarmult_ed25519_ref10.c +121 -0
  283. package/ios/libsodium-stable/src/libsodium/crypto_scalarmult/ristretto255/ref10/scalarmult_ristretto255_ref10.c +63 -0
  284. package/ios/libsodium-stable/src/libsodium/crypto_secretbox/crypto_secretbox.c +67 -0
  285. package/ios/libsodium-stable/src/libsodium/crypto_secretbox/crypto_secretbox_easy.c +145 -0
  286. package/ios/libsodium-stable/src/libsodium/crypto_secretbox/xchacha20poly1305/secretbox_xchacha20poly1305.c +177 -0
  287. package/ios/libsodium-stable/src/libsodium/crypto_secretbox/xsalsa20poly1305/secretbox_xsalsa20poly1305.c +89 -0
  288. package/ios/libsodium-stable/src/libsodium/crypto_secretstream/xchacha20poly1305/secretstream_xchacha20poly1305.c +313 -0
  289. package/ios/libsodium-stable/src/libsodium/crypto_shorthash/crypto_shorthash.c +34 -0
  290. package/ios/libsodium-stable/src/libsodium/crypto_shorthash/siphash24/ref/shorthash_siphash24_ref.c +71 -0
  291. package/ios/libsodium-stable/src/libsodium/crypto_shorthash/siphash24/ref/shorthash_siphash_ref.h +24 -0
  292. package/ios/libsodium-stable/src/libsodium/crypto_shorthash/siphash24/ref/shorthash_siphashx24_ref.c +77 -0
  293. package/ios/libsodium-stable/src/libsodium/crypto_shorthash/siphash24/shorthash_siphash24.c +11 -0
  294. package/ios/libsodium-stable/src/libsodium/crypto_shorthash/siphash24/shorthash_siphashx24.c +11 -0
  295. package/ios/libsodium-stable/src/libsodium/crypto_sign/crypto_sign.c +115 -0
  296. package/ios/libsodium-stable/src/libsodium/crypto_sign/ed25519/ref10/keypair.c +84 -0
  297. package/ios/libsodium-stable/src/libsodium/crypto_sign/ed25519/ref10/obsolete.c +118 -0
  298. package/ios/libsodium-stable/src/libsodium/crypto_sign/ed25519/ref10/open.c +98 -0
  299. package/ios/libsodium-stable/src/libsodium/crypto_sign/ed25519/ref10/sign.c +128 -0
  300. package/ios/libsodium-stable/src/libsodium/crypto_sign/ed25519/ref10/sign_ed25519_ref10.h +18 -0
  301. package/ios/libsodium-stable/src/libsodium/crypto_sign/ed25519/sign_ed25519.c +97 -0
  302. package/ios/libsodium-stable/src/libsodium/crypto_stream/chacha20/dolbeau/chacha20_dolbeau-avx2.c +180 -0
  303. package/ios/libsodium-stable/src/libsodium/crypto_stream/chacha20/dolbeau/chacha20_dolbeau-avx2.h +8 -0
  304. package/ios/libsodium-stable/src/libsodium/crypto_stream/chacha20/dolbeau/chacha20_dolbeau-ssse3.c +176 -0
  305. package/ios/libsodium-stable/src/libsodium/crypto_stream/chacha20/dolbeau/chacha20_dolbeau-ssse3.h +8 -0
  306. package/ios/libsodium-stable/src/libsodium/crypto_stream/chacha20/dolbeau/u0.h +86 -0
  307. package/ios/libsodium-stable/src/libsodium/crypto_stream/chacha20/dolbeau/u1.h +98 -0
  308. package/ios/libsodium-stable/src/libsodium/crypto_stream/chacha20/dolbeau/u4.h +177 -0
  309. package/ios/libsodium-stable/src/libsodium/crypto_stream/chacha20/dolbeau/u8.h +326 -0
  310. package/ios/libsodium-stable/src/libsodium/crypto_stream/chacha20/ref/chacha20_ref.c +312 -0
  311. package/ios/libsodium-stable/src/libsodium/crypto_stream/chacha20/ref/chacha20_ref.h +8 -0
  312. package/ios/libsodium-stable/src/libsodium/crypto_stream/chacha20/stream_chacha20.c +184 -0
  313. package/ios/libsodium-stable/src/libsodium/crypto_stream/chacha20/stream_chacha20.h +22 -0
  314. package/ios/libsodium-stable/src/libsodium/crypto_stream/crypto_stream.c +49 -0
  315. package/ios/libsodium-stable/src/libsodium/crypto_stream/salsa20/ref/salsa20_ref.c +120 -0
  316. package/ios/libsodium-stable/src/libsodium/crypto_stream/salsa20/ref/salsa20_ref.h +8 -0
  317. package/ios/libsodium-stable/src/libsodium/crypto_stream/salsa20/stream_salsa20.c +100 -0
  318. package/ios/libsodium-stable/src/libsodium/crypto_stream/salsa20/stream_salsa20.h +16 -0
  319. package/ios/libsodium-stable/src/libsodium/crypto_stream/salsa20/xmm6/salsa20_xmm6-asm.S +965 -0
  320. package/ios/libsodium-stable/src/libsodium/crypto_stream/salsa20/xmm6/salsa20_xmm6.c +31 -0
  321. package/ios/libsodium-stable/src/libsodium/crypto_stream/salsa20/xmm6/salsa20_xmm6.h +8 -0
  322. package/ios/libsodium-stable/src/libsodium/crypto_stream/salsa20/xmm6int/salsa20_xmm6int-avx2.c +134 -0
  323. package/ios/libsodium-stable/src/libsodium/crypto_stream/salsa20/xmm6int/salsa20_xmm6int-avx2.h +8 -0
  324. package/ios/libsodium-stable/src/libsodium/crypto_stream/salsa20/xmm6int/salsa20_xmm6int-sse2.c +128 -0
  325. package/ios/libsodium-stable/src/libsodium/crypto_stream/salsa20/xmm6int/salsa20_xmm6int-sse2.h +8 -0
  326. package/ios/libsodium-stable/src/libsodium/crypto_stream/salsa20/xmm6int/u0.h +195 -0
  327. package/ios/libsodium-stable/src/libsodium/crypto_stream/salsa20/xmm6int/u1.h +207 -0
  328. package/ios/libsodium-stable/src/libsodium/crypto_stream/salsa20/xmm6int/u4.h +547 -0
  329. package/ios/libsodium-stable/src/libsodium/crypto_stream/salsa20/xmm6int/u8.h +477 -0
  330. package/ios/libsodium-stable/src/libsodium/crypto_stream/salsa2012/ref/stream_salsa2012_ref.c +106 -0
  331. package/ios/libsodium-stable/src/libsodium/crypto_stream/salsa2012/stream_salsa2012.c +26 -0
  332. package/ios/libsodium-stable/src/libsodium/crypto_stream/salsa208/ref/stream_salsa208_ref.c +106 -0
  333. package/ios/libsodium-stable/src/libsodium/crypto_stream/salsa208/stream_salsa208.c +26 -0
  334. package/ios/libsodium-stable/src/libsodium/crypto_stream/xchacha20/stream_xchacha20.c +69 -0
  335. package/ios/libsodium-stable/src/libsodium/crypto_stream/xsalsa20/stream_xsalsa20.c +66 -0
  336. package/ios/libsodium-stable/src/libsodium/crypto_verify/verify.c +103 -0
  337. package/ios/libsodium-stable/src/libsodium/include/Makefile.am +76 -0
  338. package/ios/libsodium-stable/src/libsodium/include/sodium/core.h +28 -0
  339. package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_aead_aegis128l.h +92 -0
  340. package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_aead_aegis256.h +92 -0
  341. package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_aead_aes256gcm.h +179 -0
  342. package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_aead_chacha20poly1305.h +180 -0
  343. package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_aead_xchacha20poly1305.h +100 -0
  344. package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_auth.h +46 -0
  345. package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_auth_hmacsha256.h +70 -0
  346. package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_auth_hmacsha512.h +68 -0
  347. package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_auth_hmacsha512256.h +65 -0
  348. package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_box.h +177 -0
  349. package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_box_curve25519xchacha20poly1305.h +164 -0
  350. package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_box_curve25519xsalsa20poly1305.h +112 -0
  351. package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_core_ed25519.h +100 -0
  352. package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_core_hchacha20.h +36 -0
  353. package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_core_hsalsa20.h +36 -0
  354. package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_core_ristretto255.h +100 -0
  355. package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_core_salsa20.h +36 -0
  356. package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_core_salsa2012.h +36 -0
  357. package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_core_salsa208.h +40 -0
  358. package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_generichash.h +84 -0
  359. package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_generichash_blake2b.h +122 -0
  360. package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_hash.h +40 -0
  361. package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_hash_sha256.h +60 -0
  362. package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_hash_sha512.h +60 -0
  363. package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_kdf.h +53 -0
  364. package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_kdf_blake2b.h +44 -0
  365. package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_kdf_hkdf_sha256.h +74 -0
  366. package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_kdf_hkdf_sha512.h +75 -0
  367. package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_kx.h +66 -0
  368. package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_onetimeauth.h +65 -0
  369. package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_onetimeauth_poly1305.h +72 -0
  370. package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_pwhash.h +147 -0
  371. package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_pwhash_argon2i.h +122 -0
  372. package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_pwhash_argon2id.h +122 -0
  373. package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_pwhash_scryptsalsa208sha256.h +120 -0
  374. package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_scalarmult.h +46 -0
  375. package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_scalarmult_curve25519.h +42 -0
  376. package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_scalarmult_ed25519.h +51 -0
  377. package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_scalarmult_ristretto255.h +43 -0
  378. package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_secretbox.h +93 -0
  379. package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_secretbox_xchacha20poly1305.h +70 -0
  380. package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_secretbox_xsalsa20poly1305.h +69 -0
  381. package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_secretstream_xchacha20poly1305.h +108 -0
  382. package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_shorthash.h +41 -0
  383. package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_shorthash_siphash24.h +50 -0
  384. package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_sign.h +107 -0
  385. package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_sign_ed25519.h +124 -0
  386. package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_sign_edwards25519sha512batch.h +55 -0
  387. package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_stream.h +59 -0
  388. package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_stream_chacha20.h +106 -0
  389. package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_stream_salsa20.h +61 -0
  390. package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_stream_salsa2012.h +53 -0
  391. package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_stream_salsa208.h +56 -0
  392. package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_stream_xchacha20.h +61 -0
  393. package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_stream_xsalsa20.h +61 -0
  394. package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_verify_16.h +23 -0
  395. package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_verify_32.h +23 -0
  396. package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_verify_64.h +23 -0
  397. package/ios/libsodium-stable/src/libsodium/include/sodium/export.h +57 -0
  398. package/ios/libsodium-stable/src/libsodium/include/sodium/private/asm_cet.h +11 -0
  399. package/ios/libsodium-stable/src/libsodium/include/sodium/private/chacha20_ietf_ext.h +16 -0
  400. package/ios/libsodium-stable/src/libsodium/include/sodium/private/common.h +296 -0
  401. package/ios/libsodium-stable/src/libsodium/include/sodium/private/ed25519_ref10.h +142 -0
  402. package/ios/libsodium-stable/src/libsodium/include/sodium/private/ed25519_ref10_fe_25_5.h +1030 -0
  403. package/ios/libsodium-stable/src/libsodium/include/sodium/private/ed25519_ref10_fe_51.h +508 -0
  404. package/ios/libsodium-stable/src/libsodium/include/sodium/private/implementations.h +13 -0
  405. package/ios/libsodium-stable/src/libsodium/include/sodium/private/mutex.h +7 -0
  406. package/ios/libsodium-stable/src/libsodium/include/sodium/private/softaes.h +56 -0
  407. package/ios/libsodium-stable/src/libsodium/include/sodium/private/sse2_64_32.h +50 -0
  408. package/ios/libsodium-stable/src/libsodium/include/sodium/randombytes.h +72 -0
  409. package/ios/libsodium-stable/src/libsodium/include/sodium/randombytes_internal_random.h +22 -0
  410. package/ios/libsodium-stable/src/libsodium/include/sodium/randombytes_sysrandom.h +19 -0
  411. package/ios/libsodium-stable/src/libsodium/include/sodium/runtime.h +55 -0
  412. package/ios/libsodium-stable/src/libsodium/include/sodium/utils.h +179 -0
  413. package/ios/libsodium-stable/src/libsodium/include/sodium/version.h.in +33 -0
  414. package/ios/libsodium-stable/src/libsodium/include/sodium.h +75 -0
  415. package/ios/libsodium-stable/src/libsodium/randombytes/internal/randombytes_internal_random.c +646 -0
  416. package/ios/libsodium-stable/src/libsodium/randombytes/randombytes.c +200 -0
  417. package/ios/libsodium-stable/src/libsodium/randombytes/sysrandom/randombytes_sysrandom.c +396 -0
  418. package/ios/libsodium-stable/src/libsodium/sodium/codecs.c +335 -0
  419. package/ios/libsodium-stable/src/libsodium/sodium/core.c +216 -0
  420. package/ios/libsodium-stable/src/libsodium/sodium/runtime.c +391 -0
  421. package/ios/libsodium-stable/src/libsodium/sodium/utils.c +809 -0
  422. package/ios/libsodium-stable/src/libsodium/sodium/version.c +30 -0
  423. package/ios/libsodium-stable/test/Makefile.am +5 -0
  424. package/ios/libsodium-stable/test/constcheck.sh +22 -0
  425. package/ios/libsodium-stable/test/default/Makefile.am +525 -0
  426. package/ios/libsodium-stable/test/default/aead_aegis128l.c +642 -0
  427. package/ios/libsodium-stable/test/default/aead_aegis128l.exp +1 -0
  428. package/ios/libsodium-stable/test/default/aead_aegis256.c +723 -0
  429. package/ios/libsodium-stable/test/default/aead_aegis256.exp +1 -0
  430. package/ios/libsodium-stable/test/default/aead_aes256gcm.c +3328 -0
  431. package/ios/libsodium-stable/test/default/aead_aes256gcm.exp +1 -0
  432. package/ios/libsodium-stable/test/default/aead_aes256gcm2.c +276 -0
  433. package/ios/libsodium-stable/test/default/aead_aes256gcm2.exp +1 -0
  434. package/ios/libsodium-stable/test/default/aead_chacha20poly1305.c +372 -0
  435. package/ios/libsodium-stable/test/default/aead_chacha20poly1305.exp +63 -0
  436. package/ios/libsodium-stable/test/default/aead_chacha20poly13052.c +1046 -0
  437. package/ios/libsodium-stable/test/default/aead_chacha20poly13052.exp +1 -0
  438. package/ios/libsodium-stable/test/default/aead_xchacha20poly1305.c +203 -0
  439. package/ios/libsodium-stable/test/default/aead_xchacha20poly1305.exp +51 -0
  440. package/ios/libsodium-stable/test/default/auth.c +141 -0
  441. package/ios/libsodium-stable/test/default/auth.exp +30 -0
  442. package/ios/libsodium-stable/test/default/auth2.c +34 -0
  443. package/ios/libsodium-stable/test/default/auth2.exp +4 -0
  444. package/ios/libsodium-stable/test/default/auth3.c +36 -0
  445. package/ios/libsodium-stable/test/default/auth3.exp +1 -0
  446. package/ios/libsodium-stable/test/default/auth5.c +41 -0
  447. package/ios/libsodium-stable/test/default/auth5.exp +0 -0
  448. package/ios/libsodium-stable/test/default/auth6.c +23 -0
  449. package/ios/libsodium-stable/test/default/auth6.exp +8 -0
  450. package/ios/libsodium-stable/test/default/auth7.c +41 -0
  451. package/ios/libsodium-stable/test/default/auth7.exp +0 -0
  452. package/ios/libsodium-stable/test/default/box.c +112 -0
  453. package/ios/libsodium-stable/test/default/box.exp +38 -0
  454. package/ios/libsodium-stable/test/default/box2.c +80 -0
  455. package/ios/libsodium-stable/test/default/box2.exp +34 -0
  456. package/ios/libsodium-stable/test/default/box7.c +50 -0
  457. package/ios/libsodium-stable/test/default/box7.exp +0 -0
  458. package/ios/libsodium-stable/test/default/box8.c +58 -0
  459. package/ios/libsodium-stable/test/default/box8.exp +0 -0
  460. package/ios/libsodium-stable/test/default/box_easy.c +72 -0
  461. package/ios/libsodium-stable/test/default/box_easy.exp +3 -0
  462. package/ios/libsodium-stable/test/default/box_easy2.c +149 -0
  463. package/ios/libsodium-stable/test/default/box_easy2.exp +7 -0
  464. package/ios/libsodium-stable/test/default/box_seal.c +165 -0
  465. package/ios/libsodium-stable/test/default/box_seal.exp +8 -0
  466. package/ios/libsodium-stable/test/default/box_seed.c +30 -0
  467. package/ios/libsodium-stable/test/default/box_seed.exp +8 -0
  468. package/ios/libsodium-stable/test/default/chacha20.c +186 -0
  469. package/ios/libsodium-stable/test/default/chacha20.exp +64 -0
  470. package/ios/libsodium-stable/test/default/cmptest.h +238 -0
  471. package/ios/libsodium-stable/test/default/codecs.c +251 -0
  472. package/ios/libsodium-stable/test/default/codecs.exp +30 -0
  473. package/ios/libsodium-stable/test/default/core1.c +41 -0
  474. package/ios/libsodium-stable/test/default/core1.exp +4 -0
  475. package/ios/libsodium-stable/test/default/core2.c +38 -0
  476. package/ios/libsodium-stable/test/default/core2.exp +4 -0
  477. package/ios/libsodium-stable/test/default/core3.c +115 -0
  478. package/ios/libsodium-stable/test/default/core3.exp +3 -0
  479. package/ios/libsodium-stable/test/default/core4.c +36 -0
  480. package/ios/libsodium-stable/test/default/core4.exp +8 -0
  481. package/ios/libsodium-stable/test/default/core5.c +33 -0
  482. package/ios/libsodium-stable/test/default/core5.exp +4 -0
  483. package/ios/libsodium-stable/test/default/core6.c +52 -0
  484. package/ios/libsodium-stable/test/default/core6.exp +4 -0
  485. package/ios/libsodium-stable/test/default/core_ed25519.c +545 -0
  486. package/ios/libsodium-stable/test/default/core_ed25519.exp +55 -0
  487. package/ios/libsodium-stable/test/default/core_ristretto255.c +271 -0
  488. package/ios/libsodium-stable/test/default/core_ristretto255.exp +8 -0
  489. package/ios/libsodium-stable/test/default/ed25519_convert.c +70 -0
  490. package/ios/libsodium-stable/test/default/ed25519_convert.exp +3 -0
  491. package/ios/libsodium-stable/test/default/generichash.c +1406 -0
  492. package/ios/libsodium-stable/test/default/generichash.exp +65 -0
  493. package/ios/libsodium-stable/test/default/generichash2.c +62 -0
  494. package/ios/libsodium-stable/test/default/generichash2.exp +64 -0
  495. package/ios/libsodium-stable/test/default/generichash3.c +176 -0
  496. package/ios/libsodium-stable/test/default/generichash3.exp +75 -0
  497. package/ios/libsodium-stable/test/default/hash.c +47 -0
  498. package/ios/libsodium-stable/test/default/hash.exp +4 -0
  499. package/ios/libsodium-stable/test/default/hash3.c +20 -0
  500. package/ios/libsodium-stable/test/default/hash3.exp +1 -0
  501. package/ios/libsodium-stable/test/default/index.html.tpl +98 -0
  502. package/ios/libsodium-stable/test/default/kdf.c +71 -0
  503. package/ios/libsodium-stable/test/default/kdf.exp +77 -0
  504. package/ios/libsodium-stable/test/default/kdf_hkdf.c +102 -0
  505. package/ios/libsodium-stable/test/default/kdf_hkdf.exp +205 -0
  506. package/ios/libsodium-stable/test/default/keygen.c +67 -0
  507. package/ios/libsodium-stable/test/default/keygen.exp +1 -0
  508. package/ios/libsodium-stable/test/default/kx.c +149 -0
  509. package/ios/libsodium-stable/test/default/kx.exp +7 -0
  510. package/ios/libsodium-stable/test/default/metamorphic.c +187 -0
  511. package/ios/libsodium-stable/test/default/metamorphic.exp +1 -0
  512. package/ios/libsodium-stable/test/default/misuse.c +187 -0
  513. package/ios/libsodium-stable/test/default/misuse.exp +0 -0
  514. package/ios/libsodium-stable/test/default/onetimeauth.c +63 -0
  515. package/ios/libsodium-stable/test/default/onetimeauth.exp +4 -0
  516. package/ios/libsodium-stable/test/default/onetimeauth2.c +33 -0
  517. package/ios/libsodium-stable/test/default/onetimeauth2.exp +1 -0
  518. package/ios/libsodium-stable/test/default/onetimeauth7.c +36 -0
  519. package/ios/libsodium-stable/test/default/onetimeauth7.exp +0 -0
  520. package/ios/libsodium-stable/test/default/pre.js.inc +22 -0
  521. package/ios/libsodium-stable/test/default/pwhash_argon2i.c +467 -0
  522. package/ios/libsodium-stable/test/default/pwhash_argon2i.exp +11 -0
  523. package/ios/libsodium-stable/test/default/pwhash_argon2id.c +517 -0
  524. package/ios/libsodium-stable/test/default/pwhash_argon2id.exp +14 -0
  525. package/ios/libsodium-stable/test/default/pwhash_scrypt.c +393 -0
  526. package/ios/libsodium-stable/test/default/pwhash_scrypt.exp +37 -0
  527. package/ios/libsodium-stable/test/default/pwhash_scrypt_ll.c +59 -0
  528. package/ios/libsodium-stable/test/default/pwhash_scrypt_ll.exp +15 -0
  529. package/ios/libsodium-stable/test/default/randombytes.c +164 -0
  530. package/ios/libsodium-stable/test/default/randombytes.exp +2 -0
  531. package/ios/libsodium-stable/test/default/run.sh +9 -0
  532. package/ios/libsodium-stable/test/default/scalarmult.c +77 -0
  533. package/ios/libsodium-stable/test/default/scalarmult.exp +5 -0
  534. package/ios/libsodium-stable/test/default/scalarmult2.c +22 -0
  535. package/ios/libsodium-stable/test/default/scalarmult2.exp +1 -0
  536. package/ios/libsodium-stable/test/default/scalarmult5.c +30 -0
  537. package/ios/libsodium-stable/test/default/scalarmult5.exp +1 -0
  538. package/ios/libsodium-stable/test/default/scalarmult6.c +54 -0
  539. package/ios/libsodium-stable/test/default/scalarmult6.exp +4 -0
  540. package/ios/libsodium-stable/test/default/scalarmult7.c +34 -0
  541. package/ios/libsodium-stable/test/default/scalarmult7.exp +1 -0
  542. package/ios/libsodium-stable/test/default/scalarmult8.c +580 -0
  543. package/ios/libsodium-stable/test/default/scalarmult8.exp +65 -0
  544. package/ios/libsodium-stable/test/default/scalarmult_ed25519.c +134 -0
  545. package/ios/libsodium-stable/test/default/scalarmult_ed25519.exp +1 -0
  546. package/ios/libsodium-stable/test/default/scalarmult_ristretto255.c +51 -0
  547. package/ios/libsodium-stable/test/default/scalarmult_ristretto255.exp +18 -0
  548. package/ios/libsodium-stable/test/default/secretbox.c +84 -0
  549. package/ios/libsodium-stable/test/default/secretbox.exp +38 -0
  550. package/ios/libsodium-stable/test/default/secretbox2.c +55 -0
  551. package/ios/libsodium-stable/test/default/secretbox2.exp +17 -0
  552. package/ios/libsodium-stable/test/default/secretbox7.c +36 -0
  553. package/ios/libsodium-stable/test/default/secretbox7.exp +0 -0
  554. package/ios/libsodium-stable/test/default/secretbox8.c +41 -0
  555. package/ios/libsodium-stable/test/default/secretbox8.exp +0 -0
  556. package/ios/libsodium-stable/test/default/secretbox_easy.c +124 -0
  557. package/ios/libsodium-stable/test/default/secretbox_easy.exp +9 -0
  558. package/ios/libsodium-stable/test/default/secretbox_easy2.c +72 -0
  559. package/ios/libsodium-stable/test/default/secretbox_easy2.exp +5 -0
  560. package/ios/libsodium-stable/test/default/secretstream_xchacha20poly1305.c +329 -0
  561. package/ios/libsodium-stable/test/default/secretstream_xchacha20poly1305.exp +1 -0
  562. package/ios/libsodium-stable/test/default/shorthash.c +35 -0
  563. package/ios/libsodium-stable/test/default/shorthash.exp +64 -0
  564. package/ios/libsodium-stable/test/default/sign.c +1324 -0
  565. package/ios/libsodium-stable/test/default/sign.exp +5 -0
  566. package/ios/libsodium-stable/test/default/siphashx24.c +33 -0
  567. package/ios/libsodium-stable/test/default/siphashx24.exp +64 -0
  568. package/ios/libsodium-stable/test/default/sodium_core.c +43 -0
  569. package/ios/libsodium-stable/test/default/sodium_core.exp +1 -0
  570. package/ios/libsodium-stable/test/default/sodium_utils.c +224 -0
  571. package/ios/libsodium-stable/test/default/sodium_utils.exp +25 -0
  572. package/ios/libsodium-stable/test/default/sodium_utils2.c +120 -0
  573. package/ios/libsodium-stable/test/default/sodium_utils2.exp +3 -0
  574. package/ios/libsodium-stable/test/default/sodium_utils3.c +90 -0
  575. package/ios/libsodium-stable/test/default/sodium_utils3.exp +2 -0
  576. package/ios/libsodium-stable/test/default/sodium_version.c +18 -0
  577. package/ios/libsodium-stable/test/default/sodium_version.exp +3 -0
  578. package/ios/libsodium-stable/test/default/stream.c +84 -0
  579. package/ios/libsodium-stable/test/default/stream.exp +83 -0
  580. package/ios/libsodium-stable/test/default/stream2.c +59 -0
  581. package/ios/libsodium-stable/test/default/stream2.exp +2 -0
  582. package/ios/libsodium-stable/test/default/stream3.c +32 -0
  583. package/ios/libsodium-stable/test/default/stream3.exp +4 -0
  584. package/ios/libsodium-stable/test/default/stream4.c +51 -0
  585. package/ios/libsodium-stable/test/default/stream4.exp +17 -0
  586. package/ios/libsodium-stable/test/default/verify1.c +76 -0
  587. package/ios/libsodium-stable/test/default/verify1.exp +2 -0
  588. package/ios/libsodium-stable/test/default/wasi-test-wrapper.sh +98 -0
  589. package/ios/libsodium-stable/test/default/wintest.bat +61 -0
  590. package/ios/libsodium-stable/test/default/xchacha20.c +428 -0
  591. package/ios/libsodium-stable/test/default/xchacha20.exp +5 -0
  592. package/ios/libsodium-stable/test/quirks/quirks.h +34 -0
  593. package/lib/commonjs/expo-plugin/@types.js +2 -0
  594. package/lib/commonjs/expo-plugin/@types.js.map +1 -0
  595. package/lib/commonjs/expo-plugin/withRNQC.js +25 -0
  596. package/lib/commonjs/expo-plugin/withRNQC.js.map +1 -0
  597. package/lib/commonjs/expo-plugin/withSodiumAndroid.js +25 -0
  598. package/lib/commonjs/expo-plugin/withSodiumAndroid.js.map +1 -0
  599. package/lib/commonjs/expo-plugin/withSodiumIos.js +26 -0
  600. package/lib/commonjs/expo-plugin/withSodiumIos.js.map +1 -0
  601. package/lib/commonjs/expo-plugin/withXCode.js +51 -0
  602. package/lib/commonjs/expo-plugin/withXCode.js.map +1 -0
  603. package/lib/module/expo-plugin/@types.js +2 -0
  604. package/lib/module/expo-plugin/@types.js.map +1 -0
  605. package/lib/module/expo-plugin/withRNQC.js +21 -0
  606. package/lib/module/expo-plugin/withRNQC.js.map +1 -0
  607. package/lib/module/expo-plugin/withSodiumAndroid.js +20 -0
  608. package/lib/module/expo-plugin/withSodiumAndroid.js.map +1 -0
  609. package/lib/module/expo-plugin/withSodiumIos.js +20 -0
  610. package/lib/module/expo-plugin/withSodiumIos.js.map +1 -0
  611. package/lib/module/expo-plugin/withXCode.js +46 -0
  612. package/lib/module/expo-plugin/withXCode.js.map +1 -0
  613. package/lib/tsconfig.tsbuildinfo +1 -1
  614. package/lib/typescript/expo-plugin/@types.d.ts +8 -0
  615. package/lib/typescript/expo-plugin/@types.d.ts.map +1 -0
  616. package/lib/typescript/expo-plugin/withRNQC.d.ts +4 -0
  617. package/lib/typescript/expo-plugin/withRNQC.d.ts.map +1 -0
  618. package/lib/typescript/expo-plugin/withSodiumAndroid.d.ts +4 -0
  619. package/lib/typescript/expo-plugin/withSodiumAndroid.d.ts.map +1 -0
  620. package/lib/typescript/expo-plugin/withSodiumIos.d.ts +4 -0
  621. package/lib/typescript/expo-plugin/withSodiumIos.d.ts.map +1 -0
  622. package/lib/typescript/expo-plugin/withXCode.d.ts +9 -0
  623. package/lib/typescript/expo-plugin/withXCode.d.ts.map +1 -0
  624. package/package.json +16 -5
  625. package/src/expo-plugin/@types.ts +7 -0
  626. package/src/expo-plugin/withRNQC.ts +23 -0
  627. package/src/expo-plugin/withSodiumAndroid.ts +24 -0
  628. package/src/expo-plugin/withSodiumIos.ts +30 -0
  629. package/src/expo-plugin/withXCode.ts +55 -0
@@ -0,0 +1,1030 @@
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
+ }