grpc-flamingo 1.11.0 → 1.15.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (452) hide show
  1. checksums.yaml +4 -4
  2. data/Makefile +1150 -176
  3. data/etc/roots.pem +40 -196
  4. data/include/grpc/grpc.h +49 -8
  5. data/include/grpc/grpc_security.h +123 -2
  6. data/include/grpc/grpc_security_constants.h +6 -0
  7. data/include/grpc/impl/codegen/fork.h +4 -4
  8. data/include/grpc/impl/codegen/grpc_types.h +26 -5
  9. data/include/grpc/impl/codegen/log.h +112 -0
  10. data/include/grpc/impl/codegen/port_platform.h +55 -4
  11. data/include/grpc/module.modulemap +2 -0
  12. data/include/grpc/support/log.h +2 -80
  13. data/include/grpc/support/string_util.h +2 -0
  14. data/include/grpc/support/sync.h +0 -16
  15. data/src/boringssl/err_data.c +602 -588
  16. data/src/core/ext/{census → filters/census}/grpc_context.cc +0 -0
  17. data/src/core/ext/filters/client_channel/channel_connectivity.cc +1 -1
  18. data/src/core/ext/filters/client_channel/client_channel.cc +1234 -1070
  19. data/src/core/ext/filters/client_channel/client_channel.h +5 -0
  20. data/src/core/ext/filters/client_channel/client_channel_channelz.cc +113 -0
  21. data/src/core/ext/filters/client_channel/client_channel_channelz.h +71 -0
  22. data/src/core/ext/filters/client_channel/client_channel_plugin.cc +9 -0
  23. data/src/core/ext/filters/client_channel/http_connect_handshaker.cc +1 -1
  24. data/src/core/ext/filters/client_channel/http_proxy.cc +22 -5
  25. data/src/core/ext/filters/client_channel/lb_policy.cc +2 -2
  26. data/src/core/ext/filters/client_channel/lb_policy.h +30 -10
  27. data/src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.cc +11 -9
  28. data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc +120 -127
  29. data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.h +36 -0
  30. data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.cc +36 -102
  31. data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.h +37 -32
  32. data/src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.cc +25 -22
  33. data/src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.h +4 -2
  34. data/src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/google/protobuf/duration.pb.c +19 -0
  35. data/src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/google/protobuf/duration.pb.h +54 -0
  36. data/src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/google/protobuf/timestamp.pb.c +19 -0
  37. data/src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/google/protobuf/timestamp.pb.h +54 -0
  38. data/src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c +4 -17
  39. data/src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h +37 -63
  40. data/src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc +306 -239
  41. data/src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc +444 -392
  42. data/src/core/ext/filters/client_channel/lb_policy/subchannel_list.h +538 -98
  43. data/src/core/ext/filters/client_channel/lb_policy_factory.cc +8 -0
  44. data/src/core/ext/filters/client_channel/lb_policy_factory.h +4 -0
  45. data/src/core/ext/filters/client_channel/method_params.h +4 -0
  46. data/src/core/ext/filters/client_channel/resolver.h +10 -0
  47. data/src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc +36 -19
  48. data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.cc +320 -0
  49. data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.h +62 -9
  50. data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.cc +49 -294
  51. data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_windows.cc +537 -0
  52. data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc +112 -87
  53. data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.h +17 -2
  54. data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_fallback.cc +6 -5
  55. data/src/core/ext/filters/{load_reporting/server_load_reporting_filter.h → client_channel/resolver/dns/c_ares/grpc_ares_wrapper_posix.cc} +7 -8
  56. data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_windows.cc +29 -0
  57. data/src/core/ext/filters/client_channel/resolver/dns/native/dns_resolver.cc +32 -15
  58. data/src/core/ext/filters/client_channel/retry_throttle.h +4 -0
  59. data/src/core/ext/filters/client_channel/subchannel.cc +58 -15
  60. data/src/core/ext/filters/client_channel/subchannel.h +11 -0
  61. data/src/core/ext/filters/deadline/deadline_filter.cc +18 -15
  62. data/src/core/ext/filters/deadline/deadline_filter.h +5 -5
  63. data/src/core/ext/filters/http/client/http_client_filter.cc +10 -9
  64. data/src/core/ext/filters/http/client_authority_filter.cc +6 -5
  65. data/src/core/ext/filters/http/message_compress/message_compress_filter.cc +6 -6
  66. data/src/core/ext/filters/http/server/http_server_filter.cc +123 -131
  67. data/src/core/ext/filters/http/server/http_server_filter.h +1 -1
  68. data/src/core/ext/transport/chttp2/client/insecure/channel_create_posix.cc +1 -1
  69. data/src/core/ext/transport/chttp2/server/chttp2_server.cc +1 -1
  70. data/src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.cc +3 -2
  71. data/src/core/ext/transport/chttp2/transport/bin_decoder.cc +9 -8
  72. data/src/core/ext/transport/chttp2/transport/chttp2_transport.cc +97 -48
  73. data/src/core/ext/transport/chttp2/transport/flow_control.cc +10 -7
  74. data/src/core/ext/transport/chttp2/transport/frame_settings.cc +3 -3
  75. data/src/core/ext/transport/chttp2/transport/hpack_encoder.cc +12 -8
  76. data/src/core/ext/transport/chttp2/transport/hpack_encoder.h +4 -3
  77. data/src/core/ext/transport/chttp2/transport/hpack_parser.cc +2 -2
  78. data/src/core/ext/transport/chttp2/transport/hpack_table.cc +2 -2
  79. data/src/core/ext/transport/chttp2/transport/parsing.cc +14 -12
  80. data/src/core/ext/transport/chttp2/transport/stream_lists.cc +3 -3
  81. data/src/core/ext/transport/chttp2/transport/writing.cc +32 -27
  82. data/src/core/ext/transport/inproc/inproc_transport.cc +87 -49
  83. data/src/core/lib/channel/channel_args.cc +28 -0
  84. data/src/core/lib/channel/channel_args.h +4 -0
  85. data/src/core/lib/channel/channel_stack.cc +22 -29
  86. data/src/core/lib/channel/channel_stack.h +2 -2
  87. data/src/core/lib/channel/channel_stack_builder.cc +0 -3
  88. data/src/core/lib/channel/channel_stack_builder.h +0 -2
  89. data/src/core/lib/channel/channel_trace.cc +28 -63
  90. data/src/core/lib/channel/channel_trace.h +13 -17
  91. data/src/core/lib/channel/channelz.cc +153 -0
  92. data/src/core/lib/channel/channelz.h +133 -0
  93. data/src/core/lib/channel/channelz_registry.cc +145 -0
  94. data/src/core/lib/channel/channelz_registry.h +120 -0
  95. data/src/core/lib/channel/connected_channel.cc +8 -1
  96. data/src/core/lib/channel/handshaker.cc +71 -0
  97. data/src/core/lib/channel/handshaker.h +4 -0
  98. data/src/core/lib/debug/stats.h +7 -0
  99. data/src/core/lib/debug/stats_data.cc +5 -0
  100. data/src/core/lib/debug/stats_data.h +120 -0
  101. data/src/core/lib/debug/trace.cc +2 -1
  102. data/src/core/lib/debug/trace.h +12 -1
  103. data/src/core/lib/gpr/alloc.h +28 -0
  104. data/src/core/lib/gpr/arena.cc +38 -45
  105. data/src/core/lib/gpr/log.cc +8 -2
  106. data/src/core/lib/gpr/log_android.cc +4 -0
  107. data/src/core/lib/gpr/log_linux.cc +4 -0
  108. data/src/core/lib/gpr/log_posix.cc +4 -0
  109. data/src/core/lib/gpr/log_windows.cc +5 -0
  110. data/src/core/lib/gpr/string.cc +28 -0
  111. data/src/core/lib/gpr/string.h +10 -0
  112. data/src/core/lib/gprpp/abstract.h +5 -2
  113. data/src/core/lib/gprpp/fork.cc +268 -0
  114. data/src/core/lib/gprpp/fork.h +88 -0
  115. data/src/core/lib/gprpp/inlined_vector.h +87 -37
  116. data/src/core/lib/gprpp/memory.h +12 -0
  117. data/src/core/lib/gprpp/mutex_lock.h +42 -0
  118. data/src/core/lib/gprpp/orphanable.h +10 -12
  119. data/src/core/lib/gprpp/ref_counted.h +10 -12
  120. data/src/core/lib/gprpp/ref_counted_ptr.h +65 -8
  121. data/src/core/lib/gprpp/thd.h +0 -3
  122. data/src/core/lib/gprpp/thd_posix.cc +5 -54
  123. data/src/core/lib/gprpp/thd_windows.cc +0 -7
  124. data/src/core/lib/http/httpcli_security_connector.cc +1 -3
  125. data/src/core/lib/iomgr/call_combiner.cc +13 -13
  126. data/src/core/lib/iomgr/call_combiner.h +84 -1
  127. data/src/core/lib/iomgr/closure.h +6 -5
  128. data/src/core/lib/iomgr/combiner.cc +30 -13
  129. data/src/core/lib/iomgr/combiner.h +1 -1
  130. data/src/core/lib/iomgr/endpoint_pair_posix.cc +2 -2
  131. data/src/core/lib/iomgr/error.cc +12 -0
  132. data/src/core/lib/iomgr/error.h +5 -0
  133. data/src/core/lib/iomgr/ev_epoll1_linux.cc +138 -51
  134. data/src/core/lib/iomgr/ev_epollex_linux.cc +276 -93
  135. data/src/core/lib/iomgr/ev_epollsig_linux.cc +58 -50
  136. data/src/core/lib/iomgr/ev_poll_posix.cc +163 -42
  137. data/src/core/lib/iomgr/ev_posix.cc +88 -24
  138. data/src/core/lib/iomgr/ev_posix.h +48 -12
  139. data/src/core/lib/iomgr/exec_ctx.cc +15 -9
  140. data/src/core/lib/iomgr/exec_ctx.h +48 -20
  141. data/src/core/lib/iomgr/executor.cc +274 -142
  142. data/src/core/lib/iomgr/executor.h +82 -16
  143. data/src/core/lib/iomgr/fork_posix.cc +42 -19
  144. data/src/core/lib/iomgr/iocp_windows.cc +9 -4
  145. data/src/core/lib/iomgr/iomgr.cc +2 -0
  146. data/src/core/lib/iomgr/iomgr.h +5 -0
  147. data/src/core/lib/iomgr/iomgr_posix.cc +2 -2
  148. data/src/core/lib/iomgr/is_epollexclusive_available.cc +1 -0
  149. data/src/core/lib/iomgr/lockfree_event.cc +5 -1
  150. data/src/core/lib/iomgr/polling_entity.cc +11 -2
  151. data/src/core/lib/iomgr/pollset_custom.cc +2 -2
  152. data/src/core/lib/iomgr/port.h +51 -1
  153. data/src/core/lib/iomgr/resolve_address.h +1 -1
  154. data/src/core/lib/iomgr/resolve_address_posix.cc +4 -3
  155. data/src/core/lib/iomgr/resolve_address_windows.cc +3 -2
  156. data/src/core/lib/iomgr/resource_quota.cc +89 -12
  157. data/src/core/lib/iomgr/resource_quota.h +16 -0
  158. data/src/core/lib/iomgr/sockaddr_posix.h +1 -1
  159. data/src/core/lib/iomgr/socket_factory_posix.cc +1 -1
  160. data/src/core/lib/iomgr/socket_mutator.cc +1 -1
  161. data/src/core/lib/iomgr/socket_mutator.h +1 -1
  162. data/src/core/lib/iomgr/socket_utils.h +9 -0
  163. data/src/core/lib/iomgr/socket_utils_common_posix.cc +29 -1
  164. data/src/core/lib/iomgr/socket_utils_linux.cc +0 -1
  165. data/src/core/lib/iomgr/socket_utils_posix.cc +2 -3
  166. data/src/core/lib/iomgr/socket_utils_posix.h +3 -0
  167. data/src/core/lib/iomgr/socket_utils_uv.cc +4 -0
  168. data/src/core/lib/iomgr/socket_utils_windows.cc +4 -0
  169. data/src/core/lib/iomgr/socket_windows.cc +33 -0
  170. data/src/core/lib/iomgr/socket_windows.h +6 -0
  171. data/src/core/lib/iomgr/tcp_client_custom.cc +5 -5
  172. data/src/core/lib/iomgr/tcp_client_posix.cc +10 -11
  173. data/src/core/lib/iomgr/tcp_custom.cc +11 -11
  174. data/src/core/lib/iomgr/tcp_posix.cc +49 -36
  175. data/src/core/lib/iomgr/tcp_server_custom.cc +5 -5
  176. data/src/core/lib/iomgr/tcp_server_posix.cc +16 -36
  177. data/src/core/lib/iomgr/tcp_server_utils_posix.h +1 -1
  178. data/src/core/lib/iomgr/tcp_server_utils_posix_common.cc +17 -5
  179. data/src/core/lib/iomgr/tcp_server_windows.cc +1 -0
  180. data/src/core/lib/iomgr/tcp_uv.cc +3 -0
  181. data/src/core/lib/iomgr/tcp_windows.cc +18 -2
  182. data/src/core/lib/iomgr/tcp_windows.h +2 -0
  183. data/src/core/lib/iomgr/timer.h +4 -3
  184. data/src/core/lib/iomgr/timer_generic.cc +133 -51
  185. data/src/core/lib/iomgr/timer_manager.cc +12 -14
  186. data/src/core/lib/iomgr/timer_uv.cc +3 -0
  187. data/src/core/lib/iomgr/udp_server.cc +106 -52
  188. data/src/core/lib/iomgr/udp_server.h +8 -4
  189. data/src/core/lib/json/json.cc +12 -1
  190. data/src/core/lib/json/json.h +5 -0
  191. data/src/core/lib/profiling/basic_timers.cc +1 -0
  192. data/src/core/lib/security/context/security_context.cc +8 -8
  193. data/src/core/lib/security/context/security_context.h +6 -2
  194. data/src/core/lib/security/credentials/alts/alts_credentials.h +0 -20
  195. data/src/core/lib/security/credentials/alts/check_gcp_environment_linux.cc +3 -2
  196. data/src/core/lib/security/credentials/alts/grpc_alts_credentials_client_options.cc +7 -7
  197. data/src/core/lib/security/credentials/alts/grpc_alts_credentials_options.h +1 -38
  198. data/src/core/lib/security/credentials/credentials.h +1 -0
  199. data/src/core/lib/security/credentials/google_default/google_default_credentials.cc +89 -115
  200. data/src/core/lib/security/credentials/google_default/google_default_credentials.h +16 -0
  201. data/src/core/lib/security/credentials/jwt/json_token.h +2 -0
  202. data/src/core/lib/security/credentials/jwt/jwt_verifier.cc +2 -0
  203. data/src/core/lib/security/credentials/local/local_credentials.cc +77 -0
  204. data/src/core/lib/security/credentials/local/local_credentials.h +40 -0
  205. data/src/core/lib/security/credentials/oauth2/oauth2_credentials.cc +11 -7
  206. data/src/core/lib/security/credentials/oauth2/oauth2_credentials.h +1 -1
  207. data/src/core/lib/security/credentials/ssl/ssl_credentials.cc +17 -3
  208. data/src/core/lib/security/security_connector/alts_security_connector.cc +2 -1
  209. data/src/core/lib/security/security_connector/load_system_roots.h +29 -0
  210. data/src/core/lib/{gpr/fork.h → security/security_connector/load_system_roots_fallback.cc} +10 -13
  211. data/src/core/lib/security/security_connector/load_system_roots_linux.cc +165 -0
  212. data/src/core/lib/security/security_connector/load_system_roots_linux.h +44 -0
  213. data/src/core/lib/security/security_connector/local_security_connector.cc +245 -0
  214. data/src/core/lib/security/security_connector/local_security_connector.h +58 -0
  215. data/src/core/lib/security/security_connector/security_connector.cc +79 -32
  216. data/src/core/lib/security/security_connector/security_connector.h +5 -3
  217. data/src/core/lib/security/transport/client_auth_filter.cc +5 -5
  218. data/src/core/lib/security/transport/secure_endpoint.cc +2 -2
  219. data/src/core/lib/security/transport/security_handshaker.cc +7 -2
  220. data/src/core/lib/security/transport/server_auth_filter.cc +4 -7
  221. data/src/core/lib/security/util/json_util.cc +4 -0
  222. data/src/core/lib/slice/slice.cc +6 -2
  223. data/src/core/lib/slice/slice_buffer.cc +27 -7
  224. data/src/core/lib/slice/slice_hash_table.h +4 -0
  225. data/src/core/lib/slice/slice_weak_hash_table.h +4 -0
  226. data/src/core/lib/surface/call.cc +119 -58
  227. data/src/core/lib/surface/call.h +7 -0
  228. data/src/core/lib/surface/channel.cc +50 -18
  229. data/src/core/lib/surface/channel.h +4 -0
  230. data/src/core/lib/surface/completion_queue.cc +153 -18
  231. data/src/core/lib/surface/completion_queue.h +20 -2
  232. data/src/core/lib/surface/completion_queue_factory.cc +13 -4
  233. data/src/core/lib/surface/init.cc +7 -8
  234. data/src/core/lib/surface/init.h +0 -1
  235. data/src/core/lib/surface/server.cc +16 -0
  236. data/src/core/lib/surface/version.cc +1 -1
  237. data/src/core/lib/transport/bdp_estimator.cc +3 -3
  238. data/src/core/lib/transport/bdp_estimator.h +2 -2
  239. data/src/core/lib/transport/byte_stream.cc +1 -1
  240. data/src/core/lib/transport/connectivity_state.cc +6 -7
  241. data/src/core/lib/transport/service_config.cc +2 -2
  242. data/src/core/lib/transport/service_config.h +3 -3
  243. data/src/core/lib/transport/transport.cc +22 -10
  244. data/src/core/lib/transport/transport.h +18 -18
  245. data/src/core/lib/transport/transport_op_string.cc +1 -8
  246. data/src/core/plugin_registry/grpc_plugin_registry.cc +0 -4
  247. data/src/core/tsi/alts/crypt/aes_gcm.cc +2 -0
  248. data/src/core/tsi/alts/handshaker/alts_handshaker_client.cc +19 -7
  249. data/src/core/tsi/alts/handshaker/alts_handshaker_client.h +10 -0
  250. data/src/core/tsi/alts/handshaker/alts_handshaker_service_api_util.h +2 -2
  251. data/src/core/tsi/alts/handshaker/alts_tsi_handshaker.cc +38 -3
  252. data/src/core/tsi/alts/handshaker/alts_tsi_handshaker_private.h +3 -0
  253. data/src/core/tsi/alts/handshaker/altscontext.pb.c +0 -1
  254. data/src/core/tsi/alts/handshaker/altscontext.pb.h +1 -2
  255. data/src/core/tsi/alts/handshaker/handshaker.pb.c +0 -1
  256. data/src/core/tsi/alts/handshaker/handshaker.pb.h +1 -2
  257. data/src/core/tsi/alts/handshaker/transport_security_common.pb.c +0 -1
  258. data/src/core/tsi/alts/handshaker/transport_security_common.pb.h +1 -1
  259. data/src/core/tsi/alts/handshaker/transport_security_common_api.h +2 -2
  260. data/src/core/tsi/alts/zero_copy_frame_protector/alts_grpc_integrity_only_record_protocol.cc +47 -1
  261. data/src/core/tsi/alts/zero_copy_frame_protector/alts_grpc_integrity_only_record_protocol.h +3 -1
  262. data/src/core/tsi/alts/zero_copy_frame_protector/alts_zero_copy_grpc_protector.cc +12 -11
  263. data/src/core/tsi/alts/zero_copy_frame_protector/alts_zero_copy_grpc_protector.h +7 -2
  264. data/src/core/tsi/fake_transport_security.cc +1 -0
  265. data/src/core/tsi/grpc_shadow_boringssl.h +3006 -0
  266. data/src/core/tsi/local_transport_security.cc +209 -0
  267. data/src/core/tsi/local_transport_security.h +51 -0
  268. data/src/core/tsi/ssl/session_cache/ssl_session.h +2 -0
  269. data/src/core/tsi/ssl/session_cache/ssl_session_cache.cc +5 -5
  270. data/src/core/tsi/ssl/session_cache/ssl_session_cache.h +6 -0
  271. data/src/core/tsi/ssl_transport_security.cc +245 -116
  272. data/src/core/tsi/ssl_types.h +2 -0
  273. data/src/core/tsi/transport_security.cc +14 -0
  274. data/src/core/tsi/transport_security.h +2 -0
  275. data/src/core/tsi/transport_security_interface.h +11 -1
  276. data/src/ruby/bin/math_client.rb +17 -9
  277. data/src/ruby/ext/grpc/extconf.rb +1 -26
  278. data/src/ruby/ext/grpc/rb_channel_credentials.c +3 -3
  279. data/src/ruby/ext/grpc/rb_grpc_imports.generated.c +42 -16
  280. data/src/ruby/ext/grpc/rb_grpc_imports.generated.h +65 -26
  281. data/src/ruby/lib/grpc/generic/active_call.rb +19 -23
  282. data/src/ruby/lib/grpc/generic/rpc_server.rb +2 -1
  283. data/src/ruby/lib/grpc/version.rb +1 -1
  284. data/src/ruby/pb/generate_proto_ruby.sh +7 -1
  285. data/src/ruby/pb/grpc/health/v1/health_services_pb.rb +4 -1
  286. data/src/ruby/spec/call_credentials_spec.rb +1 -1
  287. data/src/ruby/spec/call_spec.rb +1 -1
  288. data/src/ruby/spec/channel_credentials_spec.rb +1 -1
  289. data/src/ruby/spec/channel_spec.rb +1 -1
  290. data/src/ruby/spec/client_auth_spec.rb +1 -12
  291. data/src/ruby/spec/client_server_spec.rb +1 -1
  292. data/src/ruby/spec/compression_options_spec.rb +1 -1
  293. data/src/ruby/spec/error_sanity_spec.rb +1 -1
  294. data/src/ruby/spec/generic/client_stub_spec.rb +16 -4
  295. data/src/ruby/spec/generic/rpc_desc_spec.rb +1 -1
  296. data/src/ruby/spec/generic/rpc_server_pool_spec.rb +1 -1
  297. data/src/ruby/spec/generic/service_spec.rb +1 -1
  298. data/src/ruby/spec/google_rpc_status_utils_spec.rb +1 -12
  299. data/src/ruby/spec/pb/duplicate/codegen_spec.rb +1 -0
  300. data/src/ruby/spec/pb/health/checker_spec.rb +1 -1
  301. data/src/ruby/spec/server_credentials_spec.rb +1 -1
  302. data/src/ruby/spec/server_spec.rb +1 -1
  303. data/src/ruby/spec/spec_helper.rb +1 -0
  304. data/src/ruby/spec/support/services.rb +1 -1
  305. data/src/ruby/spec/time_consts_spec.rb +1 -1
  306. data/third_party/address_sorting/address_sorting.c +17 -11
  307. data/third_party/address_sorting/address_sorting_windows.c +43 -3
  308. data/third_party/address_sorting/include/address_sorting/address_sorting.h +3 -0
  309. data/third_party/boringssl/crypto/asn1/a_int.c +33 -28
  310. data/third_party/boringssl/crypto/asn1/a_mbstr.c +24 -22
  311. data/third_party/boringssl/crypto/asn1/a_utf8.c +13 -11
  312. data/third_party/boringssl/crypto/asn1/asn1_locl.h +3 -0
  313. data/third_party/boringssl/crypto/asn1/tasn_dec.c +40 -19
  314. data/third_party/boringssl/crypto/bio/fd.c +1 -0
  315. data/third_party/boringssl/crypto/bio/file.c +2 -0
  316. data/third_party/boringssl/crypto/bn_extra/convert.c +6 -5
  317. data/third_party/boringssl/crypto/bytestring/ber.c +1 -4
  318. data/third_party/boringssl/crypto/bytestring/cbb.c +116 -16
  319. data/third_party/boringssl/crypto/bytestring/cbs.c +151 -20
  320. data/third_party/boringssl/crypto/cipher_extra/e_aesccm.c +203 -0
  321. data/third_party/boringssl/crypto/cipher_extra/e_rc2.c +2 -0
  322. data/third_party/boringssl/crypto/cipher_extra/e_tls.c +1 -2
  323. data/third_party/boringssl/crypto/cpu-aarch64-fuchsia.c +55 -0
  324. data/third_party/boringssl/crypto/cpu-aarch64-linux.c +2 -1
  325. data/third_party/boringssl/crypto/dsa/dsa.c +16 -54
  326. data/third_party/boringssl/crypto/ec_extra/ec_asn1.c +9 -10
  327. data/third_party/boringssl/crypto/ecdh/ecdh.c +4 -3
  328. data/third_party/boringssl/crypto/fipsmodule/bcm.c +11 -542
  329. data/third_party/boringssl/crypto/fipsmodule/bn/add.c +57 -112
  330. data/third_party/boringssl/crypto/fipsmodule/bn/asm/x86_64-gcc.c +4 -3
  331. data/third_party/boringssl/crypto/fipsmodule/bn/bn.c +128 -70
  332. data/third_party/boringssl/crypto/fipsmodule/bn/bytes.c +32 -71
  333. data/third_party/boringssl/crypto/fipsmodule/bn/cmp.c +64 -118
  334. data/third_party/boringssl/crypto/fipsmodule/bn/div.c +284 -122
  335. data/third_party/boringssl/crypto/fipsmodule/bn/exponentiation.c +31 -65
  336. data/third_party/boringssl/crypto/fipsmodule/bn/gcd.c +274 -218
  337. data/third_party/boringssl/crypto/fipsmodule/bn/generic.c +2 -1
  338. data/third_party/boringssl/crypto/fipsmodule/bn/internal.h +187 -27
  339. data/third_party/boringssl/crypto/fipsmodule/bn/jacobi.c +1 -1
  340. data/third_party/boringssl/crypto/fipsmodule/bn/montgomery.c +124 -81
  341. data/third_party/boringssl/crypto/fipsmodule/bn/montgomery_inv.c +8 -30
  342. data/third_party/boringssl/crypto/fipsmodule/bn/mul.c +321 -347
  343. data/third_party/boringssl/crypto/fipsmodule/bn/prime.c +326 -66
  344. data/third_party/boringssl/crypto/fipsmodule/bn/random.c +77 -25
  345. data/third_party/boringssl/crypto/fipsmodule/bn/rsaz_exp.c +199 -222
  346. data/third_party/boringssl/crypto/fipsmodule/bn/rsaz_exp.h +27 -47
  347. data/third_party/boringssl/crypto/fipsmodule/bn/shift.c +155 -96
  348. data/third_party/boringssl/crypto/fipsmodule/bn/sqrt.c +1 -1
  349. data/third_party/boringssl/crypto/fipsmodule/cipher/e_aes.c +10 -10
  350. data/third_party/boringssl/crypto/fipsmodule/des/internal.h +2 -0
  351. data/third_party/boringssl/crypto/fipsmodule/ec/ec.c +78 -47
  352. data/third_party/boringssl/crypto/fipsmodule/ec/ec_key.c +99 -163
  353. data/third_party/boringssl/crypto/fipsmodule/ec/ec_montgomery.c +3 -10
  354. data/third_party/boringssl/crypto/fipsmodule/ec/internal.h +44 -23
  355. data/third_party/boringssl/crypto/fipsmodule/ec/oct.c +59 -90
  356. data/third_party/boringssl/crypto/fipsmodule/ec/p224-64.c +38 -65
  357. data/third_party/boringssl/crypto/fipsmodule/ec/p256-x86_64-table.h +5378 -5418
  358. data/third_party/boringssl/crypto/fipsmodule/ec/p256-x86_64.c +17 -26
  359. data/third_party/boringssl/crypto/fipsmodule/ec/p256-x86_64.h +15 -11
  360. data/third_party/boringssl/crypto/fipsmodule/ec/simple.c +45 -51
  361. data/third_party/boringssl/crypto/fipsmodule/ec/{util-64.c → util.c} +0 -5
  362. data/third_party/boringssl/crypto/fipsmodule/ec/wnaf.c +144 -264
  363. data/third_party/boringssl/crypto/fipsmodule/ecdsa/ecdsa.c +78 -62
  364. data/third_party/boringssl/crypto/fipsmodule/modes/ccm.c +256 -0
  365. data/third_party/boringssl/crypto/fipsmodule/modes/internal.h +36 -32
  366. data/third_party/boringssl/crypto/fipsmodule/rand/ctrdrbg.c +9 -7
  367. data/third_party/boringssl/crypto/fipsmodule/rsa/blinding.c +16 -40
  368. data/third_party/boringssl/crypto/fipsmodule/rsa/internal.h +1 -6
  369. data/third_party/boringssl/crypto/fipsmodule/rsa/rsa.c +57 -39
  370. data/third_party/boringssl/crypto/fipsmodule/rsa/rsa_impl.c +309 -142
  371. data/third_party/boringssl/crypto/fipsmodule/self_check/self_check.c +581 -0
  372. data/third_party/boringssl/crypto/fipsmodule/tls/internal.h +39 -0
  373. data/third_party/boringssl/crypto/fipsmodule/tls/kdf.c +165 -0
  374. data/third_party/boringssl/crypto/internal.h +65 -2
  375. data/third_party/boringssl/crypto/mem.c +0 -2
  376. data/third_party/boringssl/crypto/obj/obj.c +6 -73
  377. data/third_party/boringssl/crypto/thread_pthread.c +35 -5
  378. data/third_party/boringssl/crypto/x509/a_strex.c +11 -11
  379. data/third_party/boringssl/crypto/x509/vpm_int.h +1 -0
  380. data/third_party/boringssl/crypto/x509/x509_vfy.c +4 -0
  381. data/third_party/boringssl/crypto/x509/x509_vpm.c +44 -22
  382. data/third_party/boringssl/crypto/x509/x_name.c +13 -0
  383. data/third_party/boringssl/include/openssl/aead.h +10 -0
  384. data/third_party/boringssl/include/openssl/asn1.h +2 -3
  385. data/third_party/boringssl/include/openssl/base.h +5 -14
  386. data/third_party/boringssl/include/openssl/bio.h +1 -1
  387. data/third_party/boringssl/include/openssl/bn.h +62 -18
  388. data/third_party/boringssl/include/openssl/bytestring.h +53 -28
  389. data/third_party/boringssl/include/openssl/crypto.h +4 -0
  390. data/third_party/boringssl/include/openssl/ec.h +10 -4
  391. data/third_party/boringssl/include/openssl/ec_key.h +7 -6
  392. data/third_party/boringssl/include/openssl/err.h +9 -9
  393. data/third_party/boringssl/include/openssl/evp.h +1 -1
  394. data/third_party/boringssl/include/openssl/rsa.h +35 -10
  395. data/third_party/boringssl/include/openssl/ssl.h +167 -19
  396. data/third_party/boringssl/include/openssl/ssl3.h +0 -1
  397. data/third_party/boringssl/include/openssl/stack.h +1 -1
  398. data/third_party/boringssl/include/openssl/tls1.h +10 -2
  399. data/third_party/boringssl/include/openssl/x509.h +4 -0
  400. data/third_party/boringssl/include/openssl/x509v3.h +1 -0
  401. data/third_party/boringssl/ssl/d1_both.cc +16 -2
  402. data/third_party/boringssl/ssl/dtls_method.cc +1 -1
  403. data/third_party/boringssl/ssl/handoff.cc +285 -0
  404. data/third_party/boringssl/ssl/handshake.cc +26 -12
  405. data/third_party/boringssl/ssl/handshake_client.cc +101 -95
  406. data/third_party/boringssl/ssl/handshake_server.cc +14 -2
  407. data/third_party/boringssl/ssl/internal.h +132 -79
  408. data/third_party/boringssl/ssl/s3_both.cc +2 -2
  409. data/third_party/boringssl/ssl/s3_lib.cc +3 -1
  410. data/third_party/boringssl/ssl/s3_pkt.cc +0 -18
  411. data/third_party/boringssl/ssl/ssl_aead_ctx.cc +1 -4
  412. data/third_party/boringssl/ssl/ssl_asn1.cc +47 -43
  413. data/third_party/boringssl/ssl/ssl_cipher.cc +12 -8
  414. data/third_party/boringssl/ssl/ssl_key_share.cc +3 -1
  415. data/third_party/boringssl/ssl/ssl_lib.cc +83 -14
  416. data/third_party/boringssl/ssl/ssl_privkey.cc +6 -0
  417. data/third_party/boringssl/ssl/ssl_stat.cc +6 -6
  418. data/third_party/boringssl/ssl/ssl_versions.cc +12 -85
  419. data/third_party/boringssl/ssl/ssl_x509.cc +59 -61
  420. data/third_party/boringssl/ssl/t1_enc.cc +73 -124
  421. data/third_party/boringssl/ssl/t1_lib.cc +367 -41
  422. data/third_party/boringssl/ssl/tls13_both.cc +8 -0
  423. data/third_party/boringssl/ssl/tls13_client.cc +98 -184
  424. data/third_party/boringssl/ssl/tls13_enc.cc +88 -158
  425. data/third_party/boringssl/ssl/tls13_server.cc +91 -137
  426. data/third_party/boringssl/ssl/tls_method.cc +0 -17
  427. data/third_party/boringssl/ssl/tls_record.cc +1 -10
  428. data/third_party/boringssl/third_party/fiat/curve25519.c +921 -2753
  429. data/third_party/boringssl/third_party/fiat/curve25519_tables.h +7880 -0
  430. data/third_party/boringssl/third_party/fiat/internal.h +32 -20
  431. data/third_party/boringssl/third_party/fiat/p256.c +1824 -0
  432. metadata +86 -71
  433. data/src/core/ext/filters/client_channel/lb_policy/subchannel_list.cc +0 -253
  434. data/src/core/ext/filters/load_reporting/server_load_reporting_filter.cc +0 -222
  435. data/src/core/ext/filters/load_reporting/server_load_reporting_plugin.cc +0 -71
  436. data/src/core/ext/filters/load_reporting/server_load_reporting_plugin.h +0 -61
  437. data/src/core/lib/channel/channel_trace_registry.cc +0 -80
  438. data/src/core/lib/channel/channel_trace_registry.h +0 -43
  439. data/src/core/lib/gpr/fork.cc +0 -78
  440. data/src/core/tsi/transport_security_adapter.cc +0 -235
  441. data/src/core/tsi/transport_security_adapter.h +0 -41
  442. data/src/ruby/bin/apis/google/protobuf/empty.rb +0 -29
  443. data/src/ruby/bin/apis/pubsub_demo.rb +0 -241
  444. data/src/ruby/bin/apis/tech/pubsub/proto/pubsub.rb +0 -159
  445. data/src/ruby/bin/apis/tech/pubsub/proto/pubsub_services.rb +0 -88
  446. data/src/ruby/pb/test/client.rb +0 -764
  447. data/src/ruby/pb/test/server.rb +0 -252
  448. data/src/ruby/spec/pb/package_with_underscore/checker_spec.rb +0 -54
  449. data/src/ruby/spec/pb/package_with_underscore/data.proto +0 -23
  450. data/src/ruby/spec/pb/package_with_underscore/service.proto +0 -23
  451. data/third_party/boringssl/crypto/curve25519/x25519-x86_64.c +0 -247
  452. data/third_party/boringssl/crypto/fipsmodule/ec/p256-64.c +0 -1674
@@ -182,9 +182,8 @@ static int add_new_session_tickets(SSL_HANDSHAKE *hs) {
182
182
  SSL3_MT_NEW_SESSION_TICKET) ||
183
183
  !CBB_add_u32(&body, session->timeout) ||
184
184
  !CBB_add_u32(&body, session->ticket_age_add) ||
185
- (ssl_is_draft21(ssl->version) &&
186
- (!CBB_add_u8_length_prefixed(&body, &nonce_cbb) ||
187
- !CBB_add_bytes(&nonce_cbb, nonce, sizeof(nonce)))) ||
185
+ !CBB_add_u8_length_prefixed(&body, &nonce_cbb) ||
186
+ !CBB_add_bytes(&nonce_cbb, nonce, sizeof(nonce)) ||
188
187
  !CBB_add_u16_length_prefixed(&body, &ticket) ||
189
188
  !tls13_derive_session_psk(session.get(), nonce) ||
190
189
  !ssl_encrypt_ticket(ssl, &ticket, session.get()) ||
@@ -194,9 +193,7 @@ static int add_new_session_tickets(SSL_HANDSHAKE *hs) {
194
193
 
195
194
  if (ssl->cert->enable_early_data) {
196
195
  CBB early_data_info;
197
- if (!CBB_add_u16(&extensions, ssl_is_draft21(ssl->version)
198
- ? TLSEXT_TYPE_early_data
199
- : TLSEXT_TYPE_ticket_early_data_info) ||
196
+ if (!CBB_add_u16(&extensions, TLSEXT_TYPE_early_data) ||
200
197
  !CBB_add_u16_length_prefixed(&extensions, &early_data_info) ||
201
198
  !CBB_add_u32(&early_data_info, session->ticket_max_early_data) ||
202
199
  !CBB_flush(&extensions)) {
@@ -206,7 +203,7 @@ static int add_new_session_tickets(SSL_HANDSHAKE *hs) {
206
203
 
207
204
  // Add a fake extension. See draft-davidben-tls-grease-01.
208
205
  if (!CBB_add_u16(&extensions,
209
- ssl_get_grease_value(ssl, ssl_grease_ticket_extension)) ||
206
+ ssl_get_grease_value(hs, ssl_grease_ticket_extension)) ||
210
207
  !CBB_add_u16(&extensions, 0 /* empty */)) {
211
208
  return 0;
212
209
  }
@@ -393,12 +390,14 @@ static enum ssl_hs_wait_t do_select_session(SSL_HANDSHAKE *hs) {
393
390
  hs->early_data_offered &&
394
391
  // Channel ID is incompatible with 0-RTT.
395
392
  !ssl->s3->tlsext_channel_id_valid &&
393
+ // If Token Binding is negotiated, reject 0-RTT.
394
+ !ssl->token_binding_negotiated &&
396
395
  // Custom extensions is incompatible with 0-RTT.
397
396
  hs->custom_extensions.received == 0 &&
398
397
  // The negotiated ALPN must match the one in the ticket.
399
398
  ssl->s3->alpn_selected ==
400
399
  MakeConstSpan(session->early_alpn, session->early_alpn_len)) {
401
- ssl->early_data_accepted = true;
400
+ ssl->s3->early_data_accepted = true;
402
401
  }
403
402
 
404
403
  if (hs->new_session == NULL) {
@@ -457,7 +456,7 @@ static enum ssl_hs_wait_t do_select_session(SSL_HANDSHAKE *hs) {
457
456
  return ssl_hs_error;
458
457
  }
459
458
 
460
- if (ssl->early_data_accepted) {
459
+ if (ssl->s3->early_data_accepted) {
461
460
  if (!tls13_derive_early_secrets(hs)) {
462
461
  return ssl_hs_error;
463
462
  }
@@ -469,11 +468,10 @@ static enum ssl_hs_wait_t do_select_session(SSL_HANDSHAKE *hs) {
469
468
  bool need_retry;
470
469
  if (!resolve_ecdhe_secret(hs, &need_retry, &client_hello)) {
471
470
  if (need_retry) {
472
- ssl->early_data_accepted = false;
471
+ ssl->s3->early_data_accepted = false;
473
472
  ssl->s3->skip_early_data = true;
474
473
  ssl->method->next_message(ssl);
475
- if (ssl_is_draft21(ssl->version) &&
476
- !hs->transcript.UpdateForHelloRetryRequest()) {
474
+ if (!hs->transcript.UpdateForHelloRetryRequest()) {
477
475
  return ssl_hs_error;
478
476
  }
479
477
  hs->tls13_state = state_send_hello_retry_request;
@@ -491,50 +489,30 @@ static enum ssl_hs_wait_t do_send_hello_retry_request(SSL_HANDSHAKE *hs) {
491
489
  SSL *const ssl = hs->ssl;
492
490
 
493
491
 
494
- if (ssl_is_draft22(ssl->version)) {
495
- ScopedCBB cbb;
496
- CBB body, session_id, extensions;
497
- uint16_t group_id;
498
- if (!ssl->method->init_message(ssl, cbb.get(), &body,
499
- SSL3_MT_SERVER_HELLO) ||
500
- !CBB_add_u16(&body, TLS1_2_VERSION) ||
501
- !CBB_add_bytes(&body, kHelloRetryRequest, SSL3_RANDOM_SIZE) ||
502
- !CBB_add_u8_length_prefixed(&body, &session_id) ||
503
- !CBB_add_bytes(&session_id, hs->session_id, hs->session_id_len) ||
504
- !CBB_add_u16(&body, ssl_cipher_get_value(hs->new_cipher)) ||
505
- !CBB_add_u8(&body, 0 /* no compression */) ||
506
- !tls1_get_shared_group(hs, &group_id) ||
507
- !CBB_add_u16_length_prefixed(&body, &extensions) ||
508
- !CBB_add_u16(&extensions, TLSEXT_TYPE_supported_versions) ||
509
- !CBB_add_u16(&extensions, 2 /* length */) ||
510
- !CBB_add_u16(&extensions, ssl->version) ||
511
- !CBB_add_u16(&extensions, TLSEXT_TYPE_key_share) ||
512
- !CBB_add_u16(&extensions, 2 /* length */) ||
513
- !CBB_add_u16(&extensions, group_id) ||
514
- !ssl_add_message_cbb(ssl, cbb.get())) {
515
- return ssl_hs_error;
516
- }
492
+ ScopedCBB cbb;
493
+ CBB body, session_id, extensions;
494
+ uint16_t group_id;
495
+ if (!ssl->method->init_message(ssl, cbb.get(), &body, SSL3_MT_SERVER_HELLO) ||
496
+ !CBB_add_u16(&body, TLS1_2_VERSION) ||
497
+ !CBB_add_bytes(&body, kHelloRetryRequest, SSL3_RANDOM_SIZE) ||
498
+ !CBB_add_u8_length_prefixed(&body, &session_id) ||
499
+ !CBB_add_bytes(&session_id, hs->session_id, hs->session_id_len) ||
500
+ !CBB_add_u16(&body, ssl_cipher_get_value(hs->new_cipher)) ||
501
+ !CBB_add_u8(&body, 0 /* no compression */) ||
502
+ !tls1_get_shared_group(hs, &group_id) ||
503
+ !CBB_add_u16_length_prefixed(&body, &extensions) ||
504
+ !CBB_add_u16(&extensions, TLSEXT_TYPE_supported_versions) ||
505
+ !CBB_add_u16(&extensions, 2 /* length */) ||
506
+ !CBB_add_u16(&extensions, ssl->version) ||
507
+ !CBB_add_u16(&extensions, TLSEXT_TYPE_key_share) ||
508
+ !CBB_add_u16(&extensions, 2 /* length */) ||
509
+ !CBB_add_u16(&extensions, group_id) ||
510
+ !ssl_add_message_cbb(ssl, cbb.get())) {
511
+ return ssl_hs_error;
512
+ }
517
513
 
518
- if (!ssl->method->add_change_cipher_spec(ssl)) {
519
- return ssl_hs_error;
520
- }
521
- } else {
522
- ScopedCBB cbb;
523
- CBB body, extensions;
524
- uint16_t group_id;
525
- if (!ssl->method->init_message(ssl, cbb.get(), &body,
526
- SSL3_MT_HELLO_RETRY_REQUEST) ||
527
- !CBB_add_u16(&body, ssl->version) ||
528
- (ssl_is_draft21(ssl->version) &&
529
- !CBB_add_u16(&body, ssl_cipher_get_value(hs->new_cipher))) ||
530
- !tls1_get_shared_group(hs, &group_id) ||
531
- !CBB_add_u16_length_prefixed(&body, &extensions) ||
532
- !CBB_add_u16(&extensions, TLSEXT_TYPE_key_share) ||
533
- !CBB_add_u16(&extensions, 2 /* length */) ||
534
- !CBB_add_u16(&extensions, group_id) ||
535
- !ssl_add_message_cbb(ssl, cbb.get())) {
536
- return ssl_hs_error;
537
- }
514
+ if (!ssl->method->add_change_cipher_spec(ssl)) {
515
+ return ssl_hs_error;
538
516
  }
539
517
 
540
518
  hs->sent_hello_retry_request = true;
@@ -580,34 +558,26 @@ static enum ssl_hs_wait_t do_read_second_client_hello(SSL_HANDSHAKE *hs) {
580
558
  static enum ssl_hs_wait_t do_send_server_hello(SSL_HANDSHAKE *hs) {
581
559
  SSL *const ssl = hs->ssl;
582
560
 
583
- uint16_t version = ssl->version;
584
- if (ssl_is_resumption_experiment(ssl->version)) {
585
- version = TLS1_2_VERSION;
586
- }
587
-
588
561
  // Send a ServerHello.
589
562
  ScopedCBB cbb;
590
563
  CBB body, extensions, session_id;
591
564
  if (!ssl->method->init_message(ssl, cbb.get(), &body, SSL3_MT_SERVER_HELLO) ||
592
- !CBB_add_u16(&body, version) ||
565
+ !CBB_add_u16(&body, TLS1_2_VERSION) ||
593
566
  !RAND_bytes(ssl->s3->server_random, sizeof(ssl->s3->server_random)) ||
594
567
  !CBB_add_bytes(&body, ssl->s3->server_random, SSL3_RANDOM_SIZE) ||
595
- (ssl_is_resumption_experiment(ssl->version) &&
596
- (!CBB_add_u8_length_prefixed(&body, &session_id) ||
597
- !CBB_add_bytes(&session_id, hs->session_id, hs->session_id_len))) ||
568
+ !CBB_add_u8_length_prefixed(&body, &session_id) ||
569
+ !CBB_add_bytes(&session_id, hs->session_id, hs->session_id_len) ||
598
570
  !CBB_add_u16(&body, ssl_cipher_get_value(hs->new_cipher)) ||
599
- (ssl_is_resumption_experiment(ssl->version) && !CBB_add_u8(&body, 0)) ||
571
+ !CBB_add_u8(&body, 0) ||
600
572
  !CBB_add_u16_length_prefixed(&body, &extensions) ||
601
573
  !ssl_ext_pre_shared_key_add_serverhello(hs, &extensions) ||
602
574
  !ssl_ext_key_share_add_serverhello(hs, &extensions) ||
603
- (ssl_is_resumption_experiment(ssl->version) &&
604
- !ssl_ext_supported_versions_add_serverhello(hs, &extensions)) ||
575
+ !ssl_ext_supported_versions_add_serverhello(hs, &extensions) ||
605
576
  !ssl_add_message_cbb(ssl, cbb.get())) {
606
577
  return ssl_hs_error;
607
578
  }
608
579
 
609
- if (ssl_is_resumption_experiment(ssl->version) &&
610
- (!ssl_is_draft22(ssl->version) || !hs->sent_hello_retry_request) &&
580
+ if (!hs->sent_hello_retry_request &&
611
581
  !ssl->method->add_change_cipher_spec(ssl)) {
612
582
  return ssl_hs_error;
613
583
  }
@@ -639,48 +609,34 @@ static enum ssl_hs_wait_t do_send_server_hello(SSL_HANDSHAKE *hs) {
639
609
 
640
610
  // Send a CertificateRequest, if necessary.
641
611
  if (hs->cert_request) {
642
- if (ssl_is_draft21(ssl->version)) {
643
- CBB cert_request_extensions, sigalg_contents, sigalgs_cbb;
644
- if (!ssl->method->init_message(ssl, cbb.get(), &body,
645
- SSL3_MT_CERTIFICATE_REQUEST) ||
646
- !CBB_add_u8(&body, 0 /* no certificate_request_context. */) ||
647
- !CBB_add_u16_length_prefixed(&body, &cert_request_extensions) ||
648
- !CBB_add_u16(&cert_request_extensions,
649
- TLSEXT_TYPE_signature_algorithms) ||
612
+ CBB cert_request_extensions, sigalg_contents, sigalgs_cbb;
613
+ if (!ssl->method->init_message(ssl, cbb.get(), &body,
614
+ SSL3_MT_CERTIFICATE_REQUEST) ||
615
+ !CBB_add_u8(&body, 0 /* no certificate_request_context. */) ||
616
+ !CBB_add_u16_length_prefixed(&body, &cert_request_extensions) ||
617
+ !CBB_add_u16(&cert_request_extensions,
618
+ TLSEXT_TYPE_signature_algorithms) ||
619
+ !CBB_add_u16_length_prefixed(&cert_request_extensions,
620
+ &sigalg_contents) ||
621
+ !CBB_add_u16_length_prefixed(&sigalg_contents, &sigalgs_cbb) ||
622
+ !tls12_add_verify_sigalgs(ssl, &sigalgs_cbb)) {
623
+ return ssl_hs_error;
624
+ }
625
+
626
+ if (ssl_has_client_CAs(ssl)) {
627
+ CBB ca_contents;
628
+ if (!CBB_add_u16(&cert_request_extensions,
629
+ TLSEXT_TYPE_certificate_authorities) ||
650
630
  !CBB_add_u16_length_prefixed(&cert_request_extensions,
651
- &sigalg_contents) ||
652
- !CBB_add_u16_length_prefixed(&sigalg_contents, &sigalgs_cbb) ||
653
- !tls12_add_verify_sigalgs(ssl, &sigalgs_cbb)) {
631
+ &ca_contents) ||
632
+ !ssl_add_client_CA_list(ssl, &ca_contents) ||
633
+ !CBB_flush(&cert_request_extensions)) {
654
634
  return ssl_hs_error;
655
635
  }
636
+ }
656
637
 
657
- if (ssl_has_client_CAs(ssl)) {
658
- CBB ca_contents;
659
- if (!CBB_add_u16(&cert_request_extensions,
660
- TLSEXT_TYPE_certificate_authorities) ||
661
- !CBB_add_u16_length_prefixed(&cert_request_extensions,
662
- &ca_contents) ||
663
- !ssl_add_client_CA_list(ssl, &ca_contents) ||
664
- !CBB_flush(&cert_request_extensions)) {
665
- return ssl_hs_error;
666
- }
667
- }
668
-
669
- if (!ssl_add_message_cbb(ssl, cbb.get())) {
670
- return ssl_hs_error;
671
- }
672
- } else {
673
- CBB sigalgs_cbb;
674
- if (!ssl->method->init_message(ssl, cbb.get(), &body,
675
- SSL3_MT_CERTIFICATE_REQUEST) ||
676
- !CBB_add_u8(&body, 0 /* no certificate_request_context. */) ||
677
- !CBB_add_u16_length_prefixed(&body, &sigalgs_cbb) ||
678
- !tls12_add_verify_sigalgs(ssl, &sigalgs_cbb) ||
679
- !ssl_add_client_CA_list(ssl, &body) ||
680
- !CBB_add_u16(&body, 0 /* empty certificate_extensions. */) ||
681
- !ssl_add_message_cbb(ssl, cbb.get())) {
682
- return ssl_hs_error;
683
- }
638
+ if (!ssl_add_message_cbb(ssl, cbb.get())) {
639
+ return ssl_hs_error;
684
640
  }
685
641
  }
686
642
 
@@ -732,18 +688,16 @@ static enum ssl_hs_wait_t do_send_server_finished(SSL_HANDSHAKE *hs) {
732
688
  return ssl_hs_error;
733
689
  }
734
690
 
735
- if (ssl->early_data_accepted) {
691
+ if (ssl->s3->early_data_accepted) {
736
692
  // If accepting 0-RTT, we send tickets half-RTT. This gets the tickets on
737
693
  // the wire sooner and also avoids triggering a write on |SSL_read| when
738
694
  // processing the client Finished. This requires computing the client
739
695
  // Finished early. See draft-ietf-tls-tls13-18, section 4.5.1.
740
- if (ssl_is_draft21(ssl->version)) {
741
- static const uint8_t kEndOfEarlyData[4] = {SSL3_MT_END_OF_EARLY_DATA, 0,
742
- 0, 0};
743
- if (!hs->transcript.Update(kEndOfEarlyData)) {
744
- OPENSSL_PUT_ERROR(SSL, ERR_R_INTERNAL_ERROR);
745
- return ssl_hs_error;
746
- }
696
+ static const uint8_t kEndOfEarlyData[4] = {SSL3_MT_END_OF_EARLY_DATA, 0,
697
+ 0, 0};
698
+ if (!hs->transcript.Update(kEndOfEarlyData)) {
699
+ OPENSSL_PUT_ERROR(SSL, ERR_R_INTERNAL_ERROR);
700
+ return ssl_hs_error;
747
701
  }
748
702
 
749
703
  size_t finished_len;
@@ -780,7 +734,7 @@ static enum ssl_hs_wait_t do_send_server_finished(SSL_HANDSHAKE *hs) {
780
734
 
781
735
  static enum ssl_hs_wait_t do_read_second_client_flight(SSL_HANDSHAKE *hs) {
782
736
  SSL *const ssl = hs->ssl;
783
- if (ssl->early_data_accepted) {
737
+ if (ssl->s3->early_data_accepted) {
784
738
  if (!tls13_set_traffic_key(ssl, evp_aead_open, hs->early_traffic_secret,
785
739
  hs->hash_len)) {
786
740
  return ssl_hs_error;
@@ -790,7 +744,8 @@ static enum ssl_hs_wait_t do_read_second_client_flight(SSL_HANDSHAKE *hs) {
790
744
  hs->in_early_data = true;
791
745
  }
792
746
  hs->tls13_state = state_process_end_of_early_data;
793
- return ssl->early_data_accepted ? ssl_hs_read_end_of_early_data : ssl_hs_ok;
747
+ return ssl->s3->early_data_accepted ? ssl_hs_read_end_of_early_data
748
+ : ssl_hs_ok;
794
749
  }
795
750
 
796
751
  static enum ssl_hs_wait_t do_process_end_of_early_data(SSL_HANDSHAKE *hs) {
@@ -798,31 +753,30 @@ static enum ssl_hs_wait_t do_process_end_of_early_data(SSL_HANDSHAKE *hs) {
798
753
  if (hs->early_data_offered) {
799
754
  // If early data was not accepted, the EndOfEarlyData and ChangeCipherSpec
800
755
  // message will be in the discarded early data.
801
- if (hs->ssl->early_data_accepted) {
802
- if (ssl_is_draft21(ssl->version)) {
803
- SSLMessage msg;
804
- if (!ssl->method->get_message(ssl, &msg)) {
805
- return ssl_hs_read_message;
806
- }
807
-
808
- if (!ssl_check_message_type(ssl, msg, SSL3_MT_END_OF_EARLY_DATA)) {
809
- return ssl_hs_error;
810
- }
811
- if (CBS_len(&msg.body) != 0) {
812
- ssl_send_alert(ssl, SSL3_AL_FATAL, SSL_AD_DECODE_ERROR);
813
- OPENSSL_PUT_ERROR(SSL, SSL_R_DECODE_ERROR);
814
- return ssl_hs_error;
815
- }
816
- ssl->method->next_message(ssl);
756
+ if (hs->ssl->s3->early_data_accepted) {
757
+ SSLMessage msg;
758
+ if (!ssl->method->get_message(ssl, &msg)) {
759
+ return ssl_hs_read_message;
817
760
  }
761
+
762
+ if (!ssl_check_message_type(ssl, msg, SSL3_MT_END_OF_EARLY_DATA)) {
763
+ return ssl_hs_error;
764
+ }
765
+ if (CBS_len(&msg.body) != 0) {
766
+ ssl_send_alert(ssl, SSL3_AL_FATAL, SSL_AD_DECODE_ERROR);
767
+ OPENSSL_PUT_ERROR(SSL, SSL_R_DECODE_ERROR);
768
+ return ssl_hs_error;
769
+ }
770
+ ssl->method->next_message(ssl);
818
771
  }
819
772
  }
820
773
  if (!tls13_set_traffic_key(ssl, evp_aead_open, hs->client_handshake_secret,
821
774
  hs->hash_len)) {
822
775
  return ssl_hs_error;
823
776
  }
824
- hs->tls13_state = ssl->early_data_accepted ? state_read_client_finished
825
- : state_read_client_certificate;
777
+ hs->tls13_state = ssl->s3->early_data_accepted
778
+ ? state_read_client_finished
779
+ : state_read_client_certificate;
826
780
  return ssl_hs_ok;
827
781
  }
828
782
 
@@ -921,14 +875,14 @@ static enum ssl_hs_wait_t do_read_client_finished(SSL_HANDSHAKE *hs) {
921
875
  if (!ssl_check_message_type(ssl, msg, SSL3_MT_FINISHED) ||
922
876
  // If early data was accepted, we've already computed the client Finished
923
877
  // and derived the resumption secret.
924
- !tls13_process_finished(hs, msg, ssl->early_data_accepted) ||
878
+ !tls13_process_finished(hs, msg, ssl->s3->early_data_accepted) ||
925
879
  // evp_aead_seal keys have already been switched.
926
880
  !tls13_set_traffic_key(ssl, evp_aead_open, hs->client_traffic_secret_0,
927
881
  hs->hash_len)) {
928
882
  return ssl_hs_error;
929
883
  }
930
884
 
931
- if (!ssl->early_data_accepted) {
885
+ if (!ssl->s3->early_data_accepted) {
932
886
  if (!ssl_hash_message(hs, msg) ||
933
887
  !tls13_derive_resumption_secret(hs)) {
934
888
  return ssl_hs_error;
@@ -231,15 +231,6 @@ const SSL_METHOD *TLSv1_method(void) {
231
231
  return &kMethod;
232
232
  }
233
233
 
234
- const SSL_METHOD *SSLv3_method(void) {
235
- static const SSL_METHOD kMethod = {
236
- SSL3_VERSION,
237
- &kTLSProtocolMethod,
238
- &ssl_crypto_x509_method,
239
- };
240
- return &kMethod;
241
- }
242
-
243
234
  // Legacy side-specific methods.
244
235
 
245
236
  const SSL_METHOD *TLSv1_2_server_method(void) {
@@ -254,10 +245,6 @@ const SSL_METHOD *TLSv1_server_method(void) {
254
245
  return TLSv1_method();
255
246
  }
256
247
 
257
- const SSL_METHOD *SSLv3_server_method(void) {
258
- return SSLv3_method();
259
- }
260
-
261
248
  const SSL_METHOD *TLSv1_2_client_method(void) {
262
249
  return TLSv1_2_method();
263
250
  }
@@ -270,10 +257,6 @@ const SSL_METHOD *TLSv1_client_method(void) {
270
257
  return TLSv1_method();
271
258
  }
272
259
 
273
- const SSL_METHOD *SSLv3_client_method(void) {
274
- return SSLv3_method();
275
- }
276
-
277
260
  const SSL_METHOD *SSLv23_server_method(void) {
278
261
  return SSLv23_method();
279
262
  }
@@ -264,7 +264,7 @@ ssl_open_record_t tls_open_record(SSL *ssl, uint8_t *out_type,
264
264
  *out_consumed = in.size() - CBS_len(&cbs);
265
265
 
266
266
  if (ssl->s3->have_version &&
267
- ssl_is_resumption_experiment(ssl->version) &&
267
+ ssl_protocol_version(ssl) >= TLS1_3_VERSION &&
268
268
  SSL_in_init(ssl) &&
269
269
  type == SSL3_RT_CHANGE_CIPHER_SPEC &&
270
270
  ciphertext_len == 1 &&
@@ -356,15 +356,6 @@ ssl_open_record_t tls_open_record(SSL *ssl, uint8_t *out_type,
356
356
  }
357
357
 
358
358
  if (type == SSL3_RT_ALERT) {
359
- // Return end_of_early_data alerts as-is for the caller to process.
360
- if (!ssl_is_draft21(ssl->version) &&
361
- out->size() == 2 &&
362
- (*out)[0] == SSL3_AL_WARNING &&
363
- (*out)[1] == TLS1_AD_END_OF_EARLY_DATA) {
364
- *out_type = type;
365
- return ssl_open_record_success;
366
- }
367
-
368
359
  return ssl_process_alert(ssl, out_alert, *out);
369
360
  }
370
361
 
@@ -36,13 +36,17 @@
36
36
  #include <openssl/mem.h>
37
37
  #include <openssl/rand.h>
38
38
  #include <openssl/sha.h>
39
+ #include <openssl/type_check.h>
39
40
 
40
41
  #include "internal.h"
41
42
  #include "../../crypto/internal.h"
42
43
 
43
44
 
44
- static const int64_t kBottom25Bits = INT64_C(0x1ffffff);
45
- static const int64_t kBottom26Bits = INT64_C(0x3ffffff);
45
+ // Various pre-computed constants.
46
+ #include "./curve25519_tables.h"
47
+
48
+
49
+ // Low-level intrinsic operations (hand-written).
46
50
 
47
51
  static uint64_t load_3(const uint8_t *in) {
48
52
  uint64_t result;
@@ -61,6 +65,568 @@ static uint64_t load_4(const uint8_t *in) {
61
65
  return result;
62
66
  }
63
67
 
68
+ #if defined(BORINGSSL_CURVE25519_64BIT)
69
+ static uint64_t load_8(const uint8_t *in) {
70
+ uint64_t result;
71
+ result = (uint64_t)in[0];
72
+ result |= ((uint64_t)in[1]) << 8;
73
+ result |= ((uint64_t)in[2]) << 16;
74
+ result |= ((uint64_t)in[3]) << 24;
75
+ result |= ((uint64_t)in[4]) << 32;
76
+ result |= ((uint64_t)in[5]) << 40;
77
+ result |= ((uint64_t)in[6]) << 48;
78
+ result |= ((uint64_t)in[7]) << 56;
79
+ return result;
80
+ }
81
+
82
+ static uint8_t /*bool*/ addcarryx_u51(uint8_t /*bool*/ c, uint64_t a,
83
+ uint64_t b, uint64_t *low) {
84
+ // This function extracts 51 bits of result and 1 bit of carry (52 total), so
85
+ // a 64-bit intermediate is sufficient.
86
+ uint64_t x = a + b + c;
87
+ *low = x & ((UINT64_C(1) << 51) - 1);
88
+ return (x >> 51) & 1;
89
+ }
90
+
91
+ static uint8_t /*bool*/ subborrow_u51(uint8_t /*bool*/ c, uint64_t a,
92
+ uint64_t b, uint64_t *low) {
93
+ // This function extracts 51 bits of result and 1 bit of borrow (52 total), so
94
+ // a 64-bit intermediate is sufficient.
95
+ uint64_t x = a - b - c;
96
+ *low = x & ((UINT64_C(1) << 51) - 1);
97
+ return x >> 63;
98
+ }
99
+
100
+ static uint64_t cmovznz64(uint64_t t, uint64_t z, uint64_t nz) {
101
+ t = -!!t; // all set if nonzero, 0 if 0
102
+ return (t&nz) | ((~t)&z);
103
+ }
104
+
105
+ #else
106
+
107
+ static uint8_t /*bool*/ addcarryx_u25(uint8_t /*bool*/ c, uint32_t a,
108
+ uint32_t b, uint32_t *low) {
109
+ // This function extracts 25 bits of result and 1 bit of carry (26 total), so
110
+ // a 32-bit intermediate is sufficient.
111
+ uint32_t x = a + b + c;
112
+ *low = x & ((1 << 25) - 1);
113
+ return (x >> 25) & 1;
114
+ }
115
+
116
+ static uint8_t /*bool*/ addcarryx_u26(uint8_t /*bool*/ c, uint32_t a,
117
+ uint32_t b, uint32_t *low) {
118
+ // This function extracts 26 bits of result and 1 bit of carry (27 total), so
119
+ // a 32-bit intermediate is sufficient.
120
+ uint32_t x = a + b + c;
121
+ *low = x & ((1 << 26) - 1);
122
+ return (x >> 26) & 1;
123
+ }
124
+
125
+ static uint8_t /*bool*/ subborrow_u25(uint8_t /*bool*/ c, uint32_t a,
126
+ uint32_t b, uint32_t *low) {
127
+ // This function extracts 25 bits of result and 1 bit of borrow (26 total), so
128
+ // a 32-bit intermediate is sufficient.
129
+ uint32_t x = a - b - c;
130
+ *low = x & ((1 << 25) - 1);
131
+ return x >> 31;
132
+ }
133
+
134
+ static uint8_t /*bool*/ subborrow_u26(uint8_t /*bool*/ c, uint32_t a,
135
+ uint32_t b, uint32_t *low) {
136
+ // This function extracts 26 bits of result and 1 bit of borrow (27 total), so
137
+ // a 32-bit intermediate is sufficient.
138
+ uint32_t x = a - b - c;
139
+ *low = x & ((1 << 26) - 1);
140
+ return x >> 31;
141
+ }
142
+
143
+ static uint32_t cmovznz32(uint32_t t, uint32_t z, uint32_t nz) {
144
+ t = -!!t; // all set if nonzero, 0 if 0
145
+ return (t&nz) | ((~t)&z);
146
+ }
147
+
148
+ #endif
149
+
150
+
151
+ // Field operations.
152
+
153
+ #if defined(BORINGSSL_CURVE25519_64BIT)
154
+
155
+ #define assert_fe(f) do { \
156
+ for (unsigned _assert_fe_i = 0; _assert_fe_i< 5; _assert_fe_i++) { \
157
+ assert(f[_assert_fe_i] < 1.125*(UINT64_C(1)<<51)); \
158
+ } \
159
+ } while (0)
160
+
161
+ #define assert_fe_loose(f) do { \
162
+ for (unsigned _assert_fe_i = 0; _assert_fe_i< 5; _assert_fe_i++) { \
163
+ assert(f[_assert_fe_i] < 3.375*(UINT64_C(1)<<51)); \
164
+ } \
165
+ } while (0)
166
+
167
+ #define assert_fe_frozen(f) do { \
168
+ for (unsigned _assert_fe_i = 0; _assert_fe_i< 5; _assert_fe_i++) { \
169
+ assert(f[_assert_fe_i] < (UINT64_C(1)<<51)); \
170
+ } \
171
+ } while (0)
172
+
173
+ static void fe_frombytes_impl(uint64_t h[5], const uint8_t *s) {
174
+ // Ignores top bit of s.
175
+ uint64_t a0 = load_8(s);
176
+ uint64_t a1 = load_8(s+8);
177
+ uint64_t a2 = load_8(s+16);
178
+ uint64_t a3 = load_8(s+24);
179
+ // Use 51 bits, 64-51 = 13 left.
180
+ h[0] = a0 & ((UINT64_C(1) << 51) - 1);
181
+ // (64-51) + 38 = 13 + 38 = 51
182
+ h[1] = (a0 >> 51) | ((a1 & ((UINT64_C(1) << 38) - 1)) << 13);
183
+ // (64-38) + 25 = 26 + 25 = 51
184
+ h[2] = (a1 >> 38) | ((a2 & ((UINT64_C(1) << 25) - 1)) << 26);
185
+ // (64-25) + 12 = 39 + 12 = 51
186
+ h[3] = (a2 >> 25) | ((a3 & ((UINT64_C(1) << 12) - 1)) << 39);
187
+ // (64-12) = 52, ignore top bit
188
+ h[4] = (a3 >> 12) & ((UINT64_C(1) << 51) - 1);
189
+ assert_fe(h);
190
+ }
191
+
192
+ static void fe_frombytes(fe *h, const uint8_t *s) {
193
+ fe_frombytes_impl(h->v, s);
194
+ }
195
+
196
+ static void fe_freeze(uint64_t out[5], const uint64_t in1[5]) {
197
+ { const uint64_t x7 = in1[4];
198
+ { const uint64_t x8 = in1[3];
199
+ { const uint64_t x6 = in1[2];
200
+ { const uint64_t x4 = in1[1];
201
+ { const uint64_t x2 = in1[0];
202
+ { uint64_t x10; uint8_t/*bool*/ x11 = subborrow_u51(0x0, x2, 0x7ffffffffffed, &x10);
203
+ { uint64_t x13; uint8_t/*bool*/ x14 = subborrow_u51(x11, x4, 0x7ffffffffffff, &x13);
204
+ { uint64_t x16; uint8_t/*bool*/ x17 = subborrow_u51(x14, x6, 0x7ffffffffffff, &x16);
205
+ { uint64_t x19; uint8_t/*bool*/ x20 = subborrow_u51(x17, x8, 0x7ffffffffffff, &x19);
206
+ { uint64_t x22; uint8_t/*bool*/ x23 = subborrow_u51(x20, x7, 0x7ffffffffffff, &x22);
207
+ { uint64_t x24 = cmovznz64(x23, 0x0, 0xffffffffffffffffL);
208
+ { uint64_t x25 = (x24 & 0x7ffffffffffed);
209
+ { uint64_t x27; uint8_t/*bool*/ x28 = addcarryx_u51(0x0, x10, x25, &x27);
210
+ { uint64_t x29 = (x24 & 0x7ffffffffffff);
211
+ { uint64_t x31; uint8_t/*bool*/ x32 = addcarryx_u51(x28, x13, x29, &x31);
212
+ { uint64_t x33 = (x24 & 0x7ffffffffffff);
213
+ { uint64_t x35; uint8_t/*bool*/ x36 = addcarryx_u51(x32, x16, x33, &x35);
214
+ { uint64_t x37 = (x24 & 0x7ffffffffffff);
215
+ { uint64_t x39; uint8_t/*bool*/ x40 = addcarryx_u51(x36, x19, x37, &x39);
216
+ { uint64_t x41 = (x24 & 0x7ffffffffffff);
217
+ { uint64_t x43; addcarryx_u51(x40, x22, x41, &x43);
218
+ out[0] = x27;
219
+ out[1] = x31;
220
+ out[2] = x35;
221
+ out[3] = x39;
222
+ out[4] = x43;
223
+ }}}}}}}}}}}}}}}}}}}}}
224
+ }
225
+
226
+ static void fe_tobytes(uint8_t s[32], const fe *f) {
227
+ assert_fe(f->v);
228
+ uint64_t h[5];
229
+ fe_freeze(h, f->v);
230
+ assert_fe_frozen(h);
231
+
232
+ s[0] = h[0] >> 0;
233
+ s[1] = h[0] >> 8;
234
+ s[2] = h[0] >> 16;
235
+ s[3] = h[0] >> 24;
236
+ s[4] = h[0] >> 32;
237
+ s[5] = h[0] >> 40;
238
+ s[6] = (h[0] >> 48) | (h[1] << 3);
239
+ s[7] = h[1] >> 5;
240
+ s[8] = h[1] >> 13;
241
+ s[9] = h[1] >> 21;
242
+ s[10] = h[1] >> 29;
243
+ s[11] = h[1] >> 37;
244
+ s[12] = (h[1] >> 45) | (h[2] << 6);
245
+ s[13] = h[2] >> 2;
246
+ s[14] = h[2] >> 10;
247
+ s[15] = h[2] >> 18;
248
+ s[16] = h[2] >> 26;
249
+ s[17] = h[2] >> 34;
250
+ s[18] = h[2] >> 42;
251
+ s[19] = (h[2] >> 50) | (h[3] << 1);
252
+ s[20] = h[3] >> 7;
253
+ s[21] = h[3] >> 15;
254
+ s[22] = h[3] >> 23;
255
+ s[23] = h[3] >> 31;
256
+ s[24] = h[3] >> 39;
257
+ s[25] = (h[3] >> 47) | (h[4] << 4);
258
+ s[26] = h[4] >> 4;
259
+ s[27] = h[4] >> 12;
260
+ s[28] = h[4] >> 20;
261
+ s[29] = h[4] >> 28;
262
+ s[30] = h[4] >> 36;
263
+ s[31] = h[4] >> 44;
264
+ }
265
+
266
+ // h = 0
267
+ static void fe_0(fe *h) {
268
+ OPENSSL_memset(h, 0, sizeof(fe));
269
+ }
270
+
271
+ static void fe_loose_0(fe_loose *h) {
272
+ OPENSSL_memset(h, 0, sizeof(fe_loose));
273
+ }
274
+
275
+ // h = 1
276
+ static void fe_1(fe *h) {
277
+ OPENSSL_memset(h, 0, sizeof(fe));
278
+ h->v[0] = 1;
279
+ }
280
+
281
+ static void fe_loose_1(fe_loose *h) {
282
+ OPENSSL_memset(h, 0, sizeof(fe_loose));
283
+ h->v[0] = 1;
284
+ }
285
+
286
+ static void fe_add_impl(uint64_t out[5], const uint64_t in1[5], const uint64_t in2[5]) {
287
+ { const uint64_t x10 = in1[4];
288
+ { const uint64_t x11 = in1[3];
289
+ { const uint64_t x9 = in1[2];
290
+ { const uint64_t x7 = in1[1];
291
+ { const uint64_t x5 = in1[0];
292
+ { const uint64_t x18 = in2[4];
293
+ { const uint64_t x19 = in2[3];
294
+ { const uint64_t x17 = in2[2];
295
+ { const uint64_t x15 = in2[1];
296
+ { const uint64_t x13 = in2[0];
297
+ out[0] = (x5 + x13);
298
+ out[1] = (x7 + x15);
299
+ out[2] = (x9 + x17);
300
+ out[3] = (x11 + x19);
301
+ out[4] = (x10 + x18);
302
+ }}}}}}}}}}
303
+ }
304
+
305
+ // h = f + g
306
+ // Can overlap h with f or g.
307
+ static void fe_add(fe_loose *h, const fe *f, const fe *g) {
308
+ assert_fe(f->v);
309
+ assert_fe(g->v);
310
+ fe_add_impl(h->v, f->v, g->v);
311
+ assert_fe_loose(h->v);
312
+ }
313
+
314
+ static void fe_sub_impl(uint64_t out[5], const uint64_t in1[5], const uint64_t in2[5]) {
315
+ { const uint64_t x10 = in1[4];
316
+ { const uint64_t x11 = in1[3];
317
+ { const uint64_t x9 = in1[2];
318
+ { const uint64_t x7 = in1[1];
319
+ { const uint64_t x5 = in1[0];
320
+ { const uint64_t x18 = in2[4];
321
+ { const uint64_t x19 = in2[3];
322
+ { const uint64_t x17 = in2[2];
323
+ { const uint64_t x15 = in2[1];
324
+ { const uint64_t x13 = in2[0];
325
+ out[0] = ((0xfffffffffffda + x5) - x13);
326
+ out[1] = ((0xffffffffffffe + x7) - x15);
327
+ out[2] = ((0xffffffffffffe + x9) - x17);
328
+ out[3] = ((0xffffffffffffe + x11) - x19);
329
+ out[4] = ((0xffffffffffffe + x10) - x18);
330
+ }}}}}}}}}}
331
+ }
332
+
333
+ // h = f - g
334
+ // Can overlap h with f or g.
335
+ static void fe_sub(fe_loose *h, const fe *f, const fe *g) {
336
+ assert_fe(f->v);
337
+ assert_fe(g->v);
338
+ fe_sub_impl(h->v, f->v, g->v);
339
+ assert_fe_loose(h->v);
340
+ }
341
+
342
+ static void fe_carry_impl(uint64_t out[5], const uint64_t in1[5]) {
343
+ { const uint64_t x7 = in1[4];
344
+ { const uint64_t x8 = in1[3];
345
+ { const uint64_t x6 = in1[2];
346
+ { const uint64_t x4 = in1[1];
347
+ { const uint64_t x2 = in1[0];
348
+ { uint64_t x9 = (x2 >> 0x33);
349
+ { uint64_t x10 = (x2 & 0x7ffffffffffff);
350
+ { uint64_t x11 = (x9 + x4);
351
+ { uint64_t x12 = (x11 >> 0x33);
352
+ { uint64_t x13 = (x11 & 0x7ffffffffffff);
353
+ { uint64_t x14 = (x12 + x6);
354
+ { uint64_t x15 = (x14 >> 0x33);
355
+ { uint64_t x16 = (x14 & 0x7ffffffffffff);
356
+ { uint64_t x17 = (x15 + x8);
357
+ { uint64_t x18 = (x17 >> 0x33);
358
+ { uint64_t x19 = (x17 & 0x7ffffffffffff);
359
+ { uint64_t x20 = (x18 + x7);
360
+ { uint64_t x21 = (x20 >> 0x33);
361
+ { uint64_t x22 = (x20 & 0x7ffffffffffff);
362
+ { uint64_t x23 = (x10 + (0x13 * x21));
363
+ { uint64_t x24 = (x23 >> 0x33);
364
+ { uint64_t x25 = (x23 & 0x7ffffffffffff);
365
+ { uint64_t x26 = (x24 + x13);
366
+ { uint64_t x27 = (x26 >> 0x33);
367
+ { uint64_t x28 = (x26 & 0x7ffffffffffff);
368
+ out[0] = x25;
369
+ out[1] = x28;
370
+ out[2] = (x27 + x16);
371
+ out[3] = x19;
372
+ out[4] = x22;
373
+ }}}}}}}}}}}}}}}}}}}}}}}}}
374
+ }
375
+
376
+ static void fe_carry(fe *h, const fe_loose* f) {
377
+ assert_fe_loose(f->v);
378
+ fe_carry_impl(h->v, f->v);
379
+ assert_fe(h->v);
380
+ }
381
+
382
+ static void fe_mul_impl(uint64_t out[5], const uint64_t in1[5], const uint64_t in2[5]) {
383
+ assert_fe_loose(in1);
384
+ assert_fe_loose(in2);
385
+ { const uint64_t x10 = in1[4];
386
+ { const uint64_t x11 = in1[3];
387
+ { const uint64_t x9 = in1[2];
388
+ { const uint64_t x7 = in1[1];
389
+ { const uint64_t x5 = in1[0];
390
+ { const uint64_t x18 = in2[4];
391
+ { const uint64_t x19 = in2[3];
392
+ { const uint64_t x17 = in2[2];
393
+ { const uint64_t x15 = in2[1];
394
+ { const uint64_t x13 = in2[0];
395
+ { uint128_t x20 = ((uint128_t)x5 * x13);
396
+ { uint128_t x21 = (((uint128_t)x5 * x15) + ((uint128_t)x7 * x13));
397
+ { uint128_t x22 = ((((uint128_t)x5 * x17) + ((uint128_t)x9 * x13)) + ((uint128_t)x7 * x15));
398
+ { uint128_t x23 = (((((uint128_t)x5 * x19) + ((uint128_t)x11 * x13)) + ((uint128_t)x7 * x17)) + ((uint128_t)x9 * x15));
399
+ { uint128_t x24 = ((((((uint128_t)x5 * x18) + ((uint128_t)x10 * x13)) + ((uint128_t)x11 * x15)) + ((uint128_t)x7 * x19)) + ((uint128_t)x9 * x17));
400
+ { uint64_t x25 = (x10 * 0x13);
401
+ { uint64_t x26 = (x7 * 0x13);
402
+ { uint64_t x27 = (x9 * 0x13);
403
+ { uint64_t x28 = (x11 * 0x13);
404
+ { uint128_t x29 = ((((x20 + ((uint128_t)x25 * x15)) + ((uint128_t)x26 * x18)) + ((uint128_t)x27 * x19)) + ((uint128_t)x28 * x17));
405
+ { uint128_t x30 = (((x21 + ((uint128_t)x25 * x17)) + ((uint128_t)x27 * x18)) + ((uint128_t)x28 * x19));
406
+ { uint128_t x31 = ((x22 + ((uint128_t)x25 * x19)) + ((uint128_t)x28 * x18));
407
+ { uint128_t x32 = (x23 + ((uint128_t)x25 * x18));
408
+ { uint64_t x33 = (uint64_t) (x29 >> 0x33);
409
+ { uint64_t x34 = ((uint64_t)x29 & 0x7ffffffffffff);
410
+ { uint128_t x35 = (x33 + x30);
411
+ { uint64_t x36 = (uint64_t) (x35 >> 0x33);
412
+ { uint64_t x37 = ((uint64_t)x35 & 0x7ffffffffffff);
413
+ { uint128_t x38 = (x36 + x31);
414
+ { uint64_t x39 = (uint64_t) (x38 >> 0x33);
415
+ { uint64_t x40 = ((uint64_t)x38 & 0x7ffffffffffff);
416
+ { uint128_t x41 = (x39 + x32);
417
+ { uint64_t x42 = (uint64_t) (x41 >> 0x33);
418
+ { uint64_t x43 = ((uint64_t)x41 & 0x7ffffffffffff);
419
+ { uint128_t x44 = (x42 + x24);
420
+ { uint64_t x45 = (uint64_t) (x44 >> 0x33);
421
+ { uint64_t x46 = ((uint64_t)x44 & 0x7ffffffffffff);
422
+ { uint64_t x47 = (x34 + (0x13 * x45));
423
+ { uint64_t x48 = (x47 >> 0x33);
424
+ { uint64_t x49 = (x47 & 0x7ffffffffffff);
425
+ { uint64_t x50 = (x48 + x37);
426
+ { uint64_t x51 = (x50 >> 0x33);
427
+ { uint64_t x52 = (x50 & 0x7ffffffffffff);
428
+ out[0] = x49;
429
+ out[1] = x52;
430
+ out[2] = (x51 + x40);
431
+ out[3] = x43;
432
+ out[4] = x46;
433
+ }}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}
434
+ assert_fe(out);
435
+ }
436
+
437
+ static void fe_mul_ltt(fe_loose *h, const fe *f, const fe *g) {
438
+ fe_mul_impl(h->v, f->v, g->v);
439
+ }
440
+
441
+ static void fe_mul_llt(fe_loose *h, const fe_loose *f, const fe *g) {
442
+ fe_mul_impl(h->v, f->v, g->v);
443
+ }
444
+
445
+ static void fe_mul_ttt(fe *h, const fe *f, const fe *g) {
446
+ fe_mul_impl(h->v, f->v, g->v);
447
+ }
448
+
449
+ static void fe_mul_tlt(fe *h, const fe_loose *f, const fe *g) {
450
+ fe_mul_impl(h->v, f->v, g->v);
451
+ }
452
+
453
+ static void fe_mul_ttl(fe *h, const fe *f, const fe_loose *g) {
454
+ fe_mul_impl(h->v, f->v, g->v);
455
+ }
456
+
457
+ static void fe_mul_tll(fe *h, const fe_loose *f, const fe_loose *g) {
458
+ fe_mul_impl(h->v, f->v, g->v);
459
+ }
460
+
461
+ static void fe_sqr_impl(uint64_t out[5], const uint64_t in1[5]) {
462
+ assert_fe_loose(in1);
463
+ { const uint64_t x7 = in1[4];
464
+ { const uint64_t x8 = in1[3];
465
+ { const uint64_t x6 = in1[2];
466
+ { const uint64_t x4 = in1[1];
467
+ { const uint64_t x2 = in1[0];
468
+ { uint64_t x9 = (x2 * 0x2);
469
+ { uint64_t x10 = (x4 * 0x2);
470
+ { uint64_t x11 = ((x6 * 0x2) * 0x13);
471
+ { uint64_t x12 = (x7 * 0x13);
472
+ { uint64_t x13 = (x12 * 0x2);
473
+ { uint128_t x14 = ((((uint128_t)x2 * x2) + ((uint128_t)x13 * x4)) + ((uint128_t)x11 * x8));
474
+ { uint128_t x15 = ((((uint128_t)x9 * x4) + ((uint128_t)x13 * x6)) + ((uint128_t)x8 * (x8 * 0x13)));
475
+ { uint128_t x16 = ((((uint128_t)x9 * x6) + ((uint128_t)x4 * x4)) + ((uint128_t)x13 * x8));
476
+ { uint128_t x17 = ((((uint128_t)x9 * x8) + ((uint128_t)x10 * x6)) + ((uint128_t)x7 * x12));
477
+ { uint128_t x18 = ((((uint128_t)x9 * x7) + ((uint128_t)x10 * x8)) + ((uint128_t)x6 * x6));
478
+ { uint64_t x19 = (uint64_t) (x14 >> 0x33);
479
+ { uint64_t x20 = ((uint64_t)x14 & 0x7ffffffffffff);
480
+ { uint128_t x21 = (x19 + x15);
481
+ { uint64_t x22 = (uint64_t) (x21 >> 0x33);
482
+ { uint64_t x23 = ((uint64_t)x21 & 0x7ffffffffffff);
483
+ { uint128_t x24 = (x22 + x16);
484
+ { uint64_t x25 = (uint64_t) (x24 >> 0x33);
485
+ { uint64_t x26 = ((uint64_t)x24 & 0x7ffffffffffff);
486
+ { uint128_t x27 = (x25 + x17);
487
+ { uint64_t x28 = (uint64_t) (x27 >> 0x33);
488
+ { uint64_t x29 = ((uint64_t)x27 & 0x7ffffffffffff);
489
+ { uint128_t x30 = (x28 + x18);
490
+ { uint64_t x31 = (uint64_t) (x30 >> 0x33);
491
+ { uint64_t x32 = ((uint64_t)x30 & 0x7ffffffffffff);
492
+ { uint64_t x33 = (x20 + (0x13 * x31));
493
+ { uint64_t x34 = (x33 >> 0x33);
494
+ { uint64_t x35 = (x33 & 0x7ffffffffffff);
495
+ { uint64_t x36 = (x34 + x23);
496
+ { uint64_t x37 = (x36 >> 0x33);
497
+ { uint64_t x38 = (x36 & 0x7ffffffffffff);
498
+ out[0] = x35;
499
+ out[1] = x38;
500
+ out[2] = (x37 + x26);
501
+ out[3] = x29;
502
+ out[4] = x32;
503
+ }}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}
504
+ assert_fe(out);
505
+ }
506
+
507
+ static void fe_sq_tl(fe *h, const fe_loose *f) {
508
+ fe_sqr_impl(h->v, f->v);
509
+ }
510
+
511
+ static void fe_sq_tt(fe *h, const fe *f) {
512
+ fe_sqr_impl(h->v, f->v);
513
+ }
514
+
515
+ // Replace (f,g) with (g,f) if b == 1;
516
+ // replace (f,g) with (f,g) if b == 0.
517
+ //
518
+ // Preconditions: b in {0,1}.
519
+ static void fe_cswap(fe *f, fe *g, uint64_t b) {
520
+ b = 0-b;
521
+ for (unsigned i = 0; i < 5; i++) {
522
+ uint64_t x = f->v[i] ^ g->v[i];
523
+ x &= b;
524
+ f->v[i] ^= x;
525
+ g->v[i] ^= x;
526
+ }
527
+ }
528
+
529
+ // NOTE: based on fiat-crypto fe_mul, edited for in2=121666, 0, 0..
530
+ static void fe_mul_121666_impl(uint64_t out[5], const uint64_t in1[5]) {
531
+ { const uint64_t x10 = in1[4];
532
+ { const uint64_t x11 = in1[3];
533
+ { const uint64_t x9 = in1[2];
534
+ { const uint64_t x7 = in1[1];
535
+ { const uint64_t x5 = in1[0];
536
+ { const uint64_t x18 = 0;
537
+ { const uint64_t x19 = 0;
538
+ { const uint64_t x17 = 0;
539
+ { const uint64_t x15 = 0;
540
+ { const uint64_t x13 = 121666;
541
+ { uint128_t x20 = ((uint128_t)x5 * x13);
542
+ { uint128_t x21 = (((uint128_t)x5 * x15) + ((uint128_t)x7 * x13));
543
+ { uint128_t x22 = ((((uint128_t)x5 * x17) + ((uint128_t)x9 * x13)) + ((uint128_t)x7 * x15));
544
+ { uint128_t x23 = (((((uint128_t)x5 * x19) + ((uint128_t)x11 * x13)) + ((uint128_t)x7 * x17)) + ((uint128_t)x9 * x15));
545
+ { uint128_t x24 = ((((((uint128_t)x5 * x18) + ((uint128_t)x10 * x13)) + ((uint128_t)x11 * x15)) + ((uint128_t)x7 * x19)) + ((uint128_t)x9 * x17));
546
+ { uint64_t x25 = (x10 * 0x13);
547
+ { uint64_t x26 = (x7 * 0x13);
548
+ { uint64_t x27 = (x9 * 0x13);
549
+ { uint64_t x28 = (x11 * 0x13);
550
+ { uint128_t x29 = ((((x20 + ((uint128_t)x25 * x15)) + ((uint128_t)x26 * x18)) + ((uint128_t)x27 * x19)) + ((uint128_t)x28 * x17));
551
+ { uint128_t x30 = (((x21 + ((uint128_t)x25 * x17)) + ((uint128_t)x27 * x18)) + ((uint128_t)x28 * x19));
552
+ { uint128_t x31 = ((x22 + ((uint128_t)x25 * x19)) + ((uint128_t)x28 * x18));
553
+ { uint128_t x32 = (x23 + ((uint128_t)x25 * x18));
554
+ { uint64_t x33 = (uint64_t) (x29 >> 0x33);
555
+ { uint64_t x34 = ((uint64_t)x29 & 0x7ffffffffffff);
556
+ { uint128_t x35 = (x33 + x30);
557
+ { uint64_t x36 = (uint64_t) (x35 >> 0x33);
558
+ { uint64_t x37 = ((uint64_t)x35 & 0x7ffffffffffff);
559
+ { uint128_t x38 = (x36 + x31);
560
+ { uint64_t x39 = (uint64_t) (x38 >> 0x33);
561
+ { uint64_t x40 = ((uint64_t)x38 & 0x7ffffffffffff);
562
+ { uint128_t x41 = (x39 + x32);
563
+ { uint64_t x42 = (uint64_t) (x41 >> 0x33);
564
+ { uint64_t x43 = ((uint64_t)x41 & 0x7ffffffffffff);
565
+ { uint128_t x44 = (x42 + x24);
566
+ { uint64_t x45 = (uint64_t) (x44 >> 0x33);
567
+ { uint64_t x46 = ((uint64_t)x44 & 0x7ffffffffffff);
568
+ { uint64_t x47 = (x34 + (0x13 * x45));
569
+ { uint64_t x48 = (x47 >> 0x33);
570
+ { uint64_t x49 = (x47 & 0x7ffffffffffff);
571
+ { uint64_t x50 = (x48 + x37);
572
+ { uint64_t x51 = (x50 >> 0x33);
573
+ { uint64_t x52 = (x50 & 0x7ffffffffffff);
574
+ out[0] = x49;
575
+ out[1] = x52;
576
+ out[2] = (x51 + x40);
577
+ out[3] = x43;
578
+ out[4] = x46;
579
+ }}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}
580
+ }
581
+
582
+ static void fe_mul121666(fe *h, const fe_loose *f) {
583
+ assert_fe_loose(f->v);
584
+ fe_mul_121666_impl(h->v, f->v);
585
+ assert_fe(h->v);
586
+ }
587
+
588
+ // Adapted from Fiat-synthesized |fe_sub_impl| with |out| = 0.
589
+ static void fe_neg_impl(uint64_t out[5], const uint64_t in2[5]) {
590
+ { const uint64_t x10 = 0;
591
+ { const uint64_t x11 = 0;
592
+ { const uint64_t x9 = 0;
593
+ { const uint64_t x7 = 0;
594
+ { const uint64_t x5 = 0;
595
+ { const uint64_t x18 = in2[4];
596
+ { const uint64_t x19 = in2[3];
597
+ { const uint64_t x17 = in2[2];
598
+ { const uint64_t x15 = in2[1];
599
+ { const uint64_t x13 = in2[0];
600
+ out[0] = ((0xfffffffffffda + x5) - x13);
601
+ out[1] = ((0xffffffffffffe + x7) - x15);
602
+ out[2] = ((0xffffffffffffe + x9) - x17);
603
+ out[3] = ((0xffffffffffffe + x11) - x19);
604
+ out[4] = ((0xffffffffffffe + x10) - x18);
605
+ }}}}}}}}}}
606
+ }
607
+
608
+ // h = -f
609
+ static void fe_neg(fe_loose *h, const fe *f) {
610
+ assert_fe(f->v);
611
+ fe_neg_impl(h->v, f->v);
612
+ assert_fe_loose(h->v);
613
+ }
614
+
615
+ // Replace (f,g) with (g,g) if b == 1;
616
+ // replace (f,g) with (f,g) if b == 0.
617
+ //
618
+ // Preconditions: b in {0,1}.
619
+ static void fe_cmov(fe_loose *f, const fe_loose *g, uint64_t b) {
620
+ b = 0-b;
621
+ for (unsigned i = 0; i < 5; i++) {
622
+ uint64_t x = f->v[i] ^ g->v[i];
623
+ x &= b;
624
+ f->v[i] ^= x;
625
+ }
626
+ }
627
+
628
+ #else
629
+
64
630
  #define assert_fe(f) do { \
65
631
  for (unsigned _assert_fe_i = 0; _assert_fe_i< 10; _assert_fe_i++) { \
66
632
  assert(f[_assert_fe_i] < 1.125*(1<<(26-(_assert_fe_i&1)))); \
@@ -73,6 +639,12 @@ static uint64_t load_4(const uint8_t *in) {
73
639
  } \
74
640
  } while (0)
75
641
 
642
+ #define assert_fe_frozen(f) do { \
643
+ for (unsigned _assert_fe_i = 0; _assert_fe_i< 10; _assert_fe_i++) { \
644
+ assert(f[_assert_fe_i] < (1u<<(26-(_assert_fe_i&1)))); \
645
+ } \
646
+ } while (0)
647
+
76
648
  static void fe_frombytes_impl(uint32_t h[10], const uint8_t *s) {
77
649
  // Ignores top bit of s.
78
650
  uint32_t a0 = load_4(s);
@@ -100,148 +672,118 @@ static void fe_frombytes(fe *h, const uint8_t *s) {
100
672
  fe_frombytes_impl(h->v, s);
101
673
  }
102
674
 
103
- // Preconditions:
104
- // |h| bounded by 1.1*2^26,1.1*2^25,1.1*2^26,1.1*2^25,etc.
105
- //
106
- // Write p=2^255-19; q=floor(h/p).
107
- // Basic claim: q = floor(2^(-255)(h + 19 2^(-25)h9 + 2^(-1))).
108
- //
109
- // Proof:
110
- // Have |h|<=p so |q|<=1 so |19^2 2^(-255) q|<1/4.
111
- // Also have |h-2^230 h9|<2^231 so |19 2^(-255)(h-2^230 h9)|<1/4.
112
- //
113
- // Write y=2^(-1)-19^2 2^(-255)q-19 2^(-255)(h-2^230 h9).
114
- // Then 0<y<1.
115
- //
116
- // Write r=h-pq.
117
- // Have 0<=r<=p-1=2^255-20.
118
- // Thus 0<=r+19(2^-255)r<r+19(2^-255)2^255<=2^255-1.
119
- //
120
- // Write x=r+19(2^-255)r+y.
121
- // Then 0<x<2^255 so floor(2^(-255)x) = 0 so floor(q+2^(-255)x) = q.
122
- //
123
- // Have q+2^(-255)x = 2^(-255)(h + 19 2^(-25) h9 + 2^(-1))
124
- // so floor(2^(-255)(h + 19 2^(-25) h9 + 2^(-1))) = q.
125
- static void fe_tobytes_impl(uint8_t *s, const uint32_t h[10]) {
126
- assert_fe_loose(h);
127
- int32_t h0 = h[0];
128
- int32_t h1 = h[1];
129
- int32_t h2 = h[2];
130
- int32_t h3 = h[3];
131
- int32_t h4 = h[4];
132
- int32_t h5 = h[5];
133
- int32_t h6 = h[6];
134
- int32_t h7 = h[7];
135
- int32_t h8 = h[8];
136
- int32_t h9 = h[9];
137
- int32_t q;
138
-
139
- q = (19 * h9 + (((int32_t) 1) << 24)) >> 25;
140
- q = (h0 + q) >> 26;
141
- q = (h1 + q) >> 25;
142
- q = (h2 + q) >> 26;
143
- q = (h3 + q) >> 25;
144
- q = (h4 + q) >> 26;
145
- q = (h5 + q) >> 25;
146
- q = (h6 + q) >> 26;
147
- q = (h7 + q) >> 25;
148
- q = (h8 + q) >> 26;
149
- q = (h9 + q) >> 25;
150
-
151
- // Goal: Output h-(2^255-19)q, which is between 0 and 2^255-20.
152
- h0 += 19 * q;
153
- // Goal: Output h-2^255 q, which is between 0 and 2^255-20.
154
-
155
- h1 += h0 >> 26; h0 &= kBottom26Bits;
156
- h2 += h1 >> 25; h1 &= kBottom25Bits;
157
- h3 += h2 >> 26; h2 &= kBottom26Bits;
158
- h4 += h3 >> 25; h3 &= kBottom25Bits;
159
- h5 += h4 >> 26; h4 &= kBottom26Bits;
160
- h6 += h5 >> 25; h5 &= kBottom25Bits;
161
- h7 += h6 >> 26; h6 &= kBottom26Bits;
162
- h8 += h7 >> 25; h7 &= kBottom25Bits;
163
- h9 += h8 >> 26; h8 &= kBottom26Bits;
164
- h9 &= kBottom25Bits;
165
- // h10 = carry9
166
-
167
- // Goal: Output h0+...+2^255 h10-2^255 q, which is between 0 and 2^255-20.
168
- // Have h0+...+2^230 h9 between 0 and 2^255-1;
169
- // evidently 2^255 h10-2^255 q = 0.
170
- // Goal: Output h0+...+2^230 h9.
171
-
172
- s[0] = h0 >> 0;
173
- s[1] = h0 >> 8;
174
- s[2] = h0 >> 16;
175
- s[3] = (h0 >> 24) | ((uint32_t)(h1) << 2);
176
- s[4] = h1 >> 6;
177
- s[5] = h1 >> 14;
178
- s[6] = (h1 >> 22) | ((uint32_t)(h2) << 3);
179
- s[7] = h2 >> 5;
180
- s[8] = h2 >> 13;
181
- s[9] = (h2 >> 21) | ((uint32_t)(h3) << 5);
182
- s[10] = h3 >> 3;
183
- s[11] = h3 >> 11;
184
- s[12] = (h3 >> 19) | ((uint32_t)(h4) << 6);
185
- s[13] = h4 >> 2;
186
- s[14] = h4 >> 10;
187
- s[15] = h4 >> 18;
188
- s[16] = h5 >> 0;
189
- s[17] = h5 >> 8;
190
- s[18] = h5 >> 16;
191
- s[19] = (h5 >> 24) | ((uint32_t)(h6) << 1);
192
- s[20] = h6 >> 7;
193
- s[21] = h6 >> 15;
194
- s[22] = (h6 >> 23) | ((uint32_t)(h7) << 3);
195
- s[23] = h7 >> 5;
196
- s[24] = h7 >> 13;
197
- s[25] = (h7 >> 21) | ((uint32_t)(h8) << 4);
198
- s[26] = h8 >> 4;
199
- s[27] = h8 >> 12;
200
- s[28] = (h8 >> 20) | ((uint32_t)(h9) << 6);
201
- s[29] = h9 >> 2;
202
- s[30] = h9 >> 10;
203
- s[31] = h9 >> 18;
204
- }
205
-
206
- static void fe_tobytes(uint8_t *s, const fe *h) {
207
- fe_tobytes_impl(s, h->v);
208
- }
209
-
210
- static void fe_loose_tobytes(uint8_t *s, const fe_loose *h) {
211
- fe_tobytes_impl(s, h->v);
212
- }
213
-
214
- // h = f
215
- static void fe_copy(fe *h, const fe *f) {
216
- OPENSSL_memmove(h, f, sizeof(uint32_t) * 10);
217
- }
218
-
219
- static void fe_copy_lt(fe_loose *h, const fe *f) {
220
- OPENSSL_memmove(h, f, sizeof(uint32_t) * 10);
221
- }
222
- #if !defined(OPENSSL_SMALL)
223
- static void fe_copy_ll(fe_loose *h, const fe_loose *f) {
224
- OPENSSL_memmove(h, f, sizeof(uint32_t) * 10);
675
+ static void fe_freeze(uint32_t out[10], const uint32_t in1[10]) {
676
+ { const uint32_t x17 = in1[9];
677
+ { const uint32_t x18 = in1[8];
678
+ { const uint32_t x16 = in1[7];
679
+ { const uint32_t x14 = in1[6];
680
+ { const uint32_t x12 = in1[5];
681
+ { const uint32_t x10 = in1[4];
682
+ { const uint32_t x8 = in1[3];
683
+ { const uint32_t x6 = in1[2];
684
+ { const uint32_t x4 = in1[1];
685
+ { const uint32_t x2 = in1[0];
686
+ { uint32_t x20; uint8_t/*bool*/ x21 = subborrow_u26(0x0, x2, 0x3ffffed, &x20);
687
+ { uint32_t x23; uint8_t/*bool*/ x24 = subborrow_u25(x21, x4, 0x1ffffff, &x23);
688
+ { uint32_t x26; uint8_t/*bool*/ x27 = subborrow_u26(x24, x6, 0x3ffffff, &x26);
689
+ { uint32_t x29; uint8_t/*bool*/ x30 = subborrow_u25(x27, x8, 0x1ffffff, &x29);
690
+ { uint32_t x32; uint8_t/*bool*/ x33 = subborrow_u26(x30, x10, 0x3ffffff, &x32);
691
+ { uint32_t x35; uint8_t/*bool*/ x36 = subborrow_u25(x33, x12, 0x1ffffff, &x35);
692
+ { uint32_t x38; uint8_t/*bool*/ x39 = subborrow_u26(x36, x14, 0x3ffffff, &x38);
693
+ { uint32_t x41; uint8_t/*bool*/ x42 = subborrow_u25(x39, x16, 0x1ffffff, &x41);
694
+ { uint32_t x44; uint8_t/*bool*/ x45 = subborrow_u26(x42, x18, 0x3ffffff, &x44);
695
+ { uint32_t x47; uint8_t/*bool*/ x48 = subborrow_u25(x45, x17, 0x1ffffff, &x47);
696
+ { uint32_t x49 = cmovznz32(x48, 0x0, 0xffffffff);
697
+ { uint32_t x50 = (x49 & 0x3ffffed);
698
+ { uint32_t x52; uint8_t/*bool*/ x53 = addcarryx_u26(0x0, x20, x50, &x52);
699
+ { uint32_t x54 = (x49 & 0x1ffffff);
700
+ { uint32_t x56; uint8_t/*bool*/ x57 = addcarryx_u25(x53, x23, x54, &x56);
701
+ { uint32_t x58 = (x49 & 0x3ffffff);
702
+ { uint32_t x60; uint8_t/*bool*/ x61 = addcarryx_u26(x57, x26, x58, &x60);
703
+ { uint32_t x62 = (x49 & 0x1ffffff);
704
+ { uint32_t x64; uint8_t/*bool*/ x65 = addcarryx_u25(x61, x29, x62, &x64);
705
+ { uint32_t x66 = (x49 & 0x3ffffff);
706
+ { uint32_t x68; uint8_t/*bool*/ x69 = addcarryx_u26(x65, x32, x66, &x68);
707
+ { uint32_t x70 = (x49 & 0x1ffffff);
708
+ { uint32_t x72; uint8_t/*bool*/ x73 = addcarryx_u25(x69, x35, x70, &x72);
709
+ { uint32_t x74 = (x49 & 0x3ffffff);
710
+ { uint32_t x76; uint8_t/*bool*/ x77 = addcarryx_u26(x73, x38, x74, &x76);
711
+ { uint32_t x78 = (x49 & 0x1ffffff);
712
+ { uint32_t x80; uint8_t/*bool*/ x81 = addcarryx_u25(x77, x41, x78, &x80);
713
+ { uint32_t x82 = (x49 & 0x3ffffff);
714
+ { uint32_t x84; uint8_t/*bool*/ x85 = addcarryx_u26(x81, x44, x82, &x84);
715
+ { uint32_t x86 = (x49 & 0x1ffffff);
716
+ { uint32_t x88; addcarryx_u25(x85, x47, x86, &x88);
717
+ out[0] = x52;
718
+ out[1] = x56;
719
+ out[2] = x60;
720
+ out[3] = x64;
721
+ out[4] = x68;
722
+ out[5] = x72;
723
+ out[6] = x76;
724
+ out[7] = x80;
725
+ out[8] = x84;
726
+ out[9] = x88;
727
+ }}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}
728
+ }
729
+
730
+ static void fe_tobytes(uint8_t s[32], const fe *f) {
731
+ assert_fe(f->v);
732
+ uint32_t h[10];
733
+ fe_freeze(h, f->v);
734
+ assert_fe_frozen(h);
735
+
736
+ s[0] = h[0] >> 0;
737
+ s[1] = h[0] >> 8;
738
+ s[2] = h[0] >> 16;
739
+ s[3] = (h[0] >> 24) | (h[1] << 2);
740
+ s[4] = h[1] >> 6;
741
+ s[5] = h[1] >> 14;
742
+ s[6] = (h[1] >> 22) | (h[2] << 3);
743
+ s[7] = h[2] >> 5;
744
+ s[8] = h[2] >> 13;
745
+ s[9] = (h[2] >> 21) | (h[3] << 5);
746
+ s[10] = h[3] >> 3;
747
+ s[11] = h[3] >> 11;
748
+ s[12] = (h[3] >> 19) | (h[4] << 6);
749
+ s[13] = h[4] >> 2;
750
+ s[14] = h[4] >> 10;
751
+ s[15] = h[4] >> 18;
752
+ s[16] = h[5] >> 0;
753
+ s[17] = h[5] >> 8;
754
+ s[18] = h[5] >> 16;
755
+ s[19] = (h[5] >> 24) | (h[6] << 1);
756
+ s[20] = h[6] >> 7;
757
+ s[21] = h[6] >> 15;
758
+ s[22] = (h[6] >> 23) | (h[7] << 3);
759
+ s[23] = h[7] >> 5;
760
+ s[24] = h[7] >> 13;
761
+ s[25] = (h[7] >> 21) | (h[8] << 4);
762
+ s[26] = h[8] >> 4;
763
+ s[27] = h[8] >> 12;
764
+ s[28] = (h[8] >> 20) | (h[9] << 6);
765
+ s[29] = h[9] >> 2;
766
+ s[30] = h[9] >> 10;
767
+ s[31] = h[9] >> 18;
225
768
  }
226
- #endif // !defined(OPENSSL_SMALL)
227
769
 
228
770
  // h = 0
229
771
  static void fe_0(fe *h) {
230
- OPENSSL_memset(h, 0, sizeof(uint32_t) * 10);
772
+ OPENSSL_memset(h, 0, sizeof(fe));
231
773
  }
232
774
 
233
775
  static void fe_loose_0(fe_loose *h) {
234
- OPENSSL_memset(h, 0, sizeof(uint32_t) * 10);
776
+ OPENSSL_memset(h, 0, sizeof(fe_loose));
235
777
  }
236
778
 
237
779
  // h = 1
238
780
  static void fe_1(fe *h) {
239
- OPENSSL_memset(h, 0, sizeof(uint32_t) * 10);
781
+ OPENSSL_memset(h, 0, sizeof(fe));
240
782
  h->v[0] = 1;
241
783
  }
242
784
 
243
785
  static void fe_loose_1(fe_loose *h) {
244
- OPENSSL_memset(h, 0, sizeof(uint32_t) * 10);
786
+ OPENSSL_memset(h, 0, sizeof(fe_loose));
245
787
  h->v[0] = 1;
246
788
  }
247
789
 
@@ -281,13 +823,6 @@ static void fe_add_impl(uint32_t out[10], const uint32_t in1[10], const uint32_t
281
823
 
282
824
  // h = f + g
283
825
  // Can overlap h with f or g.
284
- //
285
- // Preconditions:
286
- // |f| bounded by 1.1*2^25,1.1*2^24,1.1*2^25,1.1*2^24,etc.
287
- // |g| bounded by 1.1*2^25,1.1*2^24,1.1*2^25,1.1*2^24,etc.
288
- //
289
- // Postconditions:
290
- // |h| bounded by 1.1*2^26,1.1*2^25,1.1*2^26,1.1*2^25,etc.
291
826
  static void fe_add(fe_loose *h, const fe *f, const fe *g) {
292
827
  assert_fe(f->v);
293
828
  assert_fe(g->v);
@@ -331,13 +866,6 @@ static void fe_sub_impl(uint32_t out[10], const uint32_t in1[10], const uint32_t
331
866
 
332
867
  // h = f - g
333
868
  // Can overlap h with f or g.
334
- //
335
- // Preconditions:
336
- // |f| bounded by 1.1*2^25,1.1*2^24,1.1*2^25,1.1*2^24,etc.
337
- // |g| bounded by 1.1*2^25,1.1*2^24,1.1*2^25,1.1*2^24,etc.
338
- //
339
- // Postconditions:
340
- // |h| bounded by 1.1*2^26,1.1*2^25,1.1*2^26,1.1*2^25,etc.
341
869
  static void fe_sub(fe_loose *h, const fe *f, const fe *g) {
342
870
  assert_fe(f->v);
343
871
  assert_fe(g->v);
@@ -667,158 +1195,23 @@ static void fe_sq_tt(fe *h, const fe *f) {
667
1195
  fe_sqr_impl(h->v, f->v);
668
1196
  }
669
1197
 
670
- static void fe_loose_invert(fe *out, const fe_loose *z) {
671
- fe t0;
672
- fe t1;
673
- fe t2;
674
- fe t3;
675
- int i;
676
-
677
- fe_sq_tl(&t0, z);
678
- fe_sq_tt(&t1, &t0);
679
- for (i = 1; i < 2; ++i) {
680
- fe_sq_tt(&t1, &t1);
681
- }
682
- fe_mul_tlt(&t1, z, &t1);
683
- fe_mul_ttt(&t0, &t0, &t1);
684
- fe_sq_tt(&t2, &t0);
685
- fe_mul_ttt(&t1, &t1, &t2);
686
- fe_sq_tt(&t2, &t1);
687
- for (i = 1; i < 5; ++i) {
688
- fe_sq_tt(&t2, &t2);
689
- }
690
- fe_mul_ttt(&t1, &t2, &t1);
691
- fe_sq_tt(&t2, &t1);
692
- for (i = 1; i < 10; ++i) {
693
- fe_sq_tt(&t2, &t2);
694
- }
695
- fe_mul_ttt(&t2, &t2, &t1);
696
- fe_sq_tt(&t3, &t2);
697
- for (i = 1; i < 20; ++i) {
698
- fe_sq_tt(&t3, &t3);
699
- }
700
- fe_mul_ttt(&t2, &t3, &t2);
701
- fe_sq_tt(&t2, &t2);
702
- for (i = 1; i < 10; ++i) {
703
- fe_sq_tt(&t2, &t2);
704
- }
705
- fe_mul_ttt(&t1, &t2, &t1);
706
- fe_sq_tt(&t2, &t1);
707
- for (i = 1; i < 50; ++i) {
708
- fe_sq_tt(&t2, &t2);
709
- }
710
- fe_mul_ttt(&t2, &t2, &t1);
711
- fe_sq_tt(&t3, &t2);
712
- for (i = 1; i < 100; ++i) {
713
- fe_sq_tt(&t3, &t3);
714
- }
715
- fe_mul_ttt(&t2, &t3, &t2);
716
- fe_sq_tt(&t2, &t2);
717
- for (i = 1; i < 50; ++i) {
718
- fe_sq_tt(&t2, &t2);
719
- }
720
- fe_mul_ttt(&t1, &t2, &t1);
721
- fe_sq_tt(&t1, &t1);
722
- for (i = 1; i < 5; ++i) {
723
- fe_sq_tt(&t1, &t1);
724
- }
725
- fe_mul_ttt(out, &t1, &t0);
726
- }
727
-
728
- static void fe_invert(fe *out, const fe *z) {
729
- fe_loose l;
730
- fe_copy_lt(&l, z);
731
- fe_loose_invert(out, &l);
732
- }
733
-
734
- static void fe_neg_impl(uint32_t out[10], const uint32_t in2[10]) {
735
- { const uint32_t x20 = 0;
736
- { const uint32_t x21 = 0;
737
- { const uint32_t x19 = 0;
738
- { const uint32_t x17 = 0;
739
- { const uint32_t x15 = 0;
740
- { const uint32_t x13 = 0;
741
- { const uint32_t x11 = 0;
742
- { const uint32_t x9 = 0;
743
- { const uint32_t x7 = 0;
744
- { const uint32_t x5 = 0;
745
- { const uint32_t x38 = in2[9];
746
- { const uint32_t x39 = in2[8];
747
- { const uint32_t x37 = in2[7];
748
- { const uint32_t x35 = in2[6];
749
- { const uint32_t x33 = in2[5];
750
- { const uint32_t x31 = in2[4];
751
- { const uint32_t x29 = in2[3];
752
- { const uint32_t x27 = in2[2];
753
- { const uint32_t x25 = in2[1];
754
- { const uint32_t x23 = in2[0];
755
- out[0] = ((0x7ffffda + x5) - x23);
756
- out[1] = ((0x3fffffe + x7) - x25);
757
- out[2] = ((0x7fffffe + x9) - x27);
758
- out[3] = ((0x3fffffe + x11) - x29);
759
- out[4] = ((0x7fffffe + x13) - x31);
760
- out[5] = ((0x3fffffe + x15) - x33);
761
- out[6] = ((0x7fffffe + x17) - x35);
762
- out[7] = ((0x3fffffe + x19) - x37);
763
- out[8] = ((0x7fffffe + x21) - x39);
764
- out[9] = ((0x3fffffe + x20) - x38);
765
- }}}}}}}}}}}}}}}}}}}}
766
- }
767
-
768
- // h = -f
769
- //
770
- // Preconditions:
771
- // |f| bounded by 1.1*2^25,1.1*2^24,1.1*2^25,1.1*2^24,etc.
772
- //
773
- // Postconditions:
774
- // |h| bounded by 1.1*2^25,1.1*2^24,1.1*2^25,1.1*2^24,etc.
775
- static void fe_neg(fe_loose *h, const fe *f) {
776
- assert_fe(f->v);
777
- fe_neg_impl(h->v, f->v);
778
- assert_fe_loose(h->v);
779
- }
780
-
781
- // Replace (f,g) with (g,g) if b == 1;
1198
+ // Replace (f,g) with (g,f) if b == 1;
782
1199
  // replace (f,g) with (f,g) if b == 0.
783
1200
  //
784
1201
  // Preconditions: b in {0,1}.
785
- static void fe_cmov(fe_loose *f, const fe_loose *g, unsigned b) {
1202
+ static void fe_cswap(fe *f, fe *g, unsigned int b) {
786
1203
  b = 0-b;
787
1204
  unsigned i;
788
1205
  for (i = 0; i < 10; i++) {
789
1206
  uint32_t x = f->v[i] ^ g->v[i];
790
1207
  x &= b;
791
1208
  f->v[i] ^= x;
1209
+ g->v[i] ^= x;
792
1210
  }
793
1211
  }
794
1212
 
795
- // return 0 if f == 0
796
- // return 1 if f != 0
797
- //
798
- // Preconditions:
799
- // |f| bounded by 1.1*2^26,1.1*2^25,1.1*2^26,1.1*2^25,etc.
800
- static int fe_isnonzero(const fe_loose *f) {
801
- uint8_t s[32];
802
- fe_loose_tobytes(s, f);
803
-
804
- static const uint8_t zero[32] = {0};
805
- return CRYPTO_memcmp(s, zero, sizeof(zero)) != 0;
806
- }
807
-
808
- // return 1 if f is in {1,3,5,...,q-2}
809
- // return 0 if f is in {0,2,4,...,q-1}
810
- //
811
- // Preconditions:
812
- // |f| bounded by 1.1*2^26,1.1*2^25,1.1*2^26,1.1*2^25,etc.
813
- static int fe_isnegative(const fe *f) {
814
- uint8_t s[32];
815
- fe_tobytes(s, f);
816
- return s[0] & 1;
817
- }
818
-
819
- // NOTE: based on fiat-crypto fe_mul, edited for in2=2*in1
820
- static void fe_sq2_impl(uint32_t out[10], const uint32_t in1[10]) {
821
- assert_fe_loose(in1);
1213
+ // NOTE: based on fiat-crypto fe_mul, edited for in2=121666, 0, 0..
1214
+ static void fe_mul_121666_impl(uint32_t out[10], const uint32_t in1[10]) {
822
1215
  { const uint32_t x20 = in1[9];
823
1216
  { const uint32_t x21 = in1[8];
824
1217
  { const uint32_t x19 = in1[7];
@@ -829,16 +1222,16 @@ static void fe_sq2_impl(uint32_t out[10], const uint32_t in1[10]) {
829
1222
  { const uint32_t x9 = in1[2];
830
1223
  { const uint32_t x7 = in1[1];
831
1224
  { const uint32_t x5 = in1[0];
832
- { const uint32_t x38 = 2*in1[9];
833
- { const uint32_t x39 = 2*in1[8];
834
- { const uint32_t x37 = 2*in1[7];
835
- { const uint32_t x35 = 2*in1[6];
836
- { const uint32_t x33 = 2*in1[5];
837
- { const uint32_t x31 = 2*in1[4];
838
- { const uint32_t x29 = 2*in1[3];
839
- { const uint32_t x27 = 2*in1[2];
840
- { const uint32_t x25 = 2*in1[1];
841
- { const uint32_t x23 = 2*in1[0];
1225
+ { const uint32_t x38 = 0;
1226
+ { const uint32_t x39 = 0;
1227
+ { const uint32_t x37 = 0;
1228
+ { const uint32_t x35 = 0;
1229
+ { const uint32_t x33 = 0;
1230
+ { const uint32_t x31 = 0;
1231
+ { const uint32_t x29 = 0;
1232
+ { const uint32_t x27 = 0;
1233
+ { const uint32_t x25 = 0;
1234
+ { const uint32_t x23 = 121666;
842
1235
  { uint64_t x40 = ((uint64_t)x23 * x5);
843
1236
  { uint64_t x41 = (((uint64_t)x23 * x7) + ((uint64_t)x25 * x5));
844
1237
  { uint64_t x42 = ((((uint64_t)(0x2 * x25) * x7) + ((uint64_t)x23 * x9)) + ((uint64_t)x27 * x5));
@@ -931,11 +1324,180 @@ static void fe_sq2_impl(uint32_t out[10], const uint32_t in1[10]) {
931
1324
  out[8] = x111;
932
1325
  out[9] = x114;
933
1326
  }}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}
934
- assert_fe(out);
1327
+ }
1328
+
1329
+ static void fe_mul121666(fe *h, const fe_loose *f) {
1330
+ assert_fe_loose(f->v);
1331
+ fe_mul_121666_impl(h->v, f->v);
1332
+ assert_fe(h->v);
1333
+ }
1334
+
1335
+ // Adapted from Fiat-synthesized |fe_sub_impl| with |out| = 0.
1336
+ static void fe_neg_impl(uint32_t out[10], const uint32_t in2[10]) {
1337
+ { const uint32_t x20 = 0;
1338
+ { const uint32_t x21 = 0;
1339
+ { const uint32_t x19 = 0;
1340
+ { const uint32_t x17 = 0;
1341
+ { const uint32_t x15 = 0;
1342
+ { const uint32_t x13 = 0;
1343
+ { const uint32_t x11 = 0;
1344
+ { const uint32_t x9 = 0;
1345
+ { const uint32_t x7 = 0;
1346
+ { const uint32_t x5 = 0;
1347
+ { const uint32_t x38 = in2[9];
1348
+ { const uint32_t x39 = in2[8];
1349
+ { const uint32_t x37 = in2[7];
1350
+ { const uint32_t x35 = in2[6];
1351
+ { const uint32_t x33 = in2[5];
1352
+ { const uint32_t x31 = in2[4];
1353
+ { const uint32_t x29 = in2[3];
1354
+ { const uint32_t x27 = in2[2];
1355
+ { const uint32_t x25 = in2[1];
1356
+ { const uint32_t x23 = in2[0];
1357
+ out[0] = ((0x7ffffda + x5) - x23);
1358
+ out[1] = ((0x3fffffe + x7) - x25);
1359
+ out[2] = ((0x7fffffe + x9) - x27);
1360
+ out[3] = ((0x3fffffe + x11) - x29);
1361
+ out[4] = ((0x7fffffe + x13) - x31);
1362
+ out[5] = ((0x3fffffe + x15) - x33);
1363
+ out[6] = ((0x7fffffe + x17) - x35);
1364
+ out[7] = ((0x3fffffe + x19) - x37);
1365
+ out[8] = ((0x7fffffe + x21) - x39);
1366
+ out[9] = ((0x3fffffe + x20) - x38);
1367
+ }}}}}}}}}}}}}}}}}}}}
1368
+ }
1369
+
1370
+ // h = -f
1371
+ static void fe_neg(fe_loose *h, const fe *f) {
1372
+ assert_fe(f->v);
1373
+ fe_neg_impl(h->v, f->v);
1374
+ assert_fe_loose(h->v);
1375
+ }
1376
+
1377
+ // Replace (f,g) with (g,g) if b == 1;
1378
+ // replace (f,g) with (f,g) if b == 0.
1379
+ //
1380
+ // Preconditions: b in {0,1}.
1381
+ static void fe_cmov(fe_loose *f, const fe_loose *g, unsigned b) {
1382
+ b = 0-b;
1383
+ unsigned i;
1384
+ for (i = 0; i < 10; i++) {
1385
+ uint32_t x = f->v[i] ^ g->v[i];
1386
+ x &= b;
1387
+ f->v[i] ^= x;
1388
+ }
1389
+ }
1390
+
1391
+ #endif // BORINGSSL_CURVE25519_64BIT
1392
+
1393
+ // h = f
1394
+ static void fe_copy(fe *h, const fe *f) {
1395
+ OPENSSL_memmove(h, f, sizeof(fe));
1396
+ }
1397
+
1398
+ static void fe_copy_lt(fe_loose *h, const fe *f) {
1399
+ OPENSSL_COMPILE_ASSERT(sizeof(fe_loose) == sizeof(fe),
1400
+ fe_and_fe_loose_mismatch);
1401
+ OPENSSL_memmove(h, f, sizeof(fe));
1402
+ }
1403
+ #if !defined(OPENSSL_SMALL)
1404
+ static void fe_copy_ll(fe_loose *h, const fe_loose *f) {
1405
+ OPENSSL_memmove(h, f, sizeof(fe_loose));
1406
+ }
1407
+ #endif // !defined(OPENSSL_SMALL)
1408
+
1409
+ static void fe_loose_invert(fe *out, const fe_loose *z) {
1410
+ fe t0;
1411
+ fe t1;
1412
+ fe t2;
1413
+ fe t3;
1414
+ int i;
1415
+
1416
+ fe_sq_tl(&t0, z);
1417
+ fe_sq_tt(&t1, &t0);
1418
+ for (i = 1; i < 2; ++i) {
1419
+ fe_sq_tt(&t1, &t1);
1420
+ }
1421
+ fe_mul_tlt(&t1, z, &t1);
1422
+ fe_mul_ttt(&t0, &t0, &t1);
1423
+ fe_sq_tt(&t2, &t0);
1424
+ fe_mul_ttt(&t1, &t1, &t2);
1425
+ fe_sq_tt(&t2, &t1);
1426
+ for (i = 1; i < 5; ++i) {
1427
+ fe_sq_tt(&t2, &t2);
1428
+ }
1429
+ fe_mul_ttt(&t1, &t2, &t1);
1430
+ fe_sq_tt(&t2, &t1);
1431
+ for (i = 1; i < 10; ++i) {
1432
+ fe_sq_tt(&t2, &t2);
1433
+ }
1434
+ fe_mul_ttt(&t2, &t2, &t1);
1435
+ fe_sq_tt(&t3, &t2);
1436
+ for (i = 1; i < 20; ++i) {
1437
+ fe_sq_tt(&t3, &t3);
1438
+ }
1439
+ fe_mul_ttt(&t2, &t3, &t2);
1440
+ fe_sq_tt(&t2, &t2);
1441
+ for (i = 1; i < 10; ++i) {
1442
+ fe_sq_tt(&t2, &t2);
1443
+ }
1444
+ fe_mul_ttt(&t1, &t2, &t1);
1445
+ fe_sq_tt(&t2, &t1);
1446
+ for (i = 1; i < 50; ++i) {
1447
+ fe_sq_tt(&t2, &t2);
1448
+ }
1449
+ fe_mul_ttt(&t2, &t2, &t1);
1450
+ fe_sq_tt(&t3, &t2);
1451
+ for (i = 1; i < 100; ++i) {
1452
+ fe_sq_tt(&t3, &t3);
1453
+ }
1454
+ fe_mul_ttt(&t2, &t3, &t2);
1455
+ fe_sq_tt(&t2, &t2);
1456
+ for (i = 1; i < 50; ++i) {
1457
+ fe_sq_tt(&t2, &t2);
1458
+ }
1459
+ fe_mul_ttt(&t1, &t2, &t1);
1460
+ fe_sq_tt(&t1, &t1);
1461
+ for (i = 1; i < 5; ++i) {
1462
+ fe_sq_tt(&t1, &t1);
1463
+ }
1464
+ fe_mul_ttt(out, &t1, &t0);
1465
+ }
1466
+
1467
+ static void fe_invert(fe *out, const fe *z) {
1468
+ fe_loose l;
1469
+ fe_copy_lt(&l, z);
1470
+ fe_loose_invert(out, &l);
1471
+ }
1472
+
1473
+ // return 0 if f == 0
1474
+ // return 1 if f != 0
1475
+ static int fe_isnonzero(const fe_loose *f) {
1476
+ fe tight;
1477
+ fe_carry(&tight, f);
1478
+ uint8_t s[32];
1479
+ fe_tobytes(s, &tight);
1480
+
1481
+ static const uint8_t zero[32] = {0};
1482
+ return CRYPTO_memcmp(s, zero, sizeof(zero)) != 0;
1483
+ }
1484
+
1485
+ // return 1 if f is in {1,3,5,...,q-2}
1486
+ // return 0 if f is in {0,2,4,...,q-1}
1487
+ static int fe_isnegative(const fe *f) {
1488
+ uint8_t s[32];
1489
+ fe_tobytes(s, f);
1490
+ return s[0] & 1;
935
1491
  }
936
1492
 
937
1493
  static void fe_sq2_tt(fe *h, const fe *f) {
938
- fe_sq2_impl(h->v, f->v);
1494
+ // h = f^2
1495
+ fe_sq_tt(h, f);
1496
+
1497
+ // h = h + h
1498
+ fe_loose tmp;
1499
+ fe_add(&tmp, h, h);
1500
+ fe_carry(h, &tmp);
939
1501
  }
940
1502
 
941
1503
  static void fe_pow22523(fe *out, const fe *z) {
@@ -995,7 +1557,10 @@ static void fe_pow22523(fe *out, const fe *z) {
995
1557
  fe_mul_ttt(out, &t0, z);
996
1558
  }
997
1559
 
998
- void x25519_ge_tobytes(uint8_t *s, const ge_p2 *h) {
1560
+
1561
+ // Group operations.
1562
+
1563
+ void x25519_ge_tobytes(uint8_t s[32], const ge_p2 *h) {
999
1564
  fe recip;
1000
1565
  fe x;
1001
1566
  fe y;
@@ -1007,7 +1572,7 @@ void x25519_ge_tobytes(uint8_t *s, const ge_p2 *h) {
1007
1572
  s[31] ^= fe_isnegative(&x) << 7;
1008
1573
  }
1009
1574
 
1010
- static void ge_p3_tobytes(uint8_t *s, const ge_p3 *h) {
1575
+ static void ge_p3_tobytes(uint8_t s[32], const ge_p3 *h) {
1011
1576
  fe recip;
1012
1577
  fe x;
1013
1578
  fe y;
@@ -1019,12 +1584,6 @@ static void ge_p3_tobytes(uint8_t *s, const ge_p3 *h) {
1019
1584
  s[31] ^= fe_isnegative(&x) << 7;
1020
1585
  }
1021
1586
 
1022
- static const fe d = {{56195235, 13857412, 51736253, 6949390, 114729,
1023
- 24766616, 60832955, 30306712, 48412415, 21499315}};
1024
-
1025
- static const fe sqrtm1 = {{34513072, 25610706, 9377949, 3500415, 12389472,
1026
- 33281959, 41962654, 31548777, 326685, 11406482}};
1027
-
1028
1587
  int x25519_ge_frombytes_vartime(ge_p3 *h, const uint8_t *s) {
1029
1588
  fe u;
1030
1589
  fe_loose v;
@@ -1104,9 +1663,6 @@ static void ge_p3_to_p2(ge_p2 *r, const ge_p3 *p) {
1104
1663
  fe_copy(&r->Z, &p->Z);
1105
1664
  }
1106
1665
 
1107
- static const fe d2 = {{45281625, 27714825, 36363642, 13898781, 229458,
1108
- 15978800, 54557047, 27058993, 29715967, 9444199}};
1109
-
1110
1666
  // r = p
1111
1667
  void x25519_ge_p3_to_cached(ge_cached *r, const ge_p3 *p) {
1112
1668
  fe_add(&r->YplusX, &p->Y, &p->X);
@@ -1303,2219 +1859,12 @@ void x25519_ge_scalarmult_small_precomp(
1303
1859
 
1304
1860
  #if defined(OPENSSL_SMALL)
1305
1861
 
1306
- // This block of code replaces the standard base-point table with a much smaller
1307
- // one. The standard table is 30,720 bytes while this one is just 960.
1308
- //
1309
- // This table contains 15 pairs of group elements, (x, y), where each field
1310
- // element is serialised with |fe_tobytes|. If |i| is the index of the group
1311
- // element then consider i+1 as a four-bit number: (i₀, i₁, i₂, i₃) (where i₀
1312
- // is the most significant bit). The value of the group element is then:
1313
- // (i₀×2^192 + i₁×2^128 + i₂×2^64 + i₃)G, where G is the generator.
1314
- static const uint8_t k25519SmallPrecomp[15 * 2 * 32] = {
1315
- 0x1a, 0xd5, 0x25, 0x8f, 0x60, 0x2d, 0x56, 0xc9, 0xb2, 0xa7, 0x25, 0x95,
1316
- 0x60, 0xc7, 0x2c, 0x69, 0x5c, 0xdc, 0xd6, 0xfd, 0x31, 0xe2, 0xa4, 0xc0,
1317
- 0xfe, 0x53, 0x6e, 0xcd, 0xd3, 0x36, 0x69, 0x21, 0x58, 0x66, 0x66, 0x66,
1318
- 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66,
1319
- 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66,
1320
- 0x66, 0x66, 0x66, 0x66, 0x02, 0xa2, 0xed, 0xf4, 0x8f, 0x6b, 0x0b, 0x3e,
1321
- 0xeb, 0x35, 0x1a, 0xd5, 0x7e, 0xdb, 0x78, 0x00, 0x96, 0x8a, 0xa0, 0xb4,
1322
- 0xcf, 0x60, 0x4b, 0xd4, 0xd5, 0xf9, 0x2d, 0xbf, 0x88, 0xbd, 0x22, 0x62,
1323
- 0x13, 0x53, 0xe4, 0x82, 0x57, 0xfa, 0x1e, 0x8f, 0x06, 0x2b, 0x90, 0xba,
1324
- 0x08, 0xb6, 0x10, 0x54, 0x4f, 0x7c, 0x1b, 0x26, 0xed, 0xda, 0x6b, 0xdd,
1325
- 0x25, 0xd0, 0x4e, 0xea, 0x42, 0xbb, 0x25, 0x03, 0xa2, 0xfb, 0xcc, 0x61,
1326
- 0x67, 0x06, 0x70, 0x1a, 0xc4, 0x78, 0x3a, 0xff, 0x32, 0x62, 0xdd, 0x2c,
1327
- 0xab, 0x50, 0x19, 0x3b, 0xf2, 0x9b, 0x7d, 0xb8, 0xfd, 0x4f, 0x29, 0x9c,
1328
- 0xa7, 0x91, 0xba, 0x0e, 0x46, 0x5e, 0x51, 0xfe, 0x1d, 0xbf, 0xe5, 0xe5,
1329
- 0x9b, 0x95, 0x0d, 0x67, 0xf8, 0xd1, 0xb5, 0x5a, 0xa1, 0x93, 0x2c, 0xc3,
1330
- 0xde, 0x0e, 0x97, 0x85, 0x2d, 0x7f, 0xea, 0xab, 0x3e, 0x47, 0x30, 0x18,
1331
- 0x24, 0xe8, 0xb7, 0x60, 0xae, 0x47, 0x80, 0xfc, 0xe5, 0x23, 0xe7, 0xc2,
1332
- 0xc9, 0x85, 0xe6, 0x98, 0xa0, 0x29, 0x4e, 0xe1, 0x84, 0x39, 0x2d, 0x95,
1333
- 0x2c, 0xf3, 0x45, 0x3c, 0xff, 0xaf, 0x27, 0x4c, 0x6b, 0xa6, 0xf5, 0x4b,
1334
- 0x11, 0xbd, 0xba, 0x5b, 0x9e, 0xc4, 0xa4, 0x51, 0x1e, 0xbe, 0xd0, 0x90,
1335
- 0x3a, 0x9c, 0xc2, 0x26, 0xb6, 0x1e, 0xf1, 0x95, 0x7d, 0xc8, 0x6d, 0x52,
1336
- 0xe6, 0x99, 0x2c, 0x5f, 0x9a, 0x96, 0x0c, 0x68, 0x29, 0xfd, 0xe2, 0xfb,
1337
- 0xe6, 0xbc, 0xec, 0x31, 0x08, 0xec, 0xe6, 0xb0, 0x53, 0x60, 0xc3, 0x8c,
1338
- 0xbe, 0xc1, 0xb3, 0x8a, 0x8f, 0xe4, 0x88, 0x2b, 0x55, 0xe5, 0x64, 0x6e,
1339
- 0x9b, 0xd0, 0xaf, 0x7b, 0x64, 0x2a, 0x35, 0x25, 0x10, 0x52, 0xc5, 0x9e,
1340
- 0x58, 0x11, 0x39, 0x36, 0x45, 0x51, 0xb8, 0x39, 0x93, 0xfc, 0x9d, 0x6a,
1341
- 0xbe, 0x58, 0xcb, 0xa4, 0x0f, 0x51, 0x3c, 0x38, 0x05, 0xca, 0xab, 0x43,
1342
- 0x63, 0x0e, 0xf3, 0x8b, 0x41, 0xa6, 0xf8, 0x9b, 0x53, 0x70, 0x80, 0x53,
1343
- 0x86, 0x5e, 0x8f, 0xe3, 0xc3, 0x0d, 0x18, 0xc8, 0x4b, 0x34, 0x1f, 0xd8,
1344
- 0x1d, 0xbc, 0xf2, 0x6d, 0x34, 0x3a, 0xbe, 0xdf, 0xd9, 0xf6, 0xf3, 0x89,
1345
- 0xa1, 0xe1, 0x94, 0x9f, 0x5d, 0x4c, 0x5d, 0xe9, 0xa1, 0x49, 0x92, 0xef,
1346
- 0x0e, 0x53, 0x81, 0x89, 0x58, 0x87, 0xa6, 0x37, 0xf1, 0xdd, 0x62, 0x60,
1347
- 0x63, 0x5a, 0x9d, 0x1b, 0x8c, 0xc6, 0x7d, 0x52, 0xea, 0x70, 0x09, 0x6a,
1348
- 0xe1, 0x32, 0xf3, 0x73, 0x21, 0x1f, 0x07, 0x7b, 0x7c, 0x9b, 0x49, 0xd8,
1349
- 0xc0, 0xf3, 0x25, 0x72, 0x6f, 0x9d, 0xed, 0x31, 0x67, 0x36, 0x36, 0x54,
1350
- 0x40, 0x92, 0x71, 0xe6, 0x11, 0x28, 0x11, 0xad, 0x93, 0x32, 0x85, 0x7b,
1351
- 0x3e, 0xb7, 0x3b, 0x49, 0x13, 0x1c, 0x07, 0xb0, 0x2e, 0x93, 0xaa, 0xfd,
1352
- 0xfd, 0x28, 0x47, 0x3d, 0x8d, 0xd2, 0xda, 0xc7, 0x44, 0xd6, 0x7a, 0xdb,
1353
- 0x26, 0x7d, 0x1d, 0xb8, 0xe1, 0xde, 0x9d, 0x7a, 0x7d, 0x17, 0x7e, 0x1c,
1354
- 0x37, 0x04, 0x8d, 0x2d, 0x7c, 0x5e, 0x18, 0x38, 0x1e, 0xaf, 0xc7, 0x1b,
1355
- 0x33, 0x48, 0x31, 0x00, 0x59, 0xf6, 0xf2, 0xca, 0x0f, 0x27, 0x1b, 0x63,
1356
- 0x12, 0x7e, 0x02, 0x1d, 0x49, 0xc0, 0x5d, 0x79, 0x87, 0xef, 0x5e, 0x7a,
1357
- 0x2f, 0x1f, 0x66, 0x55, 0xd8, 0x09, 0xd9, 0x61, 0x38, 0x68, 0xb0, 0x07,
1358
- 0xa3, 0xfc, 0xcc, 0x85, 0x10, 0x7f, 0x4c, 0x65, 0x65, 0xb3, 0xfa, 0xfa,
1359
- 0xa5, 0x53, 0x6f, 0xdb, 0x74, 0x4c, 0x56, 0x46, 0x03, 0xe2, 0xd5, 0x7a,
1360
- 0x29, 0x1c, 0xc6, 0x02, 0xbc, 0x59, 0xf2, 0x04, 0x75, 0x63, 0xc0, 0x84,
1361
- 0x2f, 0x60, 0x1c, 0x67, 0x76, 0xfd, 0x63, 0x86, 0xf3, 0xfa, 0xbf, 0xdc,
1362
- 0xd2, 0x2d, 0x90, 0x91, 0xbd, 0x33, 0xa9, 0xe5, 0x66, 0x0c, 0xda, 0x42,
1363
- 0x27, 0xca, 0xf4, 0x66, 0xc2, 0xec, 0x92, 0x14, 0x57, 0x06, 0x63, 0xd0,
1364
- 0x4d, 0x15, 0x06, 0xeb, 0x69, 0x58, 0x4f, 0x77, 0xc5, 0x8b, 0xc7, 0xf0,
1365
- 0x8e, 0xed, 0x64, 0xa0, 0xb3, 0x3c, 0x66, 0x71, 0xc6, 0x2d, 0xda, 0x0a,
1366
- 0x0d, 0xfe, 0x70, 0x27, 0x64, 0xf8, 0x27, 0xfa, 0xf6, 0x5f, 0x30, 0xa5,
1367
- 0x0d, 0x6c, 0xda, 0xf2, 0x62, 0x5e, 0x78, 0x47, 0xd3, 0x66, 0x00, 0x1c,
1368
- 0xfd, 0x56, 0x1f, 0x5d, 0x3f, 0x6f, 0xf4, 0x4c, 0xd8, 0xfd, 0x0e, 0x27,
1369
- 0xc9, 0x5c, 0x2b, 0xbc, 0xc0, 0xa4, 0xe7, 0x23, 0x29, 0x02, 0x9f, 0x31,
1370
- 0xd6, 0xe9, 0xd7, 0x96, 0xf4, 0xe0, 0x5e, 0x0b, 0x0e, 0x13, 0xee, 0x3c,
1371
- 0x09, 0xed, 0xf2, 0x3d, 0x76, 0x91, 0xc3, 0xa4, 0x97, 0xae, 0xd4, 0x87,
1372
- 0xd0, 0x5d, 0xf6, 0x18, 0x47, 0x1f, 0x1d, 0x67, 0xf2, 0xcf, 0x63, 0xa0,
1373
- 0x91, 0x27, 0xf8, 0x93, 0x45, 0x75, 0x23, 0x3f, 0xd1, 0xf1, 0xad, 0x23,
1374
- 0xdd, 0x64, 0x93, 0x96, 0x41, 0x70, 0x7f, 0xf7, 0xf5, 0xa9, 0x89, 0xa2,
1375
- 0x34, 0xb0, 0x8d, 0x1b, 0xae, 0x19, 0x15, 0x49, 0x58, 0x23, 0x6d, 0x87,
1376
- 0x15, 0x4f, 0x81, 0x76, 0xfb, 0x23, 0xb5, 0xea, 0xcf, 0xac, 0x54, 0x8d,
1377
- 0x4e, 0x42, 0x2f, 0xeb, 0x0f, 0x63, 0xdb, 0x68, 0x37, 0xa8, 0xcf, 0x8b,
1378
- 0xab, 0xf5, 0xa4, 0x6e, 0x96, 0x2a, 0xb2, 0xd6, 0xbe, 0x9e, 0xbd, 0x0d,
1379
- 0xb4, 0x42, 0xa9, 0xcf, 0x01, 0x83, 0x8a, 0x17, 0x47, 0x76, 0xc4, 0xc6,
1380
- 0x83, 0x04, 0x95, 0x0b, 0xfc, 0x11, 0xc9, 0x62, 0xb8, 0x0c, 0x76, 0x84,
1381
- 0xd9, 0xb9, 0x37, 0xfa, 0xfc, 0x7c, 0xc2, 0x6d, 0x58, 0x3e, 0xb3, 0x04,
1382
- 0xbb, 0x8c, 0x8f, 0x48, 0xbc, 0x91, 0x27, 0xcc, 0xf9, 0xb7, 0x22, 0x19,
1383
- 0x83, 0x2e, 0x09, 0xb5, 0x72, 0xd9, 0x54, 0x1c, 0x4d, 0xa1, 0xea, 0x0b,
1384
- 0xf1, 0xc6, 0x08, 0x72, 0x46, 0x87, 0x7a, 0x6e, 0x80, 0x56, 0x0a, 0x8a,
1385
- 0xc0, 0xdd, 0x11, 0x6b, 0xd6, 0xdd, 0x47, 0xdf, 0x10, 0xd9, 0xd8, 0xea,
1386
- 0x7c, 0xb0, 0x8f, 0x03, 0x00, 0x2e, 0xc1, 0x8f, 0x44, 0xa8, 0xd3, 0x30,
1387
- 0x06, 0x89, 0xa2, 0xf9, 0x34, 0xad, 0xdc, 0x03, 0x85, 0xed, 0x51, 0xa7,
1388
- 0x82, 0x9c, 0xe7, 0x5d, 0x52, 0x93, 0x0c, 0x32, 0x9a, 0x5b, 0xe1, 0xaa,
1389
- 0xca, 0xb8, 0x02, 0x6d, 0x3a, 0xd4, 0xb1, 0x3a, 0xf0, 0x5f, 0xbe, 0xb5,
1390
- 0x0d, 0x10, 0x6b, 0x38, 0x32, 0xac, 0x76, 0x80, 0xbd, 0xca, 0x94, 0x71,
1391
- 0x7a, 0xf2, 0xc9, 0x35, 0x2a, 0xde, 0x9f, 0x42, 0x49, 0x18, 0x01, 0xab,
1392
- 0xbc, 0xef, 0x7c, 0x64, 0x3f, 0x58, 0x3d, 0x92, 0x59, 0xdb, 0x13, 0xdb,
1393
- 0x58, 0x6e, 0x0a, 0xe0, 0xb7, 0x91, 0x4a, 0x08, 0x20, 0xd6, 0x2e, 0x3c,
1394
- 0x45, 0xc9, 0x8b, 0x17, 0x79, 0xe7, 0xc7, 0x90, 0x99, 0x3a, 0x18, 0x25,
1395
- };
1396
-
1397
1862
  void x25519_ge_scalarmult_base(ge_p3 *h, const uint8_t a[32]) {
1398
1863
  x25519_ge_scalarmult_small_precomp(h, a, k25519SmallPrecomp);
1399
1864
  }
1400
1865
 
1401
1866
  #else
1402
1867
 
1403
- // k25519Precomp[i][j] = (j+1)*256^i*B
1404
- static const ge_precomp k25519Precomp[32][8] = {
1405
- {
1406
- {
1407
- {{25967493, 19198397, 29566455, 3660896, 54414519, 4014786,
1408
- 27544626, 21800161, 61029707, 2047604}},
1409
- {{54563134, 934261, 64385954, 3049989, 66381436, 9406985, 12720692,
1410
- 5043384, 19500929, 18085054}},
1411
- {{58370664, 4489569, 9688441, 18769238, 10184608, 21191052,
1412
- 29287918, 11864899, 42594502, 29115885}},
1413
- },
1414
- {
1415
- {{54292951, 20578084, 45527620, 11784319, 41753206, 30803714,
1416
- 55390960, 29739860, 66750418, 23343128}},
1417
- {{45405608, 6903824, 27185491, 6451973, 37531140, 24000426,
1418
- 51492312, 11189267, 40279186, 28235350}},
1419
- {{26966623, 11152617, 32442495, 15396054, 14353839, 20802097,
1420
- 63980037, 24013313, 51636816, 29387734}},
1421
- },
1422
- {
1423
- {{15636272, 23865875, 24204772, 25642034, 616976, 16869170,
1424
- 27787599, 18782243, 28944399, 32004408}},
1425
- {{16568933, 4717097, 55552716, 32452109, 15682895, 21747389,
1426
- 16354576, 21778470, 7689661, 11199574}},
1427
- {{30464137, 27578307, 55329429, 17883566, 23220364, 15915852,
1428
- 7512774, 10017326, 49359771, 23634074}},
1429
- },
1430
- {
1431
- {{50071967, 13921891, 10945806, 27521001, 27105051, 17470053,
1432
- 38182653, 15006022, 3284568, 27277892}},
1433
- {{23599295, 25248385, 55915199, 25867015, 13236773, 10506355,
1434
- 7464579, 9656445, 13059162, 10374397}},
1435
- {{7798537, 16710257, 3033922, 2874086, 28997861, 2835604, 32406664,
1436
- 29715387, 66467155, 33453106}},
1437
- },
1438
- {
1439
- {{10861363, 11473154, 27284546, 1981175, 37044515, 12577860,
1440
- 32867885, 14515107, 51670560, 10819379}},
1441
- {{4708026, 6336745, 20377586, 9066809, 55836755, 6594695, 41455196,
1442
- 12483687, 54440373, 5581305}},
1443
- {{19563141, 16186464, 37722007, 4097518, 10237984, 29206317,
1444
- 28542349, 13850243, 43430843, 17738489}},
1445
- },
1446
- {
1447
- {{51736881, 20691677, 32573249, 4720197, 40672342, 5875510,
1448
- 47920237, 18329612, 57289923, 21468654}},
1449
- {{58559652, 109982, 15149363, 2178705, 22900618, 4543417, 3044240,
1450
- 17864545, 1762327, 14866737}},
1451
- {{48909169, 17603008, 56635573, 1707277, 49922944, 3916100,
1452
- 38872452, 3959420, 27914454, 4383652}},
1453
- },
1454
- {
1455
- {{5153727, 9909285, 1723747, 30776558, 30523604, 5516873, 19480852,
1456
- 5230134, 43156425, 18378665}},
1457
- {{36839857, 30090922, 7665485, 10083793, 28475525, 1649722,
1458
- 20654025, 16520125, 30598449, 7715701}},
1459
- {{28881826, 14381568, 9657904, 3680757, 46927229, 7843315,
1460
- 35708204, 1370707, 29794553, 32145132}},
1461
- },
1462
- {
1463
- {{14499471, 30824833, 33917750, 29299779, 28494861, 14271267,
1464
- 30290735, 10876454, 33954766, 2381725}},
1465
- {{59913433, 30899068, 52378708, 462250, 39384538, 3941371,
1466
- 60872247, 3696004, 34808032, 15351954}},
1467
- {{27431194, 8222322, 16448760, 29646437, 48401861, 11938354,
1468
- 34147463, 30583916, 29551812, 10109425}},
1469
- },
1470
- },
1471
- {
1472
- {
1473
- {{53451805, 20399000, 35825113, 11777097, 21447386, 6519384,
1474
- 64730580, 31926875, 10092782, 28790261}},
1475
- {{27939166, 14210322, 4677035, 16277044, 44144402, 21156292,
1476
- 34600109, 12005537, 49298737, 12803509}},
1477
- {{17228999, 17892808, 65875336, 300139, 65883994, 21839654,
1478
- 30364212, 24516238, 18016356, 4397660}},
1479
- },
1480
- {
1481
- {{56150021, 25864224, 4776340, 18600194, 27850027, 17952220,
1482
- 40489757, 14544524, 49631360, 982638}},
1483
- {{29253598, 15796703, 64244882, 23645547, 10057022, 3163536, 7332899,
1484
- 29434304, 46061167, 9934962}},
1485
- {{5793284, 16271923, 42977250, 23438027, 29188559, 1206517,
1486
- 52360934, 4559894, 36984942, 22656481}},
1487
- },
1488
- {
1489
- {{39464912, 22061425, 16282656, 22517939, 28414020, 18542168,
1490
- 24191033, 4541697, 53770555, 5500567}},
1491
- {{12650548, 32057319, 9052870, 11355358, 49428827, 25154267,
1492
- 49678271, 12264342, 10874051, 13524335}},
1493
- {{25556948, 30508442, 714650, 2510400, 23394682, 23139102, 33119037,
1494
- 5080568, 44580805, 5376627}},
1495
- },
1496
- {
1497
- {{41020600, 29543379, 50095164, 30016803, 60382070, 1920896,
1498
- 44787559, 24106988, 4535767, 1569007}},
1499
- {{64853442, 14606629, 45416424, 25514613, 28430648, 8775819,
1500
- 36614302, 3044289, 31848280, 12543772}},
1501
- {{45080285, 2943892, 35251351, 6777305, 13784462, 29262229,
1502
- 39731668, 31491700, 7718481, 14474653}},
1503
- },
1504
- {
1505
- {{2385296, 2454213, 44477544, 46602, 62670929, 17874016, 656964,
1506
- 26317767, 24316167, 28300865}},
1507
- {{13741529, 10911568, 33875447, 24950694, 46931033, 32521134,
1508
- 33040650, 20129900, 46379407, 8321685}},
1509
- {{21060490, 31341688, 15712756, 29218333, 1639039, 10656336,
1510
- 23845965, 21679594, 57124405, 608371}},
1511
- },
1512
- {
1513
- {{53436132, 18466845, 56219170, 25997372, 61071954, 11305546,
1514
- 1123968, 26773855, 27229398, 23887}},
1515
- {{43864724, 33260226, 55364135, 14712570, 37643165, 31524814,
1516
- 12797023, 27114124, 65475458, 16678953}},
1517
- {{37608244, 4770661, 51054477, 14001337, 7830047, 9564805,
1518
- 65600720, 28759386, 49939598, 4904952}},
1519
- },
1520
- {
1521
- {{24059538, 14617003, 19037157, 18514524, 19766092, 18648003,
1522
- 5169210, 16191880, 2128236, 29227599}},
1523
- {{50127693, 4124965, 58568254, 22900634, 30336521, 19449185,
1524
- 37302527, 916032, 60226322, 30567899}},
1525
- {{44477957, 12419371, 59974635, 26081060, 50629959, 16739174,
1526
- 285431, 2763829, 15736322, 4143876}},
1527
- },
1528
- {
1529
- {{2379333, 11839345, 62998462, 27565766, 11274297, 794957, 212801,
1530
- 18959769, 23527083, 17096164}},
1531
- {{33431108, 22423954, 49269897, 17927531, 8909498, 8376530,
1532
- 34483524, 4087880, 51919953, 19138217}},
1533
- {{1767664, 7197987, 53903638, 31531796, 54017513, 448825, 5799055,
1534
- 4357868, 62334673, 17231393}},
1535
- },
1536
- },
1537
- {
1538
- {
1539
- {{6721966, 13833823, 43585476, 32003117, 26354292, 21691111,
1540
- 23365146, 29604700, 7390889, 2759800}},
1541
- {{4409022, 2052381, 23373853, 10530217, 7676779, 20668478, 21302352,
1542
- 29290375, 1244379, 20634787}},
1543
- {{62687625, 7169618, 4982368, 30596842, 30256824, 30776892, 14086412,
1544
- 9208236, 15886429, 16489664}},
1545
- },
1546
- {
1547
- {{1996056, 10375649, 14346367, 13311202, 60234729, 17116020,
1548
- 53415665, 398368, 36502409, 32841498}},
1549
- {{41801399, 9795879, 64331450, 14878808, 33577029, 14780362,
1550
- 13348553, 12076947, 36272402, 5113181}},
1551
- {{49338080, 11797795, 31950843, 13929123, 41220562, 12288343,
1552
- 36767763, 26218045, 13847710, 5387222}},
1553
- },
1554
- {
1555
- {{48526701, 30138214, 17824842, 31213466, 22744342, 23111821,
1556
- 8763060, 3617786, 47508202, 10370990}},
1557
- {{20246567, 19185054, 22358228, 33010720, 18507282, 23140436,
1558
- 14554436, 24808340, 32232923, 16763880}},
1559
- {{9648486, 10094563, 26416693, 14745928, 36734546, 27081810,
1560
- 11094160, 15689506, 3140038, 17044340}},
1561
- },
1562
- {
1563
- {{50948792, 5472694, 31895588, 4744994, 8823515, 10365685,
1564
- 39884064, 9448612, 38334410, 366294}},
1565
- {{19153450, 11523972, 56012374, 27051289, 42461232, 5420646,
1566
- 28344573, 8041113, 719605, 11671788}},
1567
- {{8678006, 2694440, 60300850, 2517371, 4964326, 11152271, 51675948,
1568
- 18287915, 27000812, 23358879}},
1569
- },
1570
- {
1571
- {{51950941, 7134311, 8639287, 30739555, 59873175, 10421741, 564065,
1572
- 5336097, 6750977, 19033406}},
1573
- {{11836410, 29574944, 26297893, 16080799, 23455045, 15735944,
1574
- 1695823, 24735310, 8169719, 16220347}},
1575
- {{48993007, 8653646, 17578566, 27461813, 59083086, 17541668,
1576
- 55964556, 30926767, 61118155, 19388398}},
1577
- },
1578
- {
1579
- {{43800366, 22586119, 15213227, 23473218, 36255258, 22504427,
1580
- 27884328, 2847284, 2655861, 1738395}},
1581
- {{39571412, 19301410, 41772562, 25551651, 57738101, 8129820,
1582
- 21651608, 30315096, 48021414, 22549153}},
1583
- {{1533110, 3437855, 23735889, 459276, 29970501, 11335377, 26030092,
1584
- 5821408, 10478196, 8544890}},
1585
- },
1586
- {
1587
- {{32173102, 17425121, 24896206, 3921497, 22579056, 30143578,
1588
- 19270448, 12217473, 17789017, 30158437}},
1589
- {{36555903, 31326030, 51530034, 23407230, 13243888, 517024,
1590
- 15479401, 29701199, 30460519, 1052596}},
1591
- {{55493970, 13323617, 32618793, 8175907, 51878691, 12596686,
1592
- 27491595, 28942073, 3179267, 24075541}},
1593
- },
1594
- {
1595
- {{31947050, 19187781, 62468280, 18214510, 51982886, 27514722,
1596
- 52352086, 17142691, 19072639, 24043372}},
1597
- {{11685058, 11822410, 3158003, 19601838, 33402193, 29389366,
1598
- 5977895, 28339415, 473098, 5040608}},
1599
- {{46817982, 8198641, 39698732, 11602122, 1290375, 30754672,
1600
- 28326861, 1721092, 47550222, 30422825}},
1601
- },
1602
- },
1603
- {
1604
- {
1605
- {{7881532, 10687937, 7578723, 7738378, 48157852, 31000479, 21820785,
1606
- 8076149, 39240368, 11538388}},
1607
- {{47173198, 3899860, 18283497, 26752864, 51380203, 22305220,
1608
- 8754524, 7446702, 61432810, 5797015}},
1609
- {{55813245, 29760862, 51326753, 25589858, 12708868, 25098233,
1610
- 2014098, 24503858, 64739691, 27677090}},
1611
- },
1612
- {
1613
- {{44636488, 21985690, 39426843, 1146374, 18956691, 16640559,
1614
- 1192730, 29840233, 15123618, 10811505}},
1615
- {{14352079, 30134717, 48166819, 10822654, 32750596, 4699007, 67038501,
1616
- 15776355, 38222085, 21579878}},
1617
- {{38867681, 25481956, 62129901, 28239114, 29416930, 1847569,
1618
- 46454691, 17069576, 4714546, 23953777}},
1619
- },
1620
- {
1621
- {{15200332, 8368572, 19679101, 15970074, 35236190, 1959450,
1622
- 24611599, 29010600, 55362987, 12340219}},
1623
- {{12876937, 23074376, 33134380, 6590940, 60801088, 14872439,
1624
- 9613953, 8241152, 15370987, 9608631}},
1625
- {{62965568, 21540023, 8446280, 33162829, 4407737, 13629032, 59383996,
1626
- 15866073, 38898243, 24740332}},
1627
- },
1628
- {
1629
- {{26660628, 17876777, 8393733, 358047, 59707573, 992987, 43204631,
1630
- 858696, 20571223, 8420556}},
1631
- {{14620696, 13067227, 51661590, 8264466, 14106269, 15080814,
1632
- 33531827, 12516406, 45534429, 21077682}},
1633
- {{236881, 10476226, 57258, 18877408, 6472997, 2466984, 17258519,
1634
- 7256740, 8791136, 15069930}},
1635
- },
1636
- {
1637
- {{1276391, 24182514, 22949634, 17231625, 43615824, 27852245,
1638
- 14711874, 4874229, 36445724, 31223040}},
1639
- {{5855666, 4990204, 53397016, 7294283, 59304582, 1924646, 65685689,
1640
- 25642053, 34039526, 9234252}},
1641
- {{20590503, 24535444, 31529743, 26201766, 64402029, 10650547,
1642
- 31559055, 21944845, 18979185, 13396066}},
1643
- },
1644
- {
1645
- {{24474287, 4968103, 22267082, 4407354, 24063882, 25229252,
1646
- 48291976, 13594781, 33514650, 7021958}},
1647
- {{55541958, 26988926, 45743778, 15928891, 40950559, 4315420,
1648
- 41160136, 29637754, 45628383, 12868081}},
1649
- {{38473832, 13504660, 19988037, 31421671, 21078224, 6443208,
1650
- 45662757, 2244499, 54653067, 25465048}},
1651
- },
1652
- {
1653
- {{36513336, 13793478, 61256044, 319135, 41385692, 27290532,
1654
- 33086545, 8957937, 51875216, 5540520}},
1655
- {{55478669, 22050529, 58989363, 25911358, 2620055, 1022908,
1656
- 43398120, 31985447, 50980335, 18591624}},
1657
- {{23152952, 775386, 27395463, 14006635, 57407746, 4649511, 1689819,
1658
- 892185, 55595587, 18348483}},
1659
- },
1660
- {
1661
- {{9770129, 9586738, 26496094, 4324120, 1556511, 30004408, 27453818,
1662
- 4763127, 47929250, 5867133}},
1663
- {{34343820, 1927589, 31726409, 28801137, 23962433, 17534932,
1664
- 27846558, 5931263, 37359161, 17445976}},
1665
- {{27461885, 30576896, 22380809, 1815854, 44075111, 30522493,
1666
- 7283489, 18406359, 47582163, 7734628}},
1667
- },
1668
- },
1669
- {
1670
- {
1671
- {{59098600, 23963614, 55988460, 6196037, 29344158, 20123547,
1672
- 7585294, 30377806, 18549496, 15302069}},
1673
- {{34450527, 27383209, 59436070, 22502750, 6258877, 13504381,
1674
- 10458790, 27135971, 58236621, 8424745}},
1675
- {{24687186, 8613276, 36441818, 30320886, 1863891, 31723888,
1676
- 19206233, 7134917, 55824382, 32725512}},
1677
- },
1678
- {
1679
- {{11334899, 24336410, 8025292, 12707519, 17523892, 23078361,
1680
- 10243737, 18868971, 62042829, 16498836}},
1681
- {{8911542, 6887158, 57524604, 26595841, 11145640, 24010752, 17303924,
1682
- 19430194, 6536640, 10543906}},
1683
- {{38162480, 15479762, 49642029, 568875, 65611181, 11223453,
1684
- 64439674, 16928857, 39873154, 8876770}},
1685
- },
1686
- {
1687
- {{41365946, 20987567, 51458897, 32707824, 34082177, 32758143,
1688
- 33627041, 15824473, 66504438, 24514614}},
1689
- {{10330056, 70051, 7957388, 24551765, 9764901, 15609756, 27698697,
1690
- 28664395, 1657393, 3084098}},
1691
- {{10477963, 26084172, 12119565, 20303627, 29016246, 28188843,
1692
- 31280318, 14396151, 36875289, 15272408}},
1693
- },
1694
- {
1695
- {{54820555, 3169462, 28813183, 16658753, 25116432, 27923966,
1696
- 41934906, 20918293, 42094106, 1950503}},
1697
- {{40928506, 9489186, 11053416, 18808271, 36055143, 5825629,
1698
- 58724558, 24786899, 15341278, 8373727}},
1699
- {{28685821, 7759505, 52730348, 21551571, 35137043, 4079241,
1700
- 298136, 23321830, 64230656, 15190419}},
1701
- },
1702
- {
1703
- {{34175969, 13806335, 52771379, 17760000, 43104243, 10940927,
1704
- 8669718, 2742393, 41075551, 26679428}},
1705
- {{65528476, 21825014, 41129205, 22109408, 49696989, 22641577,
1706
- 9291593, 17306653, 54954121, 6048604}},
1707
- {{36803549, 14843443, 1539301, 11864366, 20201677, 1900163,
1708
- 13934231, 5128323, 11213262, 9168384}},
1709
- },
1710
- {
1711
- {{40828332, 11007846, 19408960, 32613674, 48515898, 29225851,
1712
- 62020803, 22449281, 20470156, 17155731}},
1713
- {{43972811, 9282191, 14855179, 18164354, 59746048, 19145871,
1714
- 44324911, 14461607, 14042978, 5230683}},
1715
- {{29969548, 30812838, 50396996, 25001989, 9175485, 31085458,
1716
- 21556950, 3506042, 61174973, 21104723}},
1717
- },
1718
- {
1719
- {{63964118, 8744660, 19704003, 4581278, 46678178, 6830682,
1720
- 45824694, 8971512, 38569675, 15326562}},
1721
- {{47644235, 10110287, 49846336, 30050539, 43608476, 1355668,
1722
- 51585814, 15300987, 46594746, 9168259}},
1723
- {{61755510, 4488612, 43305616, 16314346, 7780487, 17915493,
1724
- 38160505, 9601604, 33087103, 24543045}},
1725
- },
1726
- {
1727
- {{47665694, 18041531, 46311396, 21109108, 37284416, 10229460,
1728
- 39664535, 18553900, 61111993, 15664671}},
1729
- {{23294591, 16921819, 44458082, 25083453, 27844203, 11461195,
1730
- 13099750, 31094076, 18151675, 13417686}},
1731
- {{42385932, 29377914, 35958184, 5988918, 40250079, 6685064,
1732
- 1661597, 21002991, 15271675, 18101767}},
1733
- },
1734
- },
1735
- {
1736
- {
1737
- {{11433023, 20325767, 8239630, 28274915, 65123427, 32828713,
1738
- 48410099, 2167543, 60187563, 20114249}},
1739
- {{35672693, 15575145, 30436815, 12192228, 44645511, 9395378,
1740
- 57191156, 24915434, 12215109, 12028277}},
1741
- {{14098381, 6555944, 23007258, 5757252, 51681032, 20603929,
1742
- 30123439, 4617780, 50208775, 32898803}},
1743
- },
1744
- {
1745
- {{63082644, 18313596, 11893167, 13718664, 52299402, 1847384,
1746
- 51288865, 10154008, 23973261, 20869958}},
1747
- {{40577025, 29858441, 65199965, 2534300, 35238307, 17004076,
1748
- 18341389, 22134481, 32013173, 23450893}},
1749
- {{41629544, 10876442, 55337778, 18929291, 54739296, 1838103,
1750
- 21911214, 6354752, 4425632, 32716610}},
1751
- },
1752
- {
1753
- {{56675475, 18941465, 22229857, 30463385, 53917697, 776728,
1754
- 49693489, 21533969, 4725004, 14044970}},
1755
- {{19268631, 26250011, 1555348, 8692754, 45634805, 23643767, 6347389,
1756
- 32142648, 47586572, 17444675}},
1757
- {{42244775, 12986007, 56209986, 27995847, 55796492, 33405905,
1758
- 19541417, 8180106, 9282262, 10282508}},
1759
- },
1760
- {
1761
- {{40903763, 4428546, 58447668, 20360168, 4098401, 19389175,
1762
- 15522534, 8372215, 5542595, 22851749}},
1763
- {{56546323, 14895632, 26814552, 16880582, 49628109, 31065071,
1764
- 64326972, 6993760, 49014979, 10114654}},
1765
- {{47001790, 32625013, 31422703, 10427861, 59998115, 6150668,
1766
- 38017109, 22025285, 25953724, 33448274}},
1767
- },
1768
- {
1769
- {{62874467, 25515139, 57989738, 3045999, 2101609, 20947138,
1770
- 19390019, 6094296, 63793585, 12831124}},
1771
- {{51110167, 7578151, 5310217, 14408357, 33560244, 33329692,
1772
- 31575953, 6326196, 7381791, 31132593}},
1773
- {{46206085, 3296810, 24736065, 17226043, 18374253, 7318640,
1774
- 6295303, 8082724, 51746375, 12339663}},
1775
- },
1776
- {
1777
- {{27724736, 2291157, 6088201, 19369634, 1792726, 5857634, 13848414,
1778
- 15768922, 25091167, 14856294}},
1779
- {{48242193, 8331042, 24373479, 8541013, 66406866, 24284974, 12927299,
1780
- 20858939, 44926390, 24541532}},
1781
- {{55685435, 28132841, 11632844, 3405020, 30536730, 21880393,
1782
- 39848098, 13866389, 30146206, 9142070}},
1783
- },
1784
- {
1785
- {{3924129, 18246916, 53291741, 23499471, 12291819, 32886066,
1786
- 39406089, 9326383, 58871006, 4171293}},
1787
- {{51186905, 16037936, 6713787, 16606682, 45496729, 2790943,
1788
- 26396185, 3731949, 345228, 28091483}},
1789
- {{45781307, 13448258, 25284571, 1143661, 20614966, 24705045,
1790
- 2031538, 21163201, 50855680, 19972348}},
1791
- },
1792
- {
1793
- {{31016192, 16832003, 26371391, 19103199, 62081514, 14854136,
1794
- 17477601, 3842657, 28012650, 17149012}},
1795
- {{62033029, 9368965, 58546785, 28953529, 51858910, 6970559,
1796
- 57918991, 16292056, 58241707, 3507939}},
1797
- {{29439664, 3537914, 23333589, 6997794, 49553303, 22536363,
1798
- 51899661, 18503164, 57943934, 6580395}},
1799
- },
1800
- },
1801
- {
1802
- {
1803
- {{54923003, 25874643, 16438268, 10826160, 58412047, 27318820,
1804
- 17860443, 24280586, 65013061, 9304566}},
1805
- {{20714545, 29217521, 29088194, 7406487, 11426967, 28458727,
1806
- 14792666, 18945815, 5289420, 33077305}},
1807
- {{50443312, 22903641, 60948518, 20248671, 9192019, 31751970,
1808
- 17271489, 12349094, 26939669, 29802138}},
1809
- },
1810
- {
1811
- {{54218966, 9373457, 31595848, 16374215, 21471720, 13221525,
1812
- 39825369, 21205872, 63410057, 117886}},
1813
- {{22263325, 26994382, 3984569, 22379786, 51994855, 32987646,
1814
- 28311252, 5358056, 43789084, 541963}},
1815
- {{16259200, 3261970, 2309254, 18019958, 50223152, 28972515,
1816
- 24134069, 16848603, 53771797, 20002236}},
1817
- },
1818
- {
1819
- {{9378160, 20414246, 44262881, 20809167, 28198280, 26310334,
1820
- 64709179, 32837080, 690425, 14876244}},
1821
- {{24977353, 33240048, 58884894, 20089345, 28432342, 32378079,
1822
- 54040059, 21257083, 44727879, 6618998}},
1823
- {{65570671, 11685645, 12944378, 13682314, 42719353, 19141238,
1824
- 8044828, 19737104, 32239828, 27901670}},
1825
- },
1826
- {
1827
- {{48505798, 4762989, 66182614, 8885303, 38696384, 30367116, 9781646,
1828
- 23204373, 32779358, 5095274}},
1829
- {{34100715, 28339925, 34843976, 29869215, 9460460, 24227009,
1830
- 42507207, 14506723, 21639561, 30924196}},
1831
- {{50707921, 20442216, 25239337, 15531969, 3987758, 29055114,
1832
- 65819361, 26690896, 17874573, 558605}},
1833
- },
1834
- {
1835
- {{53508735, 10240080, 9171883, 16131053, 46239610, 9599699,
1836
- 33499487, 5080151, 2085892, 5119761}},
1837
- {{44903700, 31034903, 50727262, 414690, 42089314, 2170429,
1838
- 30634760, 25190818, 35108870, 27794547}},
1839
- {{60263160, 15791201, 8550074, 32241778, 29928808, 21462176,
1840
- 27534429, 26362287, 44757485, 12961481}},
1841
- },
1842
- {
1843
- {{42616785, 23983660, 10368193, 11582341, 43711571, 31309144,
1844
- 16533929, 8206996, 36914212, 28394793}},
1845
- {{55987368, 30172197, 2307365, 6362031, 66973409, 8868176, 50273234,
1846
- 7031274, 7589640, 8945490}},
1847
- {{34956097, 8917966, 6661220, 21876816, 65916803, 17761038,
1848
- 7251488, 22372252, 24099108, 19098262}},
1849
- },
1850
- {
1851
- {{5019539, 25646962, 4244126, 18840076, 40175591, 6453164,
1852
- 47990682, 20265406, 60876967, 23273695}},
1853
- {{10853575, 10721687, 26480089, 5861829, 44113045, 1972174,
1854
- 65242217, 22996533, 63745412, 27113307}},
1855
- {{50106456, 5906789, 221599, 26991285, 7828207, 20305514, 24362660,
1856
- 31546264, 53242455, 7421391}},
1857
- },
1858
- {
1859
- {{8139908, 27007935, 32257645, 27663886, 30375718, 1886181,
1860
- 45933756, 15441251, 28826358, 29431403}},
1861
- {{6267067, 9695052, 7709135, 16950835, 34239795, 31668296,
1862
- 14795159, 25714308, 13746020, 31812384}},
1863
- {{28584883, 7787108, 60375922, 18503702, 22846040, 25983196,
1864
- 63926927, 33190907, 4771361, 25134474}},
1865
- },
1866
- },
1867
- {
1868
- {
1869
- {{24949256, 6376279, 39642383, 25379823, 48462709, 23623825,
1870
- 33543568, 21412737, 3569626, 11342593}},
1871
- {{26514970, 4740088, 27912651, 3697550, 19331575, 22082093, 6809885,
1872
- 4608608, 7325975, 18753361}},
1873
- {{55490446, 19000001, 42787651, 7655127, 65739590, 5214311,
1874
- 39708324, 10258389, 49462170, 25367739}},
1875
- },
1876
- {
1877
- {{11431185, 15823007, 26570245, 14329124, 18029990, 4796082,
1878
- 35662685, 15580663, 9280358, 29580745}},
1879
- {{66948081, 23228174, 44253547, 29249434, 46247496, 19933429,
1880
- 34297962, 22372809, 51563772, 4387440}},
1881
- {{46309467, 12194511, 3937617, 27748540, 39954043, 9340369,
1882
- 42594872, 8548136, 20617071, 26072431}},
1883
- },
1884
- {
1885
- {{66170039, 29623845, 58394552, 16124717, 24603125, 27329039,
1886
- 53333511, 21678609, 24345682, 10325460}},
1887
- {{47253587, 31985546, 44906155, 8714033, 14007766, 6928528,
1888
- 16318175, 32543743, 4766742, 3552007}},
1889
- {{45357481, 16823515, 1351762, 32751011, 63099193, 3950934, 3217514,
1890
- 14481909, 10988822, 29559670}},
1891
- },
1892
- {
1893
- {{15564307, 19242862, 3101242, 5684148, 30446780, 25503076,
1894
- 12677126, 27049089, 58813011, 13296004}},
1895
- {{57666574, 6624295, 36809900, 21640754, 62437882, 31497052,
1896
- 31521203, 9614054, 37108040, 12074673}},
1897
- {{4771172, 33419193, 14290748, 20464580, 27992297, 14998318,
1898
- 65694928, 31997715, 29832612, 17163397}},
1899
- },
1900
- {
1901
- {{7064884, 26013258, 47946901, 28486894, 48217594, 30641695,
1902
- 25825241, 5293297, 39986204, 13101589}},
1903
- {{64810282, 2439669, 59642254, 1719964, 39841323, 17225986,
1904
- 32512468, 28236839, 36752793, 29363474}},
1905
- {{37102324, 10162315, 33928688, 3981722, 50626726, 20484387,
1906
- 14413973, 9515896, 19568978, 9628812}},
1907
- },
1908
- {
1909
- {{33053803, 199357, 15894591, 1583059, 27380243, 28973997, 49269969,
1910
- 27447592, 60817077, 3437739}},
1911
- {{48129987, 3884492, 19469877, 12726490, 15913552, 13614290,
1912
- 44147131, 70103, 7463304, 4176122}},
1913
- {{39984863, 10659916, 11482427, 17484051, 12771466, 26919315,
1914
- 34389459, 28231680, 24216881, 5944158}},
1915
- },
1916
- {
1917
- {{8894125, 7450974, 64444715, 23788679, 39028346, 21165316,
1918
- 19345745, 14680796, 11632993, 5847885}},
1919
- {{26942781, 31239115, 9129563, 28647825, 26024104, 11769399,
1920
- 55590027, 6367193, 57381634, 4782139}},
1921
- {{19916442, 28726022, 44198159, 22140040, 25606323, 27581991,
1922
- 33253852, 8220911, 6358847, 31680575}},
1923
- },
1924
- {
1925
- {{801428, 31472730, 16569427, 11065167, 29875704, 96627, 7908388,
1926
- 29073952, 53570360, 1387154}},
1927
- {{19646058, 5720633, 55692158, 12814208, 11607948, 12749789,
1928
- 14147075, 15156355, 45242033, 11835259}},
1929
- {{19299512, 1155910, 28703737, 14890794, 2925026, 7269399, 26121523,
1930
- 15467869, 40548314, 5052482}},
1931
- },
1932
- },
1933
- {
1934
- {
1935
- {{64091413, 10058205, 1980837, 3964243, 22160966, 12322533, 60677741,
1936
- 20936246, 12228556, 26550755}},
1937
- {{32944382, 14922211, 44263970, 5188527, 21913450, 24834489,
1938
- 4001464, 13238564, 60994061, 8653814}},
1939
- {{22865569, 28901697, 27603667, 21009037, 14348957, 8234005,
1940
- 24808405, 5719875, 28483275, 2841751}},
1941
- },
1942
- {
1943
- {{50687877, 32441126, 66781144, 21446575, 21886281, 18001658,
1944
- 65220897, 33238773, 19932057, 20815229}},
1945
- {{55452759, 10087520, 58243976, 28018288, 47830290, 30498519,
1946
- 3999227, 13239134, 62331395, 19644223}},
1947
- {{1382174, 21859713, 17266789, 9194690, 53784508, 9720080,
1948
- 20403944, 11284705, 53095046, 3093229}},
1949
- },
1950
- {
1951
- {{16650902, 22516500, 66044685, 1570628, 58779118, 7352752, 66806440,
1952
- 16271224, 43059443, 26862581}},
1953
- {{45197768, 27626490, 62497547, 27994275, 35364760, 22769138,
1954
- 24123613, 15193618, 45456747, 16815042}},
1955
- {{57172930, 29264984, 41829040, 4372841, 2087473, 10399484,
1956
- 31870908, 14690798, 17361620, 11864968}},
1957
- },
1958
- {
1959
- {{55801235, 6210371, 13206574, 5806320, 38091172, 19587231,
1960
- 54777658, 26067830, 41530403, 17313742}},
1961
- {{14668443, 21284197, 26039038, 15305210, 25515617, 4542480,
1962
- 10453892, 6577524, 9145645, 27110552}},
1963
- {{5974855, 3053895, 57675815, 23169240, 35243739, 3225008,
1964
- 59136222, 3936127, 61456591, 30504127}},
1965
- },
1966
- {
1967
- {{30625386, 28825032, 41552902, 20761565, 46624288, 7695098,
1968
- 17097188, 17250936, 39109084, 1803631}},
1969
- {{63555773, 9865098, 61880298, 4272700, 61435032, 16864731,
1970
- 14911343, 12196514, 45703375, 7047411}},
1971
- {{20093258, 9920966, 55970670, 28210574, 13161586, 12044805,
1972
- 34252013, 4124600, 34765036, 23296865}},
1973
- },
1974
- {
1975
- {{46320040, 14084653, 53577151, 7842146, 19119038, 19731827,
1976
- 4752376, 24839792, 45429205, 2288037}},
1977
- {{40289628, 30270716, 29965058, 3039786, 52635099, 2540456,
1978
- 29457502, 14625692, 42289247, 12570231}},
1979
- {{66045306, 22002608, 16920317, 12494842, 1278292, 27685323,
1980
- 45948920, 30055751, 55134159, 4724942}},
1981
- },
1982
- {
1983
- {{17960970, 21778898, 62967895, 23851901, 58232301, 32143814,
1984
- 54201480, 24894499, 37532563, 1903855}},
1985
- {{23134274, 19275300, 56426866, 31942495, 20684484, 15770816,
1986
- 54119114, 3190295, 26955097, 14109738}},
1987
- {{15308788, 5320727, 36995055, 19235554, 22902007, 7767164,
1988
- 29425325, 22276870, 31960941, 11934971}},
1989
- },
1990
- {
1991
- {{39713153, 8435795, 4109644, 12222639, 42480996, 14818668,
1992
- 20638173, 4875028, 10491392, 1379718}},
1993
- {{53949449, 9197840, 3875503, 24618324, 65725151, 27674630,
1994
- 33518458, 16176658, 21432314, 12180697}},
1995
- {{55321537, 11500837, 13787581, 19721842, 44678184, 10140204,
1996
- 1465425, 12689540, 56807545, 19681548}},
1997
- },
1998
- },
1999
- {
2000
- {
2001
- {{5414091, 18168391, 46101199, 9643569, 12834970, 1186149,
2002
- 64485948, 32212200, 26128230, 6032912}},
2003
- {{40771450, 19788269, 32496024, 19900513, 17847800, 20885276,
2004
- 3604024, 8316894, 41233830, 23117073}},
2005
- {{3296484, 6223048, 24680646, 21307972, 44056843, 5903204,
2006
- 58246567, 28915267, 12376616, 3188849}},
2007
- },
2008
- {
2009
- {{29190469, 18895386, 27549112, 32370916, 3520065, 22857131,
2010
- 32049514, 26245319, 50999629, 23702124}},
2011
- {{52364359, 24245275, 735817, 32955454, 46701176, 28496527,
2012
- 25246077, 17758763, 18640740, 32593455}},
2013
- {{60180029, 17123636, 10361373, 5642961, 4910474, 12345252,
2014
- 35470478, 33060001, 10530746, 1053335}},
2015
- },
2016
- {
2017
- {{37842897, 19367626, 53570647, 21437058, 47651804, 22899047,
2018
- 35646494, 30605446, 24018830, 15026644}},
2019
- {{44516310, 30409154, 64819587, 5953842, 53668675, 9425630,
2020
- 25310643, 13003497, 64794073, 18408815}},
2021
- {{39688860, 32951110, 59064879, 31885314, 41016598, 13987818,
2022
- 39811242, 187898, 43942445, 31022696}},
2023
- },
2024
- {
2025
- {{45364466, 19743956, 1844839, 5021428, 56674465, 17642958,
2026
- 9716666, 16266922, 62038647, 726098}},
2027
- {{29370903, 27500434, 7334070, 18212173, 9385286, 2247707,
2028
- 53446902, 28714970, 30007387, 17731091}},
2029
- {{66172485, 16086690, 23751945, 33011114, 65941325, 28365395, 9137108,
2030
- 730663, 9835848, 4555336}},
2031
- },
2032
- {
2033
- {{43732429, 1410445, 44855111, 20654817, 30867634, 15826977,
2034
- 17693930, 544696, 55123566, 12422645}},
2035
- {{31117226, 21338698, 53606025, 6561946, 57231997, 20796761,
2036
- 61990178, 29457725, 29120152, 13924425}},
2037
- {{49707966, 19321222, 19675798, 30819676, 56101901, 27695611,
2038
- 57724924, 22236731, 7240930, 33317044}},
2039
- },
2040
- {
2041
- {{35747106, 22207651, 52101416, 27698213, 44655523, 21401660,
2042
- 1222335, 4389483, 3293637, 18002689}},
2043
- {{50424044, 19110186, 11038543, 11054958, 53307689, 30215898,
2044
- 42789283, 7733546, 12796905, 27218610}},
2045
- {{58349431, 22736595, 41689999, 10783768, 36493307, 23807620,
2046
- 38855524, 3647835, 3222231, 22393970}},
2047
- },
2048
- {
2049
- {{18606113, 1693100, 41660478, 18384159, 4112352, 10045021,
2050
- 23603893, 31506198, 59558087, 2484984}},
2051
- {{9255298, 30423235, 54952701, 32550175, 13098012, 24339566,
2052
- 16377219, 31451620, 47306788, 30519729}},
2053
- {{44379556, 7496159, 61366665, 11329248, 19991973, 30206930,
2054
- 35390715, 9936965, 37011176, 22935634}},
2055
- },
2056
- {
2057
- {{21878571, 28553135, 4338335, 13643897, 64071999, 13160959,
2058
- 19708896, 5415497, 59748361, 29445138}},
2059
- {{27736842, 10103576, 12500508, 8502413, 63695848, 23920873,
2060
- 10436917, 32004156, 43449720, 25422331}},
2061
- {{19492550, 21450067, 37426887, 32701801, 63900692, 12403436,
2062
- 30066266, 8367329, 13243957, 8709688}},
2063
- },
2064
- },
2065
- {
2066
- {
2067
- {{12015105, 2801261, 28198131, 10151021, 24818120, 28811299,
2068
- 55914672, 27908697, 5150967, 7274186}},
2069
- {{2831347, 21062286, 1478974, 6122054, 23825128, 20820846,
2070
- 31097298, 6083058, 31021603, 23760822}},
2071
- {{64578913, 31324785, 445612, 10720828, 53259337, 22048494,
2072
- 43601132, 16354464, 15067285, 19406725}},
2073
- },
2074
- {
2075
- {{7840923, 14037873, 33744001, 15934015, 66380651, 29911725,
2076
- 21403987, 1057586, 47729402, 21151211}},
2077
- {{915865, 17085158, 15608284, 24765302, 42751837, 6060029,
2078
- 49737545, 8410996, 59888403, 16527024}},
2079
- {{32922597, 32997445, 20336073, 17369864, 10903704, 28169945,
2080
- 16957573, 52992, 23834301, 6588044}},
2081
- },
2082
- {
2083
- {{32752011, 11232950, 3381995, 24839566, 22652987, 22810329,
2084
- 17159698, 16689107, 46794284, 32248439}},
2085
- {{62419196, 9166775, 41398568, 22707125, 11576751, 12733943,
2086
- 7924251, 30802151, 1976122, 26305405}},
2087
- {{21251203, 16309901, 64125849, 26771309, 30810596, 12967303, 156041,
2088
- 30183180, 12331344, 25317235}},
2089
- },
2090
- {
2091
- {{8651595, 29077400, 51023227, 28557437, 13002506, 2950805,
2092
- 29054427, 28447462, 10008135, 28886531}},
2093
- {{31486061, 15114593, 52847614, 12951353, 14369431, 26166587,
2094
- 16347320, 19892343, 8684154, 23021480}},
2095
- {{19443825, 11385320, 24468943, 23895364, 43189605, 2187568,
2096
- 40845657, 27467510, 31316347, 14219878}},
2097
- },
2098
- {
2099
- {{38514374, 1193784, 32245219, 11392485, 31092169, 15722801,
2100
- 27146014, 6992409, 29126555, 9207390}},
2101
- {{32382916, 1110093, 18477781, 11028262, 39697101, 26006320,
2102
- 62128346, 10843781, 59151264, 19118701}},
2103
- {{2814918, 7836403, 27519878, 25686276, 46214848, 22000742,
2104
- 45614304, 8550129, 28346258, 1994730}},
2105
- },
2106
- {
2107
- {{47530565, 8085544, 53108345, 29605809, 2785837, 17323125,
2108
- 47591912, 7174893, 22628102, 8115180}},
2109
- {{36703732, 955510, 55975026, 18476362, 34661776, 20276352,
2110
- 41457285, 3317159, 57165847, 930271}},
2111
- {{51805164, 26720662, 28856489, 1357446, 23421993, 1057177,
2112
- 24091212, 32165462, 44343487, 22903716}},
2113
- },
2114
- {
2115
- {{44357633, 28250434, 54201256, 20785565, 51297352, 25757378,
2116
- 52269845, 17000211, 65241845, 8398969}},
2117
- {{35139535, 2106402, 62372504, 1362500, 12813763, 16200670,
2118
- 22981545, 27263159, 18009407, 17781660}},
2119
- {{49887941, 24009210, 39324209, 14166834, 29815394, 7444469,
2120
- 29551787, 29827013, 19288548, 1325865}},
2121
- },
2122
- {
2123
- {{15100138, 17718680, 43184885, 32549333, 40658671, 15509407,
2124
- 12376730, 30075286, 33166106, 25511682}},
2125
- {{20909212, 13023121, 57899112, 16251777, 61330449, 25459517,
2126
- 12412150, 10018715, 2213263, 19676059}},
2127
- {{32529814, 22479743, 30361438, 16864679, 57972923, 1513225,
2128
- 22922121, 6382134, 61341936, 8371347}},
2129
- },
2130
- },
2131
- {
2132
- {
2133
- {{9923462, 11271500, 12616794, 3544722, 37110496, 31832805,
2134
- 12891686, 25361300, 40665920, 10486143}},
2135
- {{44511638, 26541766, 8587002, 25296571, 4084308, 20584370, 361725,
2136
- 2610596, 43187334, 22099236}},
2137
- {{5408392, 32417741, 62139741, 10561667, 24145918, 14240566,
2138
- 31319731, 29318891, 19985174, 30118346}},
2139
- },
2140
- {
2141
- {{53114407, 16616820, 14549246, 3341099, 32155958, 13648976,
2142
- 49531796, 8849296, 65030, 8370684}},
2143
- {{58787919, 21504805, 31204562, 5839400, 46481576, 32497154,
2144
- 47665921, 6922163, 12743482, 23753914}},
2145
- {{64747493, 12678784, 28815050, 4759974, 43215817, 4884716,
2146
- 23783145, 11038569, 18800704, 255233}},
2147
- },
2148
- {
2149
- {{61839187, 31780545, 13957885, 7990715, 23132995, 728773, 13393847,
2150
- 9066957, 19258688, 18800639}},
2151
- {{64172210, 22726896, 56676774, 14516792, 63468078, 4372540,
2152
- 35173943, 2209389, 65584811, 2055793}},
2153
- {{580882, 16705327, 5468415, 30871414, 36182444, 18858431,
2154
- 59905517, 24560042, 37087844, 7394434}},
2155
- },
2156
- {
2157
- {{23838809, 1822728, 51370421, 15242726, 8318092, 29821328,
2158
- 45436683, 30062226, 62287122, 14799920}},
2159
- {{13345610, 9759151, 3371034, 17416641, 16353038, 8577942, 31129804,
2160
- 13496856, 58052846, 7402517}},
2161
- {{2286874, 29118501, 47066405, 31546095, 53412636, 5038121,
2162
- 11006906, 17794080, 8205060, 1607563}},
2163
- },
2164
- {
2165
- {{14414067, 25552300, 3331829, 30346215, 22249150, 27960244,
2166
- 18364660, 30647474, 30019586, 24525154}},
2167
- {{39420813, 1585952, 56333811, 931068, 37988643, 22552112,
2168
- 52698034, 12029092, 9944378, 8024}},
2169
- {{4368715, 29844802, 29874199, 18531449, 46878477, 22143727,
2170
- 50994269, 32555346, 58966475, 5640029}},
2171
- },
2172
- {
2173
- {{10299591, 13746483, 11661824, 16234854, 7630238, 5998374, 9809887,
2174
- 16859868, 15219797, 19226649}},
2175
- {{27425505, 27835351, 3055005, 10660664, 23458024, 595578, 51710259,
2176
- 32381236, 48766680, 9742716}},
2177
- {{6744077, 2427284, 26042789, 2720740, 66260958, 1118973, 32324614,
2178
- 7406442, 12420155, 1994844}},
2179
- },
2180
- {
2181
- {{14012502, 28529712, 48724410, 23975962, 40623521, 29617992,
2182
- 54075385, 22644628, 24319928, 27108099}},
2183
- {{16412671, 29047065, 10772640, 15929391, 50040076, 28895810,
2184
- 10555944, 23070383, 37006495, 28815383}},
2185
- {{22397363, 25786748, 57815702, 20761563, 17166286, 23799296,
2186
- 39775798, 6199365, 21880021, 21303672}},
2187
- },
2188
- {
2189
- {{62825557, 5368522, 35991846, 8163388, 36785801, 3209127,
2190
- 16557151, 8890729, 8840445, 4957760}},
2191
- {{51661137, 709326, 60189418, 22684253, 37330941, 6522331,
2192
- 45388683, 12130071, 52312361, 5005756}},
2193
- {{64994094, 19246303, 23019041, 15765735, 41839181, 6002751,
2194
- 10183197, 20315106, 50713577, 31378319}},
2195
- },
2196
- },
2197
- {
2198
- {
2199
- {{48083108, 1632004, 13466291, 25559332, 43468412, 16573536,
2200
- 35094956, 30497327, 22208661, 2000468}},
2201
- {{3065054, 32141671, 41510189, 33192999, 49425798, 27851016,
2202
- 58944651, 11248526, 63417650, 26140247}},
2203
- {{10379208, 27508878, 8877318, 1473647, 37817580, 21046851,
2204
- 16690914, 2553332, 63976176, 16400288}},
2205
- },
2206
- {
2207
- {{15716668, 1254266, 48636174, 7446273, 58659946, 6344163,
2208
- 45011593, 26268851, 26894936, 9132066}},
2209
- {{24158868, 12938817, 11085297, 25376834, 39045385, 29097348,
2210
- 36532400, 64451, 60291780, 30861549}},
2211
- {{13488534, 7794716, 22236231, 5989356, 25426474, 20976224, 2350709,
2212
- 30135921, 62420857, 2364225}},
2213
- },
2214
- {
2215
- {{16335033, 9132434, 25640582, 6678888, 1725628, 8517937, 55301840,
2216
- 21856974, 15445874, 25756331}},
2217
- {{29004188, 25687351, 28661401, 32914020, 54314860, 25611345,
2218
- 31863254, 29418892, 66830813, 17795152}},
2219
- {{60986784, 18687766, 38493958, 14569918, 56250865, 29962602,
2220
- 10343411, 26578142, 37280576, 22738620}},
2221
- },
2222
- {
2223
- {{27081650, 3463984, 14099042, 29036828, 1616302, 27348828, 29542635,
2224
- 15372179, 17293797, 960709}},
2225
- {{20263915, 11434237, 61343429, 11236809, 13505955, 22697330,
2226
- 50997518, 6493121, 47724353, 7639713}},
2227
- {{64278047, 18715199, 25403037, 25339236, 58791851, 17380732,
2228
- 18006286, 17510682, 29994676, 17746311}},
2229
- },
2230
- {
2231
- {{9769828, 5202651, 42951466, 19923039, 39057860, 21992807,
2232
- 42495722, 19693649, 35924288, 709463}},
2233
- {{12286395, 13076066, 45333675, 32377809, 42105665, 4057651,
2234
- 35090736, 24663557, 16102006, 13205847}},
2235
- {{13733362, 5599946, 10557076, 3195751, 61550873, 8536969, 41568694,
2236
- 8525971, 10151379, 10394400}},
2237
- },
2238
- {
2239
- {{4024660, 17416881, 22436261, 12276534, 58009849, 30868332,
2240
- 19698228, 11743039, 33806530, 8934413}},
2241
- {{51229064, 29029191, 58528116, 30620370, 14634844, 32856154,
2242
- 57659786, 3137093, 55571978, 11721157}},
2243
- {{17555920, 28540494, 8268605, 2331751, 44370049, 9761012, 9319229,
2244
- 8835153, 57903375, 32274386}},
2245
- },
2246
- {
2247
- {{66647436, 25724417, 20614117, 16688288, 59594098, 28747312,
2248
- 22300303, 505429, 6108462, 27371017}},
2249
- {{62038564, 12367916, 36445330, 3234472, 32617080, 25131790,
2250
- 29880582, 20071101, 40210373, 25686972}},
2251
- {{35133562, 5726538, 26934134, 10237677, 63935147, 32949378,
2252
- 24199303, 3795095, 7592688, 18562353}},
2253
- },
2254
- {
2255
- {{21594432, 18590204, 17466407, 29477210, 32537083, 2739898,
2256
- 6407723, 12018833, 38852812, 4298411}},
2257
- {{46458361, 21592935, 39872588, 570497, 3767144, 31836892,
2258
- 13891941, 31985238, 13717173, 10805743}},
2259
- {{52432215, 17910135, 15287173, 11927123, 24177847, 25378864,
2260
- 66312432, 14860608, 40169934, 27690595}},
2261
- },
2262
- },
2263
- {
2264
- {
2265
- {{12962541, 5311799, 57048096, 11658279, 18855286, 25600231,
2266
- 13286262, 20745728, 62727807, 9882021}},
2267
- {{18512060, 11319350, 46985740, 15090308, 18818594, 5271736,
2268
- 44380960, 3666878, 43141434, 30255002}},
2269
- {{60319844, 30408388, 16192428, 13241070, 15898607, 19348318,
2270
- 57023983, 26893321, 64705764, 5276064}},
2271
- },
2272
- {
2273
- {{30169808, 28236784, 26306205, 21803573, 27814963, 7069267,
2274
- 7152851, 3684982, 1449224, 13082861}},
2275
- {{10342807, 3098505, 2119311, 193222, 25702612, 12233820, 23697382,
2276
- 15056736, 46092426, 25352431}},
2277
- {{33958735, 3261607, 22745853, 7948688, 19370557, 18376767,
2278
- 40936887, 6482813, 56808784, 22494330}},
2279
- },
2280
- {
2281
- {{32869458, 28145887, 25609742, 15678670, 56421095, 18083360,
2282
- 26112420, 2521008, 44444576, 6904814}},
2283
- {{29506904, 4457497, 3377935, 23757988, 36598817, 12935079, 1561737,
2284
- 3841096, 38105225, 26896789}},
2285
- {{10340844, 26924055, 48452231, 31276001, 12621150, 20215377,
2286
- 30878496, 21730062, 41524312, 5181965}},
2287
- },
2288
- {
2289
- {{25940096, 20896407, 17324187, 23247058, 58437395, 15029093,
2290
- 24396252, 17103510, 64786011, 21165857}},
2291
- {{45343161, 9916822, 65808455, 4079497, 66080518, 11909558, 1782390,
2292
- 12641087, 20603771, 26992690}},
2293
- {{48226577, 21881051, 24849421, 11501709, 13161720, 28785558,
2294
- 1925522, 11914390, 4662781, 7820689}},
2295
- },
2296
- {
2297
- {{12241050, 33128450, 8132690, 9393934, 32846760, 31954812, 29749455,
2298
- 12172924, 16136752, 15264020}},
2299
- {{56758909, 18873868, 58896884, 2330219, 49446315, 19008651,
2300
- 10658212, 6671822, 19012087, 3772772}},
2301
- {{3753511, 30133366, 10617073, 2028709, 14841030, 26832768, 28718731,
2302
- 17791548, 20527770, 12988982}},
2303
- },
2304
- {
2305
- {{52286360, 27757162, 63400876, 12689772, 66209881, 22639565,
2306
- 42925817, 22989488, 3299664, 21129479}},
2307
- {{50331161, 18301130, 57466446, 4978982, 3308785, 8755439, 6943197,
2308
- 6461331, 41525717, 8991217}},
2309
- {{49882601, 1816361, 65435576, 27467992, 31783887, 25378441,
2310
- 34160718, 7417949, 36866577, 1507264}},
2311
- },
2312
- {
2313
- {{29692644, 6829891, 56610064, 4334895, 20945975, 21647936,
2314
- 38221255, 8209390, 14606362, 22907359}},
2315
- {{63627275, 8707080, 32188102, 5672294, 22096700, 1711240, 34088169,
2316
- 9761486, 4170404, 31469107}},
2317
- {{55521375, 14855944, 62981086, 32022574, 40459774, 15084045,
2318
- 22186522, 16002000, 52832027, 25153633}},
2319
- },
2320
- {
2321
- {{62297408, 13761028, 35404987, 31070512, 63796392, 7869046,
2322
- 59995292, 23934339, 13240844, 10965870}},
2323
- {{59366301, 25297669, 52340529, 19898171, 43876480, 12387165,
2324
- 4498947, 14147411, 29514390, 4302863}},
2325
- {{53695440, 21146572, 20757301, 19752600, 14785142, 8976368,
2326
- 62047588, 31410058, 17846987, 19582505}},
2327
- },
2328
- },
2329
- {
2330
- {
2331
- {{64864412, 32799703, 62511833, 32488122, 60861691, 1455298,
2332
- 45461136, 24339642, 61886162, 12650266}},
2333
- {{57202067, 17484121, 21134159, 12198166, 40044289, 708125, 387813,
2334
- 13770293, 47974538, 10958662}},
2335
- {{22470984, 12369526, 23446014, 28113323, 45588061, 23855708,
2336
- 55336367, 21979976, 42025033, 4271861}},
2337
- },
2338
- {
2339
- {{41939299, 23500789, 47199531, 15361594, 61124506, 2159191,
2340
- 75375, 29275903, 34582642, 8469672}},
2341
- {{15854951, 4148314, 58214974, 7259001, 11666551, 13824734,
2342
- 36577666, 2697371, 24154791, 24093489}},
2343
- {{15446137, 17747788, 29759746, 14019369, 30811221, 23944241,
2344
- 35526855, 12840103, 24913809, 9815020}},
2345
- },
2346
- {
2347
- {{62399578, 27940162, 35267365, 21265538, 52665326, 10799413,
2348
- 58005188, 13438768, 18735128, 9466238}},
2349
- {{11933045, 9281483, 5081055, 28370608, 64480701, 28648802, 59381042,
2350
- 22658328, 44380208, 16199063}},
2351
- {{14576810, 379472, 40322331, 25237195, 37682355, 22741457,
2352
- 67006097, 1876698, 30801119, 2164795}},
2353
- },
2354
- {
2355
- {{15995086, 3199873, 13672555, 13712240, 47730029, 28906785,
2356
- 54027253, 18058162, 53616056, 1268051}},
2357
- {{56818250, 29895392, 63822271, 10948817, 23037027, 3794475,
2358
- 63638526, 20954210, 50053494, 3565903}},
2359
- {{29210069, 24135095, 61189071, 28601646, 10834810, 20226706,
2360
- 50596761, 22733718, 39946641, 19523900}},
2361
- },
2362
- {
2363
- {{53946955, 15508587, 16663704, 25398282, 38758921, 9019122,
2364
- 37925443, 29785008, 2244110, 19552453}},
2365
- {{61955989, 29753495, 57802388, 27482848, 16243068, 14684434,
2366
- 41435776, 17373631, 13491505, 4641841}},
2367
- {{10813398, 643330, 47920349, 32825515, 30292061, 16954354,
2368
- 27548446, 25833190, 14476988, 20787001}},
2369
- },
2370
- {
2371
- {{10292079, 9984945, 6481436, 8279905, 59857350, 7032742, 27282937,
2372
- 31910173, 39196053, 12651323}},
2373
- {{35923332, 32741048, 22271203, 11835308, 10201545, 15351028,
2374
- 17099662, 3988035, 21721536, 30405492}},
2375
- {{10202177, 27008593, 35735631, 23979793, 34958221, 25434748,
2376
- 54202543, 3852693, 13216206, 14842320}},
2377
- },
2378
- {
2379
- {{51293224, 22953365, 60569911, 26295436, 60124204, 26972653,
2380
- 35608016, 13765823, 39674467, 9900183}},
2381
- {{14465486, 19721101, 34974879, 18815558, 39665676, 12990491,
2382
- 33046193, 15796406, 60056998, 25514317}},
2383
- {{30924398, 25274812, 6359015, 20738097, 16508376, 9071735,
2384
- 41620263, 15413634, 9524356, 26535554}},
2385
- },
2386
- {
2387
- {{12274201, 20378885, 32627640, 31769106, 6736624, 13267305,
2388
- 5237659, 28444949, 15663515, 4035784}},
2389
- {{64157555, 8903984, 17349946, 601635, 50676049, 28941875,
2390
- 53376124, 17665097, 44850385, 4659090}},
2391
- {{50192582, 28601458, 36715152, 18395610, 20774811, 15897498,
2392
- 5736189, 15026997, 64930608, 20098846}},
2393
- },
2394
- },
2395
- {
2396
- {
2397
- {{58249865, 31335375, 28571665, 23398914, 66634396, 23448733,
2398
- 63307367, 278094, 23440562, 33264224}},
2399
- {{10226222, 27625730, 15139955, 120818, 52241171, 5218602, 32937275,
2400
- 11551483, 50536904, 26111567}},
2401
- {{17932739, 21117156, 43069306, 10749059, 11316803, 7535897,
2402
- 22503767, 5561594, 63462240, 3898660}},
2403
- },
2404
- {
2405
- {{7749907, 32584865, 50769132, 33537967, 42090752, 15122142, 65535333,
2406
- 7152529, 21831162, 1245233}},
2407
- {{26958440, 18896406, 4314585, 8346991, 61431100, 11960071,
2408
- 34519569, 32934396, 36706772, 16838219}},
2409
- {{54942968, 9166946, 33491384, 13673479, 29787085, 13096535,
2410
- 6280834, 14587357, 44770839, 13987524}},
2411
- },
2412
- {
2413
- {{42758936, 7778774, 21116000, 15572597, 62275598, 28196653,
2414
- 62807965, 28429792, 59639082, 30696363}},
2415
- {{9681908, 26817309, 35157219, 13591837, 60225043, 386949, 31622781,
2416
- 6439245, 52527852, 4091396}},
2417
- {{58682418, 1470726, 38999185, 31957441, 3978626, 28430809,
2418
- 47486180, 12092162, 29077877, 18812444}},
2419
- },
2420
- {
2421
- {{5269168, 26694706, 53878652, 25533716, 25932562, 1763552,
2422
- 61502754, 28048550, 47091016, 2357888}},
2423
- {{32264008, 18146780, 61721128, 32394338, 65017541, 29607531,
2424
- 23104803, 20684524, 5727337, 189038}},
2425
- {{14609104, 24599962, 61108297, 16931650, 52531476, 25810533,
2426
- 40363694, 10942114, 41219933, 18669734}},
2427
- },
2428
- {
2429
- {{20513481, 5557931, 51504251, 7829530, 26413943, 31535028,
2430
- 45729895, 7471780, 13913677, 28416557}},
2431
- {{41534488, 11967825, 29233242, 12948236, 60354399, 4713226,
2432
- 58167894, 14059179, 12878652, 8511905}},
2433
- {{41452044, 3393630, 64153449, 26478905, 64858154, 9366907,
2434
- 36885446, 6812973, 5568676, 30426776}},
2435
- },
2436
- {
2437
- {{11630004, 12144454, 2116339, 13606037, 27378885, 15676917,
2438
- 49700111, 20050058, 52713667, 8070817}},
2439
- {{27117677, 23547054, 35826092, 27984343, 1127281, 12772488,
2440
- 37262958, 10483305, 55556115, 32525717}},
2441
- {{10637467, 27866368, 5674780, 1072708, 40765276, 26572129,
2442
- 65424888, 9177852, 39615702, 15431202}},
2443
- },
2444
- {
2445
- {{20525126, 10892566, 54366392, 12779442, 37615830, 16150074,
2446
- 38868345, 14943141, 52052074, 25618500}},
2447
- {{37084402, 5626925, 66557297, 23573344, 753597, 11981191, 25244767,
2448
- 30314666, 63752313, 9594023}},
2449
- {{43356201, 2636869, 61944954, 23450613, 585133, 7877383, 11345683,
2450
- 27062142, 13352334, 22577348}},
2451
- },
2452
- {
2453
- {{65177046, 28146973, 3304648, 20669563, 17015805, 28677341,
2454
- 37325013, 25801949, 53893326, 33235227}},
2455
- {{20239939, 6607058, 6203985, 3483793, 48721888, 32775202, 46385121,
2456
- 15077869, 44358105, 14523816}},
2457
- {{27406023, 27512775, 27423595, 29057038, 4996213, 10002360,
2458
- 38266833, 29008937, 36936121, 28748764}},
2459
- },
2460
- },
2461
- {
2462
- {
2463
- {{11374242, 12660715, 17861383, 21013599, 10935567, 1099227,
2464
- 53222788, 24462691, 39381819, 11358503}},
2465
- {{54378055, 10311866, 1510375, 10778093, 64989409, 24408729,
2466
- 32676002, 11149336, 40985213, 4985767}},
2467
- {{48012542, 341146, 60911379, 33315398, 15756972, 24757770, 66125820,
2468
- 13794113, 47694557, 17933176}},
2469
- },
2470
- {
2471
- {{6490062, 11940286, 25495923, 25828072, 8668372, 24803116, 3367602,
2472
- 6970005, 65417799, 24549641}},
2473
- {{1656478, 13457317, 15370807, 6364910, 13605745, 8362338, 47934242,
2474
- 28078708, 50312267, 28522993}},
2475
- {{44835530, 20030007, 67044178, 29220208, 48503227, 22632463,
2476
- 46537798, 26546453, 67009010, 23317098}},
2477
- },
2478
- {
2479
- {{17747446, 10039260, 19368299, 29503841, 46478228, 17513145,
2480
- 31992682, 17696456, 37848500, 28042460}},
2481
- {{31932008, 28568291, 47496481, 16366579, 22023614, 88450, 11371999,
2482
- 29810185, 4882241, 22927527}},
2483
- {{29796488, 37186, 19818052, 10115756, 55279832, 3352735, 18551198,
2484
- 3272828, 61917932, 29392022}},
2485
- },
2486
- {
2487
- {{12501267, 4044383, 58495907, 20162046, 34678811, 5136598,
2488
- 47878486, 30024734, 330069, 29895023}},
2489
- {{6384877, 2899513, 17807477, 7663917, 64749976, 12363164, 25366522,
2490
- 24980540, 66837568, 12071498}},
2491
- {{58743349, 29511910, 25133447, 29037077, 60897836, 2265926,
2492
- 34339246, 1936674, 61949167, 3829362}},
2493
- },
2494
- {
2495
- {{28425966, 27718999, 66531773, 28857233, 52891308, 6870929, 7921550,
2496
- 26986645, 26333139, 14267664}},
2497
- {{56041645, 11871230, 27385719, 22994888, 62522949, 22365119,
2498
- 10004785, 24844944, 45347639, 8930323}},
2499
- {{45911060, 17158396, 25654215, 31829035, 12282011, 11008919,
2500
- 1541940, 4757911, 40617363, 17145491}},
2501
- },
2502
- {
2503
- {{13537262, 25794942, 46504023, 10961926, 61186044, 20336366,
2504
- 53952279, 6217253, 51165165, 13814989}},
2505
- {{49686272, 15157789, 18705543, 29619, 24409717, 33293956, 27361680,
2506
- 9257833, 65152338, 31777517}},
2507
- {{42063564, 23362465, 15366584, 15166509, 54003778, 8423555,
2508
- 37937324, 12361134, 48422886, 4578289}},
2509
- },
2510
- {
2511
- {{24579768, 3711570, 1342322, 22374306, 40103728, 14124955,
2512
- 44564335, 14074918, 21964432, 8235257}},
2513
- {{60580251, 31142934, 9442965, 27628844, 12025639, 32067012,
2514
- 64127349, 31885225, 13006805, 2355433}},
2515
- {{50803946, 19949172, 60476436, 28412082, 16974358, 22643349,
2516
- 27202043, 1719366, 1141648, 20758196}},
2517
- },
2518
- {
2519
- {{54244920, 20334445, 58790597, 22536340, 60298718, 28710537,
2520
- 13475065, 30420460, 32674894, 13715045}},
2521
- {{11423316, 28086373, 32344215, 8962751, 24989809, 9241752,
2522
- 53843611, 16086211, 38367983, 17912338}},
2523
- {{65699196, 12530727, 60740138, 10847386, 19531186, 19422272,
2524
- 55399715, 7791793, 39862921, 4383346}},
2525
- },
2526
- },
2527
- {
2528
- {
2529
- {{38137966, 5271446, 65842855, 23817442, 54653627, 16732598,
2530
- 62246457, 28647982, 27193556, 6245191}},
2531
- {{51914908, 5362277, 65324971, 2695833, 4960227, 12840725, 23061898,
2532
- 3260492, 22510453, 8577507}},
2533
- {{54476394, 11257345, 34415870, 13548176, 66387860, 10879010,
2534
- 31168030, 13952092, 37537372, 29918525}},
2535
- },
2536
- {
2537
- {{3877321, 23981693, 32416691, 5405324, 56104457, 19897796,
2538
- 3759768, 11935320, 5611860, 8164018}},
2539
- {{50833043, 14667796, 15906460, 12155291, 44997715, 24514713,
2540
- 32003001, 24722143, 5773084, 25132323}},
2541
- {{43320746, 25300131, 1950874, 8937633, 18686727, 16459170, 66203139,
2542
- 12376319, 31632953, 190926}},
2543
- },
2544
- {
2545
- {{42515238, 17415546, 58684872, 13378745, 14162407, 6901328,
2546
- 58820115, 4508563, 41767309, 29926903}},
2547
- {{8884438, 27670423, 6023973, 10104341, 60227295, 28612898, 18722940,
2548
- 18768427, 65436375, 827624}},
2549
- {{34388281, 17265135, 34605316, 7101209, 13354605, 2659080,
2550
- 65308289, 19446395, 42230385, 1541285}},
2551
- },
2552
- {
2553
- {{2901328, 32436745, 3880375, 23495044, 49487923, 29941650,
2554
- 45306746, 29986950, 20456844, 31669399}},
2555
- {{27019610, 12299467, 53450576, 31951197, 54247203, 28692960,
2556
- 47568713, 28538373, 29439640, 15138866}},
2557
- {{21536104, 26928012, 34661045, 22864223, 44700786, 5175813,
2558
- 61688824, 17193268, 7779327, 109896}},
2559
- },
2560
- {
2561
- {{30279725, 14648750, 59063993, 6425557, 13639621, 32810923, 28698389,
2562
- 12180118, 23177719, 33000357}},
2563
- {{26572828, 3405927, 35407164, 12890904, 47843196, 5335865,
2564
- 60615096, 2378491, 4439158, 20275085}},
2565
- {{44392139, 3489069, 57883598, 33221678, 18875721, 32414337,
2566
- 14819433, 20822905, 49391106, 28092994}},
2567
- },
2568
- {
2569
- {{62052362, 16566550, 15953661, 3767752, 56672365, 15627059,
2570
- 66287910, 2177224, 8550082, 18440267}},
2571
- {{48635543, 16596774, 66727204, 15663610, 22860960, 15585581,
2572
- 39264755, 29971692, 43848403, 25125843}},
2573
- {{34628313, 15707274, 58902952, 27902350, 29464557, 2713815,
2574
- 44383727, 15860481, 45206294, 1494192}},
2575
- },
2576
- {
2577
- {{47546773, 19467038, 41524991, 24254879, 13127841, 759709,
2578
- 21923482, 16529112, 8742704, 12967017}},
2579
- {{38643965, 1553204, 32536856, 23080703, 42417258, 33148257,
2580
- 58194238, 30620535, 37205105, 15553882}},
2581
- {{21877890, 3230008, 9881174, 10539357, 62311749, 2841331, 11543572,
2582
- 14513274, 19375923, 20906471}},
2583
- },
2584
- {
2585
- {{8832269, 19058947, 13253510, 5137575, 5037871, 4078777, 24880818,
2586
- 27331716, 2862652, 9455043}},
2587
- {{29306751, 5123106, 20245049, 19404543, 9592565, 8447059, 65031740,
2588
- 30564351, 15511448, 4789663}},
2589
- {{46429108, 7004546, 8824831, 24119455, 63063159, 29803695,
2590
- 61354101, 108892, 23513200, 16652362}},
2591
- },
2592
- },
2593
- {
2594
- {
2595
- {{33852691, 4144781, 62632835, 26975308, 10770038, 26398890,
2596
- 60458447, 20618131, 48789665, 10212859}},
2597
- {{2756062, 8598110, 7383731, 26694540, 22312758, 32449420, 21179800,
2598
- 2600940, 57120566, 21047965}},
2599
- {{42463153, 13317461, 36659605, 17900503, 21365573, 22684775,
2600
- 11344423, 864440, 64609187, 16844368}},
2601
- },
2602
- {
2603
- {{40676061, 6148328, 49924452, 19080277, 18782928, 33278435,
2604
- 44547329, 211299, 2719757, 4940997}},
2605
- {{65784982, 3911312, 60160120, 14759764, 37081714, 7851206,
2606
- 21690126, 8518463, 26699843, 5276295}},
2607
- {{53958991, 27125364, 9396248, 365013, 24703301, 23065493, 1321585,
2608
- 149635, 51656090, 7159368}},
2609
- },
2610
- {
2611
- {{9987761, 30149673, 17507961, 9505530, 9731535, 31388918, 22356008,
2612
- 8312176, 22477218, 25151047}},
2613
- {{18155857, 17049442, 19744715, 9006923, 15154154, 23015456,
2614
- 24256459, 28689437, 44560690, 9334108}},
2615
- {{2986088, 28642539, 10776627, 30080588, 10620589, 26471229,
2616
- 45695018, 14253544, 44521715, 536905}},
2617
- },
2618
- {
2619
- {{4377737, 8115836, 24567078, 15495314, 11625074, 13064599, 7390551,
2620
- 10589625, 10838060, 18134008}},
2621
- {{47766460, 867879, 9277171, 30335973, 52677291, 31567988,
2622
- 19295825, 17757482, 6378259, 699185}},
2623
- {{7895007, 4057113, 60027092, 20476675, 49222032, 33231305, 66392824,
2624
- 15693154, 62063800, 20180469}},
2625
- },
2626
- {
2627
- {{59371282, 27685029, 52542544, 26147512, 11385653, 13201616,
2628
- 31730678, 22591592, 63190227, 23885106}},
2629
- {{10188286, 17783598, 59772502, 13427542, 22223443, 14896287,
2630
- 30743455, 7116568, 45322357, 5427592}},
2631
- {{696102, 13206899, 27047647, 22922350, 15285304, 23701253,
2632
- 10798489, 28975712, 19236242, 12477404}},
2633
- },
2634
- {
2635
- {{55879425, 11243795, 50054594, 25513566, 66320635, 25386464,
2636
- 63211194, 11180503, 43939348, 7733643}},
2637
- {{17800790, 19518253, 40108434, 21787760, 23887826, 3149671,
2638
- 23466177, 23016261, 10322026, 15313801}},
2639
- {{26246234, 11968874, 32263343, 28085704, 6830754, 20231401,
2640
- 51314159, 33452449, 42659621, 10890803}},
2641
- },
2642
- {
2643
- {{35743198, 10271362, 54448239, 27287163, 16690206, 20491888,
2644
- 52126651, 16484930, 25180797, 28219548}},
2645
- {{66522290, 10376443, 34522450, 22268075, 19801892, 10997610,
2646
- 2276632, 9482883, 316878, 13820577}},
2647
- {{57226037, 29044064, 64993357, 16457135, 56008783, 11674995,
2648
- 30756178, 26039378, 30696929, 29841583}},
2649
- },
2650
- {
2651
- {{32988917, 23951020, 12499365, 7910787, 56491607, 21622917,
2652
- 59766047, 23569034, 34759346, 7392472}},
2653
- {{58253184, 15927860, 9866406, 29905021, 64711949, 16898650,
2654
- 36699387, 24419436, 25112946, 30627788}},
2655
- {{64604801, 33117465, 25621773, 27875660, 15085041, 28074555,
2656
- 42223985, 20028237, 5537437, 19640113}},
2657
- },
2658
- },
2659
- {
2660
- {
2661
- {{55883280, 2320284, 57524584, 10149186, 33664201, 5808647,
2662
- 52232613, 31824764, 31234589, 6090599}},
2663
- {{57475529, 116425, 26083934, 2897444, 60744427, 30866345, 609720,
2664
- 15878753, 60138459, 24519663}},
2665
- {{39351007, 247743, 51914090, 24551880, 23288160, 23542496,
2666
- 43239268, 6503645, 20650474, 1804084}},
2667
- },
2668
- {
2669
- {{39519059, 15456423, 8972517, 8469608, 15640622, 4439847, 3121995,
2670
- 23224719, 27842615, 33352104}},
2671
- {{51801891, 2839643, 22530074, 10026331, 4602058, 5048462, 28248656,
2672
- 5031932, 55733782, 12714368}},
2673
- {{20807691, 26283607, 29286140, 11421711, 39232341, 19686201,
2674
- 45881388, 1035545, 47375635, 12796919}},
2675
- },
2676
- {
2677
- {{12076880, 19253146, 58323862, 21705509, 42096072, 16400683,
2678
- 49517369, 20654993, 3480664, 18371617}},
2679
- {{34747315, 5457596, 28548107, 7833186, 7303070, 21600887,
2680
- 42745799, 17632556, 33734809, 2771024}},
2681
- {{45719598, 421931, 26597266, 6860826, 22486084, 26817260,
2682
- 49971378, 29344205, 42556581, 15673396}},
2683
- },
2684
- {
2685
- {{46924223, 2338215, 19788685, 23933476, 63107598, 24813538,
2686
- 46837679, 4733253, 3727144, 20619984}},
2687
- {{6120100, 814863, 55314462, 32931715, 6812204, 17806661, 2019593,
2688
- 7975683, 31123697, 22595451}},
2689
- {{30069250, 22119100, 30434653, 2958439, 18399564, 32578143,
2690
- 12296868, 9204260, 50676426, 9648164}},
2691
- },
2692
- {
2693
- {{32705413, 32003455, 30705657, 7451065, 55303258, 9631812, 3305266,
2694
- 5248604, 41100532, 22176930}},
2695
- {{17219846, 2375039, 35537917, 27978816, 47649184, 9219902, 294711,
2696
- 15298639, 2662509, 17257359}},
2697
- {{65935918, 25995736, 62742093, 29266687, 45762450, 25120105,
2698
- 32087528, 32331655, 32247247, 19164571}},
2699
- },
2700
- {
2701
- {{14312609, 1221556, 17395390, 24854289, 62163122, 24869796,
2702
- 38911119, 23916614, 51081240, 20175586}},
2703
- {{65680039, 23875441, 57873182, 6549686, 59725795, 33085767, 23046501,
2704
- 9803137, 17597934, 2346211}},
2705
- {{18510781, 15337574, 26171504, 981392, 44867312, 7827555,
2706
- 43617730, 22231079, 3059832, 21771562}},
2707
- },
2708
- {
2709
- {{10141598, 6082907, 17829293, 31606789, 9830091, 13613136,
2710
- 41552228, 28009845, 33606651, 3592095}},
2711
- {{33114149, 17665080, 40583177, 20211034, 33076704, 8716171,
2712
- 1151462, 1521897, 66126199, 26716628}},
2713
- {{34169699, 29298616, 23947180, 33230254, 34035889, 21248794,
2714
- 50471177, 3891703, 26353178, 693168}},
2715
- },
2716
- {
2717
- {{30374239, 1595580, 50224825, 13186930, 4600344, 406904, 9585294,
2718
- 33153764, 31375463, 14369965}},
2719
- {{52738210, 25781902, 1510300, 6434173, 48324075, 27291703,
2720
- 32732229, 20445593, 17901440, 16011505}},
2721
- {{18171223, 21619806, 54608461, 15197121, 56070717, 18324396,
2722
- 47936623, 17508055, 8764034, 12309598}},
2723
- },
2724
- },
2725
- {
2726
- {
2727
- {{5975889, 28311244, 47649501, 23872684, 55567586, 14015781,
2728
- 43443107, 1228318, 17544096, 22960650}},
2729
- {{5811932, 31839139, 3442886, 31285122, 48741515, 25194890,
2730
- 49064820, 18144304, 61543482, 12348899}},
2731
- {{35709185, 11407554, 25755363, 6891399, 63851926, 14872273,
2732
- 42259511, 8141294, 56476330, 32968952}},
2733
- },
2734
- {
2735
- {{54433560, 694025, 62032719, 13300343, 14015258, 19103038,
2736
- 57410191, 22225381, 30944592, 1130208}},
2737
- {{8247747, 26843490, 40546482, 25845122, 52706924, 18905521,
2738
- 4652151, 2488540, 23550156, 33283200}},
2739
- {{17294297, 29765994, 7026747, 15626851, 22990044, 113481, 2267737,
2740
- 27646286, 66700045, 33416712}},
2741
- },
2742
- {
2743
- {{16091066, 17300506, 18599251, 7340678, 2137637, 32332775,
2744
- 63744702, 14550935, 3260525, 26388161}},
2745
- {{62198760, 20221544, 18550886, 10864893, 50649539, 26262835,
2746
- 44079994, 20349526, 54360141, 2701325}},
2747
- {{58534169, 16099414, 4629974, 17213908, 46322650, 27548999,
2748
- 57090500, 9276970, 11329923, 1862132}},
2749
- },
2750
- {
2751
- {{14763057, 17650824, 36190593, 3689866, 3511892, 10313526,
2752
- 45157776, 12219230, 58070901, 32614131}},
2753
- {{8894987, 30108338, 6150752, 3013931, 301220, 15693451, 35127648,
2754
- 30644714, 51670695, 11595569}},
2755
- {{15214943, 3537601, 40870142, 19495559, 4418656, 18323671,
2756
- 13947275, 10730794, 53619402, 29190761}},
2757
- },
2758
- {
2759
- {{64570558, 7682792, 32759013, 263109, 37124133, 25598979,
2760
- 44776739, 23365796, 977107, 699994}},
2761
- {{54642373, 4195083, 57897332, 550903, 51543527, 12917919,
2762
- 19118110, 33114591, 36574330, 19216518}},
2763
- {{31788442, 19046775, 4799988, 7372237, 8808585, 18806489, 9408236,
2764
- 23502657, 12493931, 28145115}},
2765
- },
2766
- {
2767
- {{41428258, 5260743, 47873055, 27269961, 63412921, 16566086,
2768
- 27218280, 2607121, 29375955, 6024730}},
2769
- {{842132, 30759739, 62345482, 24831616, 26332017, 21148791,
2770
- 11831879, 6985184, 57168503, 2854095}},
2771
- {{62261602, 25585100, 2516241, 27706719, 9695690, 26333246, 16512644,
2772
- 960770, 12121869, 16648078}},
2773
- },
2774
- {
2775
- {{51890212, 14667095, 53772635, 2013716, 30598287, 33090295,
2776
- 35603941, 25672367, 20237805, 2838411}},
2777
- {{47820798, 4453151, 15298546, 17376044, 22115042, 17581828,
2778
- 12544293, 20083975, 1068880, 21054527}},
2779
- {{57549981, 17035596, 33238497, 13506958, 30505848, 32439836,
2780
- 58621956, 30924378, 12521377, 4845654}},
2781
- },
2782
- {
2783
- {{38910324, 10744107, 64150484, 10199663, 7759311, 20465832,
2784
- 3409347, 32681032, 60626557, 20668561}},
2785
- {{43547042, 6230155, 46726851, 10655313, 43068279, 21933259,
2786
- 10477733, 32314216, 63995636, 13974497}},
2787
- {{12966261, 15550616, 35069916, 31939085, 21025979, 32924988,
2788
- 5642324, 7188737, 18895762, 12629579}},
2789
- },
2790
- },
2791
- {
2792
- {
2793
- {{14741879, 18607545, 22177207, 21833195, 1279740, 8058600,
2794
- 11758140, 789443, 32195181, 3895677}},
2795
- {{10758205, 15755439, 62598914, 9243697, 62229442, 6879878, 64904289,
2796
- 29988312, 58126794, 4429646}},
2797
- {{64654951, 15725972, 46672522, 23143759, 61304955, 22514211,
2798
- 59972993, 21911536, 18047435, 18272689}},
2799
- },
2800
- {
2801
- {{41935844, 22247266, 29759955, 11776784, 44846481, 17733976,
2802
- 10993113, 20703595, 49488162, 24145963}},
2803
- {{21987233, 700364, 42603816, 14972007, 59334599, 27836036,
2804
- 32155025, 2581431, 37149879, 8773374}},
2805
- {{41540495, 454462, 53896929, 16126714, 25240068, 8594567,
2806
- 20656846, 12017935, 59234475, 19634276}},
2807
- },
2808
- {
2809
- {{6028163, 6263078, 36097058, 22252721, 66289944, 2461771,
2810
- 35267690, 28086389, 65387075, 30777706}},
2811
- {{54829870, 16624276, 987579, 27631834, 32908202, 1248608, 7719845,
2812
- 29387734, 28408819, 6816612}},
2813
- {{56750770, 25316602, 19549650, 21385210, 22082622, 16147817,
2814
- 20613181, 13982702, 56769294, 5067942}},
2815
- },
2816
- {
2817
- {{36602878, 29732664, 12074680, 13582412, 47230892, 2443950,
2818
- 47389578, 12746131, 5331210, 23448488}},
2819
- {{30528792, 3601899, 65151774, 4619784, 39747042, 18118043,
2820
- 24180792, 20984038, 27679907, 31905504}},
2821
- {{9402385, 19597367, 32834042, 10838634, 40528714, 20317236,
2822
- 26653273, 24868867, 22611443, 20839026}},
2823
- },
2824
- {
2825
- {{22190590, 1118029, 22736441, 15130463, 36648172, 27563110,
2826
- 19189624, 28905490, 4854858, 6622139}},
2827
- {{58798126, 30600981, 58846284, 30166382, 56707132, 33282502,
2828
- 13424425, 29987205, 26404408, 13001963}},
2829
- {{35867026, 18138731, 64114613, 8939345, 11562230, 20713762,
2830
- 41044498, 21932711, 51703708, 11020692}},
2831
- },
2832
- {
2833
- {{1866042, 25604943, 59210214, 23253421, 12483314, 13477547,
2834
- 3175636, 21130269, 28761761, 1406734}},
2835
- {{66660290, 31776765, 13018550, 3194501, 57528444, 22392694,
2836
- 24760584, 29207344, 25577410, 20175752}},
2837
- {{42818486, 4759344, 66418211, 31701615, 2066746, 10693769,
2838
- 37513074, 9884935, 57739938, 4745409}},
2839
- },
2840
- {
2841
- {{57967561, 6049713, 47577803, 29213020, 35848065, 9944275,
2842
- 51646856, 22242579, 10931923, 21622501}},
2843
- {{50547351, 14112679, 59096219, 4817317, 59068400, 22139825,
2844
- 44255434, 10856640, 46638094, 13434653}},
2845
- {{22759470, 23480998, 50342599, 31683009, 13637441, 23386341,
2846
- 1765143, 20900106, 28445306, 28189722}},
2847
- },
2848
- {
2849
- {{29875063, 12493613, 2795536, 29768102, 1710619, 15181182,
2850
- 56913147, 24765756, 9074233, 1167180}},
2851
- {{40903181, 11014232, 57266213, 30918946, 40200743, 7532293,
2852
- 48391976, 24018933, 3843902, 9367684}},
2853
- {{56139269, 27150720, 9591133, 9582310, 11349256, 108879, 16235123,
2854
- 8601684, 66969667, 4242894}},
2855
- },
2856
- },
2857
- {
2858
- {
2859
- {{22092954, 20363309, 65066070, 21585919, 32186752, 22037044,
2860
- 60534522, 2470659, 39691498, 16625500}},
2861
- {{56051142, 3042015, 13770083, 24296510, 584235, 33009577, 59338006,
2862
- 2602724, 39757248, 14247412}},
2863
- {{6314156, 23289540, 34336361, 15957556, 56951134, 168749,
2864
- 58490057, 14290060, 27108877, 32373552}},
2865
- },
2866
- {
2867
- {{58522267, 26383465, 13241781, 10960156, 34117849, 19759835,
2868
- 33547975, 22495543, 39960412, 981873}},
2869
- {{22833421, 9293594, 34459416, 19935764, 57971897, 14756818,
2870
- 44180005, 19583651, 56629059, 17356469}},
2871
- {{59340277, 3326785, 38997067, 10783823, 19178761, 14905060,
2872
- 22680049, 13906969, 51175174, 3797898}},
2873
- },
2874
- {
2875
- {{21721337, 29341686, 54902740, 9310181, 63226625, 19901321,
2876
- 23740223, 30845200, 20491982, 25512280}},
2877
- {{9209251, 18419377, 53852306, 27386633, 66377847, 15289672,
2878
- 25947805, 15286587, 30997318, 26851369}},
2879
- {{7392013, 16618386, 23946583, 25514540, 53843699, 32020573,
2880
- 52911418, 31232855, 17649997, 33304352}},
2881
- },
2882
- {
2883
- {{57807776, 19360604, 30609525, 30504889, 41933794, 32270679,
2884
- 51867297, 24028707, 64875610, 7662145}},
2885
- {{49550191, 1763593, 33994528, 15908609, 37067994, 21380136,
2886
- 7335079, 25082233, 63934189, 3440182}},
2887
- {{47219164, 27577423, 42997570, 23865561, 10799742, 16982475,
2888
- 40449, 29122597, 4862399, 1133}},
2889
- },
2890
- {
2891
- {{34252636, 25680474, 61686474, 14860949, 50789833, 7956141,
2892
- 7258061, 311861, 36513873, 26175010}},
2893
- {{63335436, 31988495, 28985339, 7499440, 24445838, 9325937, 29727763,
2894
- 16527196, 18278453, 15405622}},
2895
- {{62726958, 8508651, 47210498, 29880007, 61124410, 15149969,
2896
- 53795266, 843522, 45233802, 13626196}},
2897
- },
2898
- {
2899
- {{2281448, 20067377, 56193445, 30944521, 1879357, 16164207,
2900
- 56324982, 3953791, 13340839, 15928663}},
2901
- {{31727126, 26374577, 48671360, 25270779, 2875792, 17164102,
2902
- 41838969, 26539605, 43656557, 5964752}},
2903
- {{4100401, 27594980, 49929526, 6017713, 48403027, 12227140,
2904
- 40424029, 11344143, 2538215, 25983677}},
2905
- },
2906
- {
2907
- {{57675240, 6123112, 11159803, 31397824, 30016279, 14966241,
2908
- 46633881, 1485420, 66479608, 17595569}},
2909
- {{40304287, 4260918, 11851389, 9658551, 35091757, 16367491,
2910
- 46903439, 20363143, 11659921, 22439314}},
2911
- {{26180377, 10015009, 36264640, 24973138, 5418196, 9480663, 2231568,
2912
- 23384352, 33100371, 32248261}},
2913
- },
2914
- {
2915
- {{15121094, 28352561, 56718958, 15427820, 39598927, 17561924,
2916
- 21670946, 4486675, 61177054, 19088051}},
2917
- {{16166467, 24070699, 56004733, 6023907, 35182066, 32189508,
2918
- 2340059, 17299464, 56373093, 23514607}},
2919
- {{28042865, 29997343, 54982337, 12259705, 63391366, 26608532,
2920
- 6766452, 24864833, 18036435, 5803270}},
2921
- },
2922
- },
2923
- {
2924
- {
2925
- {{66291264, 6763911, 11803561, 1585585, 10958447, 30883267, 23855390,
2926
- 4598332, 60949433, 19436993}},
2927
- {{36077558, 19298237, 17332028, 31170912, 31312681, 27587249,
2928
- 696308, 50292, 47013125, 11763583}},
2929
- {{66514282, 31040148, 34874710, 12643979, 12650761, 14811489, 665117,
2930
- 20940800, 47335652, 22840869}},
2931
- },
2932
- {
2933
- {{30464590, 22291560, 62981387, 20819953, 19835326, 26448819,
2934
- 42712688, 2075772, 50088707, 992470}},
2935
- {{18357166, 26559999, 7766381, 16342475, 37783946, 411173, 14578841,
2936
- 8080033, 55534529, 22952821}},
2937
- {{19598397, 10334610, 12555054, 2555664, 18821899, 23214652,
2938
- 21873262, 16014234, 26224780, 16452269}},
2939
- },
2940
- {
2941
- {{36884939, 5145195, 5944548, 16385966, 3976735, 2009897, 55731060,
2942
- 25936245, 46575034, 3698649}},
2943
- {{14187449, 3448569, 56472628, 22743496, 44444983, 30120835,
2944
- 7268409, 22663988, 27394300, 12015369}},
2945
- {{19695742, 16087646, 28032085, 12999827, 6817792, 11427614,
2946
- 20244189, 32241655, 53849736, 30151970}},
2947
- },
2948
- {
2949
- {{30860084, 12735208, 65220619, 28854697, 50133957, 2256939,
2950
- 58942851, 12298311, 58558340, 23160969}},
2951
- {{61389038, 22309106, 65198214, 15569034, 26642876, 25966672,
2952
- 61319509, 18435777, 62132699, 12651792}},
2953
- {{64260450, 9953420, 11531313, 28271553, 26895122, 20857343,
2954
- 53990043, 17036529, 9768697, 31021214}},
2955
- },
2956
- {
2957
- {{42389405, 1894650, 66821166, 28850346, 15348718, 25397902,
2958
- 32767512, 12765450, 4940095, 10678226}},
2959
- {{18860224, 15980149, 48121624, 31991861, 40875851, 22482575,
2960
- 59264981, 13944023, 42736516, 16582018}},
2961
- {{51604604, 4970267, 37215820, 4175592, 46115652, 31354675,
2962
- 55404809, 15444559, 56105103, 7989036}},
2963
- },
2964
- {
2965
- {{31490433, 5568061, 64696061, 2182382, 34772017, 4531685,
2966
- 35030595, 6200205, 47422751, 18754260}},
2967
- {{49800177, 17674491, 35586086, 33551600, 34221481, 16375548,
2968
- 8680158, 17182719, 28550067, 26697300}},
2969
- {{38981977, 27866340, 16837844, 31733974, 60258182, 12700015,
2970
- 37068883, 4364037, 1155602, 5988841}},
2971
- },
2972
- {
2973
- {{21890435, 20281525, 54484852, 12154348, 59276991, 15300495,
2974
- 23148983, 29083951, 24618406, 8283181}},
2975
- {{33972757, 23041680, 9975415, 6841041, 35549071, 16356535,
2976
- 3070187, 26528504, 1466168, 10740210}},
2977
- {{65599446, 18066246, 53605478, 22898515, 32799043, 909394,
2978
- 53169961, 27774712, 34944214, 18227391}},
2979
- },
2980
- {
2981
- {{3960804, 19286629, 39082773, 17636380, 47704005, 13146867,
2982
- 15567327, 951507, 63848543, 32980496}},
2983
- {{24740822, 5052253, 37014733, 8961360, 25877428, 6165135,
2984
- 42740684, 14397371, 59728495, 27410326}},
2985
- {{38220480, 3510802, 39005586, 32395953, 55870735, 22922977,
2986
- 51667400, 19101303, 65483377, 27059617}},
2987
- },
2988
- },
2989
- {
2990
- {
2991
- {{793280, 24323954, 8836301, 27318725, 39747955, 31184838, 33152842,
2992
- 28669181, 57202663, 32932579}},
2993
- {{5666214, 525582, 20782575, 25516013, 42570364, 14657739, 16099374,
2994
- 1468826, 60937436, 18367850}},
2995
- {{62249590, 29775088, 64191105, 26806412, 7778749, 11688288,
2996
- 36704511, 23683193, 65549940, 23690785}},
2997
- },
2998
- {
2999
- {{10896313, 25834728, 824274, 472601, 47648556, 3009586, 25248958,
3000
- 14783338, 36527388, 17796587}},
3001
- {{10566929, 12612572, 35164652, 11118702, 54475488, 12362878,
3002
- 21752402, 8822496, 24003793, 14264025}},
3003
- {{27713843, 26198459, 56100623, 9227529, 27050101, 2504721,
3004
- 23886875, 20436907, 13958494, 27821979}},
3005
- },
3006
- {
3007
- {{43627235, 4867225, 39861736, 3900520, 29838369, 25342141,
3008
- 35219464, 23512650, 7340520, 18144364}},
3009
- {{4646495, 25543308, 44342840, 22021777, 23184552, 8566613,
3010
- 31366726, 32173371, 52042079, 23179239}},
3011
- {{49838347, 12723031, 50115803, 14878793, 21619651, 27356856,
3012
- 27584816, 3093888, 58265170, 3849920}},
3013
- },
3014
- {
3015
- {{58043933, 2103171, 25561640, 18428694, 61869039, 9582957,
3016
- 32477045, 24536477, 5002293, 18004173}},
3017
- {{55051311, 22376525, 21115584, 20189277, 8808711, 21523724,
3018
- 16489529, 13378448, 41263148, 12741425}},
3019
- {{61162478, 10645102, 36197278, 15390283, 63821882, 26435754,
3020
- 24306471, 15852464, 28834118, 25908360}},
3021
- },
3022
- {
3023
- {{49773116, 24447374, 42577584, 9434952, 58636780, 32971069,
3024
- 54018092, 455840, 20461858, 5491305}},
3025
- {{13669229, 17458950, 54626889, 23351392, 52539093, 21661233,
3026
- 42112877, 11293806, 38520660, 24132599}},
3027
- {{28497909, 6272777, 34085870, 14470569, 8906179, 32328802,
3028
- 18504673, 19389266, 29867744, 24758489}},
3029
- },
3030
- {
3031
- {{50901822, 13517195, 39309234, 19856633, 24009063, 27180541,
3032
- 60741263, 20379039, 22853428, 29542421}},
3033
- {{24191359, 16712145, 53177067, 15217830, 14542237, 1646131,
3034
- 18603514, 22516545, 12876622, 31441985}},
3035
- {{17902668, 4518229, 66697162, 30725184, 26878216, 5258055, 54248111,
3036
- 608396, 16031844, 3723494}},
3037
- },
3038
- {
3039
- {{38476072, 12763727, 46662418, 7577503, 33001348, 20536687,
3040
- 17558841, 25681542, 23896953, 29240187}},
3041
- {{47103464, 21542479, 31520463, 605201, 2543521, 5991821, 64163800,
3042
- 7229063, 57189218, 24727572}},
3043
- {{28816026, 298879, 38943848, 17633493, 19000927, 31888542,
3044
- 54428030, 30605106, 49057085, 31471516}},
3045
- },
3046
- {
3047
- {{16000882, 33209536, 3493091, 22107234, 37604268, 20394642,
3048
- 12577739, 16041268, 47393624, 7847706}},
3049
- {{10151868, 10572098, 27312476, 7922682, 14825339, 4723128,
3050
- 34252933, 27035413, 57088296, 3852847}},
3051
- {{55678375, 15697595, 45987307, 29133784, 5386313, 15063598,
3052
- 16514493, 17622322, 29330898, 18478208}},
3053
- },
3054
- },
3055
- {
3056
- {
3057
- {{41609129, 29175637, 51885955, 26653220, 16615730, 2051784,
3058
- 3303702, 15490, 39560068, 12314390}},
3059
- {{15683501, 27551389, 18109119, 23573784, 15337967, 27556609,
3060
- 50391428, 15921865, 16103996, 29823217}},
3061
- {{43939021, 22773182, 13588191, 31925625, 63310306, 32479502,
3062
- 47835256, 5402698, 37293151, 23713330}},
3063
- },
3064
- {
3065
- {{23190676, 2384583, 34394524, 3462153, 37205209, 32025299,
3066
- 55842007, 8911516, 41903005, 2739712}},
3067
- {{21374101, 30000182, 33584214, 9874410, 15377179, 11831242,
3068
- 33578960, 6134906, 4931255, 11987849}},
3069
- {{67101132, 30575573, 50885377, 7277596, 105524, 33232381, 35628324,
3070
- 13861387, 37032554, 10117929}},
3071
- },
3072
- {
3073
- {{37607694, 22809559, 40945095, 13051538, 41483300, 5089642,
3074
- 60783361, 6704078, 12890019, 15728940}},
3075
- {{45136504, 21783052, 66157804, 29135591, 14704839, 2695116, 903376,
3076
- 23126293, 12885166, 8311031}},
3077
- {{49592363, 5352193, 10384213, 19742774, 7506450, 13453191,
3078
- 26423267, 4384730, 1888765, 28119028}},
3079
- },
3080
- {
3081
- {{41291507, 30447119, 53614264, 30371925, 30896458, 19632703,
3082
- 34857219, 20846562, 47644429, 30214188}},
3083
- {{43500868, 30888657, 66582772, 4651135, 5765089, 4618330, 6092245,
3084
- 14845197, 17151279, 23700316}},
3085
- {{42278406, 20820711, 51942885, 10367249, 37577956, 33289075,
3086
- 22825804, 26467153, 50242379, 16176524}},
3087
- },
3088
- {
3089
- {{43525589, 6564960, 20063689, 3798228, 62368686, 7359224, 2006182,
3090
- 23191006, 38362610, 23356922}},
3091
- {{56482264, 29068029, 53788301, 28429114, 3432135, 27161203,
3092
- 23632036, 31613822, 32808309, 1099883}},
3093
- {{15030958, 5768825, 39657628, 30667132, 60681485, 18193060,
3094
- 51830967, 26745081, 2051440, 18328567}},
3095
- },
3096
- {
3097
- {{63746541, 26315059, 7517889, 9824992, 23555850, 295369, 5148398,
3098
- 19400244, 44422509, 16633659}},
3099
- {{4577067, 16802144, 13249840, 18250104, 19958762, 19017158,
3100
- 18559669, 22794883, 8402477, 23690159}},
3101
- {{38702534, 32502850, 40318708, 32646733, 49896449, 22523642,
3102
- 9453450, 18574360, 17983009, 9967138}},
3103
- },
3104
- {
3105
- {{41346370, 6524721, 26585488, 9969270, 24709298, 1220360, 65430874,
3106
- 7806336, 17507396, 3651560}},
3107
- {{56688388, 29436320, 14584638, 15971087, 51340543, 8861009,
3108
- 26556809, 27979875, 48555541, 22197296}},
3109
- {{2839082, 14284142, 4029895, 3472686, 14402957, 12689363, 40466743,
3110
- 8459446, 61503401, 25932490}},
3111
- },
3112
- {
3113
- {{62269556, 30018987, 9744960, 2871048, 25113978, 3187018, 41998051,
3114
- 32705365, 17258083, 25576693}},
3115
- {{18164541, 22959256, 49953981, 32012014, 19237077, 23809137,
3116
- 23357532, 18337424, 26908269, 12150756}},
3117
- {{36843994, 25906566, 5112248, 26517760, 65609056, 26580174, 43167,
3118
- 28016731, 34806789, 16215818}},
3119
- },
3120
- },
3121
- {
3122
- {
3123
- {{60209940, 9824393, 54804085, 29153342, 35711722, 27277596,
3124
- 32574488, 12532905, 59605792, 24879084}},
3125
- {{39765323, 17038963, 39957339, 22831480, 946345, 16291093,
3126
- 254968, 7168080, 21676107, 31611404}},
3127
- {{21260942, 25129680, 50276977, 21633609, 43430902, 3968120,
3128
- 63456915, 27338965, 63552672, 25641356}},
3129
- },
3130
- {
3131
- {{16544735, 13250366, 50304436, 15546241, 62525861, 12757257,
3132
- 64646556, 24874095, 48201831, 23891632}},
3133
- {{64693606, 17976703, 18312302, 4964443, 51836334, 20900867,
3134
- 26820650, 16690659, 25459437, 28989823}},
3135
- {{41964155, 11425019, 28423002, 22533875, 60963942, 17728207,
3136
- 9142794, 31162830, 60676445, 31909614}},
3137
- },
3138
- {
3139
- {{44004212, 6253475, 16964147, 29785560, 41994891, 21257994,
3140
- 39651638, 17209773, 6335691, 7249989}},
3141
- {{36775618, 13979674, 7503222, 21186118, 55152142, 28932738,
3142
- 36836594, 2682241, 25993170, 21075909}},
3143
- {{4364628, 5930691, 32304656, 23509878, 59054082, 15091130,
3144
- 22857016, 22955477, 31820367, 15075278}},
3145
- },
3146
- {
3147
- {{31879134, 24635739, 17258760, 90626, 59067028, 28636722, 24162787,
3148
- 23903546, 49138625, 12833044}},
3149
- {{19073683, 14851414, 42705695, 21694263, 7625277, 11091125,
3150
- 47489674, 2074448, 57694925, 14905376}},
3151
- {{24483648, 21618865, 64589997, 22007013, 65555733, 15355505,
3152
- 41826784, 9253128, 27628530, 25998952}},
3153
- },
3154
- {
3155
- {{17597607, 8340603, 19355617, 552187, 26198470, 30377849, 4593323,
3156
- 24396850, 52997988, 15297015}},
3157
- {{510886, 14337390, 35323607, 16638631, 6328095, 2713355, 46891447,
3158
- 21690211, 8683220, 2921426}},
3159
- {{18606791, 11874196, 27155355, 28272950, 43077121, 6265445,
3160
- 41930624, 32275507, 4674689, 13890525}},
3161
- },
3162
- {
3163
- {{13609624, 13069022, 39736503, 20498523, 24360585, 9592974,
3164
- 14977157, 9835105, 4389687, 288396}},
3165
- {{9922506, 33035038, 13613106, 5883594, 48350519, 33120168, 54804801,
3166
- 8317627, 23388070, 16052080}},
3167
- {{12719997, 11937594, 35138804, 28525742, 26900119, 8561328,
3168
- 46953177, 21921452, 52354592, 22741539}},
3169
- },
3170
- {
3171
- {{15961858, 14150409, 26716931, 32888600, 44314535, 13603568,
3172
- 11829573, 7467844, 38286736, 929274}},
3173
- {{11038231, 21972036, 39798381, 26237869, 56610336, 17246600,
3174
- 43629330, 24182562, 45715720, 2465073}},
3175
- {{20017144, 29231206, 27915241, 1529148, 12396362, 15675764,
3176
- 13817261, 23896366, 2463390, 28932292}},
3177
- },
3178
- {
3179
- {{50749986, 20890520, 55043680, 4996453, 65852442, 1073571,
3180
- 9583558, 12851107, 4003896, 12673717}},
3181
- {{65377275, 18398561, 63845933, 16143081, 19294135, 13385325,
3182
- 14741514, 24450706, 7903885, 2348101}},
3183
- {{24536016, 17039225, 12715591, 29692277, 1511292, 10047386,
3184
- 63266518, 26425272, 38731325, 10048126}},
3185
- },
3186
- },
3187
- {
3188
- {
3189
- {{54486638, 27349611, 30718824, 2591312, 56491836, 12192839,
3190
- 18873298, 26257342, 34811107, 15221631}},
3191
- {{40630742, 22450567, 11546243, 31701949, 9180879, 7656409,
3192
- 45764914, 2095754, 29769758, 6593415}},
3193
- {{35114656, 30646970, 4176911, 3264766, 12538965, 32686321, 26312344,
3194
- 27435754, 30958053, 8292160}},
3195
- },
3196
- {
3197
- {{31429803, 19595316, 29173531, 15632448, 12174511, 30794338,
3198
- 32808830, 3977186, 26143136, 30405556}},
3199
- {{22648882, 1402143, 44308880, 13746058, 7936347, 365344, 58440231,
3200
- 31879998, 63350620, 31249806}},
3201
- {{51616947, 8012312, 64594134, 20851969, 43143017, 23300402,
3202
- 65496150, 32018862, 50444388, 8194477}},
3203
- },
3204
- {
3205
- {{27338066, 26047012, 59694639, 10140404, 48082437, 26964542,
3206
- 27277190, 8855376, 28572286, 3005164}},
3207
- {{26287105, 4821776, 25476601, 29408529, 63344350, 17765447,
3208
- 49100281, 1182478, 41014043, 20474836}},
3209
- {{59937691, 3178079, 23970071, 6201893, 49913287, 29065239,
3210
- 45232588, 19571804, 32208682, 32356184}},
3211
- },
3212
- {
3213
- {{50451143, 2817642, 56822502, 14811297, 6024667, 13349505,
3214
- 39793360, 23056589, 39436278, 22014573}},
3215
- {{15941010, 24148500, 45741813, 8062054, 31876073, 33315803,
3216
- 51830470, 32110002, 15397330, 29424239}},
3217
- {{8934485, 20068965, 43822466, 20131190, 34662773, 14047985,
3218
- 31170398, 32113411, 39603297, 15087183}},
3219
- },
3220
- {
3221
- {{48751602, 31397940, 24524912, 16876564, 15520426, 27193656,
3222
- 51606457, 11461895, 16788528, 27685490}},
3223
- {{65161459, 16013772, 21750665, 3714552, 49707082, 17498998,
3224
- 63338576, 23231111, 31322513, 21938797}},
3225
- {{21426636, 27904214, 53460576, 28206894, 38296674, 28633461,
3226
- 48833472, 18933017, 13040861, 21441484}},
3227
- },
3228
- {
3229
- {{11293895, 12478086, 39972463, 15083749, 37801443, 14748871,
3230
- 14555558, 20137329, 1613710, 4896935}},
3231
- {{41213962, 15323293, 58619073, 25496531, 25967125, 20128972,
3232
- 2825959, 28657387, 43137087, 22287016}},
3233
- {{51184079, 28324551, 49665331, 6410663, 3622847, 10243618,
3234
- 20615400, 12405433, 43355834, 25118015}},
3235
- },
3236
- {
3237
- {{60017550, 12556207, 46917512, 9025186, 50036385, 4333800,
3238
- 4378436, 2432030, 23097949, 32988414}},
3239
- {{4565804, 17528778, 20084411, 25711615, 1724998, 189254, 24767264,
3240
- 10103221, 48596551, 2424777}},
3241
- {{366633, 21577626, 8173089, 26664313, 30788633, 5745705, 59940186,
3242
- 1344108, 63466311, 12412658}},
3243
- },
3244
- {
3245
- {{43107073, 7690285, 14929416, 33386175, 34898028, 20141445,
3246
- 24162696, 18227928, 63967362, 11179384}},
3247
- {{18289503, 18829478, 8056944, 16430056, 45379140, 7842513,
3248
- 61107423, 32067534, 48424218, 22110928}},
3249
- {{476239, 6601091, 60956074, 23831056, 17503544, 28690532, 27672958,
3250
- 13403813, 11052904, 5219329}},
3251
- },
3252
- },
3253
- {
3254
- {
3255
- {{20678527, 25178694, 34436965, 8849122, 62099106, 14574751,
3256
- 31186971, 29580702, 9014761, 24975376}},
3257
- {{53464795, 23204192, 51146355, 5075807, 65594203, 22019831,
3258
- 34006363, 9160279, 8473550, 30297594}},
3259
- {{24900749, 14435722, 17209120, 18261891, 44516588, 9878982,
3260
- 59419555, 17218610, 42540382, 11788947}},
3261
- },
3262
- {
3263
- {{63990690, 22159237, 53306774, 14797440, 9652448, 26708528,
3264
- 47071426, 10410732, 42540394, 32095740}},
3265
- {{51449703, 16736705, 44641714, 10215877, 58011687, 7563910,
3266
- 11871841, 21049238, 48595538, 8464117}},
3267
- {{43708233, 8348506, 52522913, 32692717, 63158658, 27181012,
3268
- 14325288, 8628612, 33313881, 25183915}},
3269
- },
3270
- {
3271
- {{46921872, 28586496, 22367355, 5271547, 66011747, 28765593,
3272
- 42303196, 23317577, 58168128, 27736162}},
3273
- {{60160060, 31759219, 34483180, 17533252, 32635413, 26180187,
3274
- 15989196, 20716244, 28358191, 29300528}},
3275
- {{43547083, 30755372, 34757181, 31892468, 57961144, 10429266,
3276
- 50471180, 4072015, 61757200, 5596588}},
3277
- },
3278
- {
3279
- {{38872266, 30164383, 12312895, 6213178, 3117142, 16078565,
3280
- 29266239, 2557221, 1768301, 15373193}},
3281
- {{59865506, 30307471, 62515396, 26001078, 66980936, 32642186, 66017961,
3282
- 29049440, 42448372, 3442909}},
3283
- {{36898293, 5124042, 14181784, 8197961, 18964734, 21615339,
3284
- 22597930, 7176455, 48523386, 13365929}},
3285
- },
3286
- {
3287
- {{59231455, 32054473, 8324672, 4690079, 6261860, 890446, 24538107,
3288
- 24984246, 57419264, 30522764}},
3289
- {{25008885, 22782833, 62803832, 23916421, 16265035, 15721635,
3290
- 683793, 21730648, 15723478, 18390951}},
3291
- {{57448220, 12374378, 40101865, 26528283, 59384749, 21239917,
3292
- 11879681, 5400171, 519526, 32318556}},
3293
- },
3294
- {
3295
- {{22258397, 17222199, 59239046, 14613015, 44588609, 30603508,
3296
- 46754982, 7315966, 16648397, 7605640}},
3297
- {{59027556, 25089834, 58885552, 9719709, 19259459, 18206220,
3298
- 23994941, 28272877, 57640015, 4763277}},
3299
- {{45409620, 9220968, 51378240, 1084136, 41632757, 30702041,
3300
- 31088446, 25789909, 55752334, 728111}},
3301
- },
3302
- {
3303
- {{26047201, 21802961, 60208540, 17032633, 24092067, 9158119,
3304
- 62835319, 20998873, 37743427, 28056159}},
3305
- {{17510331, 33231575, 5854288, 8403524, 17133918, 30441820, 38997856,
3306
- 12327944, 10750447, 10014012}},
3307
- {{56796096, 3936951, 9156313, 24656749, 16498691, 32559785,
3308
- 39627812, 32887699, 3424690, 7540221}},
3309
- },
3310
- {
3311
- {{30322361, 26590322, 11361004, 29411115, 7433303, 4989748, 60037442,
3312
- 17237212, 57864598, 15258045}},
3313
- {{13054543, 30774935, 19155473, 469045, 54626067, 4566041, 5631406,
3314
- 2711395, 1062915, 28418087}},
3315
- {{47868616, 22299832, 37599834, 26054466, 61273100, 13005410,
3316
- 61042375, 12194496, 32960380, 1459310}},
3317
- },
3318
- },
3319
- {
3320
- {
3321
- {{19852015, 7027924, 23669353, 10020366, 8586503, 26896525, 394196,
3322
- 27452547, 18638002, 22379495}},
3323
- {{31395515, 15098109, 26581030, 8030562, 50580950, 28547297,
3324
- 9012485, 25970078, 60465776, 28111795}},
3325
- {{57916680, 31207054, 65111764, 4529533, 25766844, 607986, 67095642,
3326
- 9677542, 34813975, 27098423}},
3327
- },
3328
- {
3329
- {{64664349, 33404494, 29348901, 8186665, 1873760, 12489863, 36174285,
3330
- 25714739, 59256019, 25416002}},
3331
- {{51872508, 18120922, 7766469, 746860, 26346930, 23332670,
3332
- 39775412, 10754587, 57677388, 5203575}},
3333
- {{31834314, 14135496, 66338857, 5159117, 20917671, 16786336,
3334
- 59640890, 26216907, 31809242, 7347066}},
3335
- },
3336
- {
3337
- {{57502122, 21680191, 20414458, 13033986, 13716524, 21862551,
3338
- 19797969, 21343177, 15192875, 31466942}},
3339
- {{54445282, 31372712, 1168161, 29749623, 26747876, 19416341,
3340
- 10609329, 12694420, 33473243, 20172328}},
3341
- {{33184999, 11180355, 15832085, 22169002, 65475192, 225883,
3342
- 15089336, 22530529, 60973201, 14480052}},
3343
- },
3344
- {
3345
- {{31308717, 27934434, 31030839, 31657333, 15674546, 26971549,
3346
- 5496207, 13685227, 27595050, 8737275}},
3347
- {{46790012, 18404192, 10933842, 17376410, 8335351, 26008410,
3348
- 36100512, 20943827, 26498113, 66511}},
3349
- {{22644435, 24792703, 50437087, 4884561, 64003250, 19995065,
3350
- 30540765, 29267685, 53781076, 26039336}},
3351
- },
3352
- {
3353
- {{39091017, 9834844, 18617207, 30873120, 63706907, 20246925,
3354
- 8205539, 13585437, 49981399, 15115438}},
3355
- {{23711543, 32881517, 31206560, 25191721, 6164646, 23844445,
3356
- 33572981, 32128335, 8236920, 16492939}},
3357
- {{43198286, 20038905, 40809380, 29050590, 25005589, 25867162,
3358
- 19574901, 10071562, 6708380, 27332008}},
3359
- },
3360
- {
3361
- {{2101372, 28624378, 19702730, 2367575, 51681697, 1047674, 5301017,
3362
- 9328700, 29955601, 21876122}},
3363
- {{3096359, 9271816, 45488000, 18032587, 52260867, 25961494,
3364
- 41216721, 20918836, 57191288, 6216607}},
3365
- {{34493015, 338662, 41913253, 2510421, 37895298, 19734218,
3366
- 24822829, 27407865, 40341383, 7525078}},
3367
- },
3368
- {
3369
- {{44042215, 19568808, 16133486, 25658254, 63719298, 778787,
3370
- 66198528, 30771936, 47722230, 11994100}},
3371
- {{21691500, 19929806, 66467532, 19187410, 3285880, 30070836,
3372
- 42044197, 9718257, 59631427, 13381417}},
3373
- {{18445390, 29352196, 14979845, 11622458, 65381754, 29971451,
3374
- 23111647, 27179185, 28535281, 15779576}},
3375
- },
3376
- {
3377
- {{30098034, 3089662, 57874477, 16662134, 45801924, 11308410,
3378
- 53040410, 12021729, 9955285, 17251076}},
3379
- {{9734894, 18977602, 59635230, 24415696, 2060391, 11313496,
3380
- 48682835, 9924398, 20194861, 13380996}},
3381
- {{40730762, 25589224, 44941042, 15789296, 49053522, 27385639,
3382
- 65123949, 15707770, 26342023, 10146099}},
3383
- },
3384
- },
3385
- {
3386
- {
3387
- {{41091971, 33334488, 21339190, 33513044, 19745255, 30675732,
3388
- 37471583, 2227039, 21612326, 33008704}},
3389
- {{54031477, 1184227, 23562814, 27583990, 46757619, 27205717,
3390
- 25764460, 12243797, 46252298, 11649657}},
3391
- {{57077370, 11262625, 27384172, 2271902, 26947504, 17556661, 39943,
3392
- 6114064, 33514190, 2333242}},
3393
- },
3394
- {
3395
- {{45675257, 21132610, 8119781, 7219913, 45278342, 24538297,
3396
- 60429113, 20883793, 24350577, 20104431}},
3397
- {{62992557, 22282898, 43222677, 4843614, 37020525, 690622,
3398
- 35572776, 23147595, 8317859, 12352766}},
3399
- {{18200138, 19078521, 34021104, 30857812, 43406342, 24451920,
3400
- 43556767, 31266881, 20712162, 6719373}},
3401
- },
3402
- {
3403
- {{26656189, 6075253, 59250308, 1886071, 38764821, 4262325, 11117530,
3404
- 29791222, 26224234, 30256974}},
3405
- {{49939907, 18700334, 63713187, 17184554, 47154818, 14050419,
3406
- 21728352, 9493610, 18620611, 17125804}},
3407
- {{53785524, 13325348, 11432106, 5964811, 18609221, 6062965,
3408
- 61839393, 23828875, 36407290, 17074774}},
3409
- },
3410
- {
3411
- {{43248326, 22321272, 26961356, 1640861, 34695752, 16816491,
3412
- 12248508, 28313793, 13735341, 1934062}},
3413
- {{25089769, 6742589, 17081145, 20148166, 21909292, 17486451,
3414
- 51972569, 29789085, 45830866, 5473615}},
3415
- {{31883658, 25593331, 1083431, 21982029, 22828470, 13290673,
3416
- 59983779, 12469655, 29111212, 28103418}},
3417
- },
3418
- {
3419
- {{24244947, 18504025, 40845887, 2791539, 52111265, 16666677,
3420
- 24367466, 6388839, 56813277, 452382}},
3421
- {{41468082, 30136590, 5217915, 16224624, 19987036, 29472163,
3422
- 42872612, 27639183, 15766061, 8407814}},
3423
- {{46701865, 13990230, 15495425, 16395525, 5377168, 15166495,
3424
- 58191841, 29165478, 59040954, 2276717}},
3425
- },
3426
- {
3427
- {{30157899, 12924066, 49396814, 9245752, 19895028, 3368142,
3428
- 43281277, 5096218, 22740376, 26251015}},
3429
- {{2041139, 19298082, 7783686, 13876377, 41161879, 20201972,
3430
- 24051123, 13742383, 51471265, 13295221}},
3431
- {{33338218, 25048699, 12532112, 7977527, 9106186, 31839181,
3432
- 49388668, 28941459, 62657506, 18884987}},
3433
- },
3434
- {
3435
- {{47063583, 5454096, 52762316, 6447145, 28862071, 1883651,
3436
- 64639598, 29412551, 7770568, 9620597}},
3437
- {{23208049, 7979712, 33071466, 8149229, 1758231, 22719437, 30945527,
3438
- 31860109, 33606523, 18786461}},
3439
- {{1439939, 17283952, 66028874, 32760649, 4625401, 10647766, 62065063,
3440
- 1220117, 30494170, 22113633}},
3441
- },
3442
- {
3443
- {{62071265, 20526136, 64138304, 30492664, 15640973, 26852766,
3444
- 40369837, 926049, 65424525, 20220784}},
3445
- {{13908495, 30005160, 30919927, 27280607, 45587000, 7989038,
3446
- 9021034, 9078865, 3353509, 4033511}},
3447
- {{37445433, 18440821, 32259990, 33209950, 24295848, 20642309,
3448
- 23161162, 8839127, 27485041, 7356032}},
3449
- },
3450
- },
3451
- {
3452
- {
3453
- {{9661008, 705443, 11980065, 28184278, 65480320, 14661172, 60762722,
3454
- 2625014, 28431036, 16782598}},
3455
- {{43269631, 25243016, 41163352, 7480957, 49427195, 25200248,
3456
- 44562891, 14150564, 15970762, 4099461}},
3457
- {{29262576, 16756590, 26350592, 24760869, 8529670, 22346382,
3458
- 13617292, 23617289, 11465738, 8317062}},
3459
- },
3460
- {
3461
- {{41615764, 26591503, 32500199, 24135381, 44070139, 31252209,
3462
- 14898636, 3848455, 20969334, 28396916}},
3463
- {{46724414, 19206718, 48772458, 13884721, 34069410, 2842113,
3464
- 45498038, 29904543, 11177094, 14989547}},
3465
- {{42612143, 21838415, 16959895, 2278463, 12066309, 10137771,
3466
- 13515641, 2581286, 38621356, 9930239}},
3467
- },
3468
- {
3469
- {{49357223, 31456605, 16544299, 20545132, 51194056, 18605350,
3470
- 18345766, 20150679, 16291480, 28240394}},
3471
- {{33879670, 2553287, 32678213, 9875984, 8534129, 6889387, 57432090,
3472
- 6957616, 4368891, 9788741}},
3473
- {{16660737, 7281060, 56278106, 12911819, 20108584, 25452756,
3474
- 45386327, 24941283, 16250551, 22443329}},
3475
- },
3476
- {
3477
- {{47343357, 2390525, 50557833, 14161979, 1905286, 6414907, 4689584,
3478
- 10604807, 36918461, 4782746}},
3479
- {{65754325, 14736940, 59741422, 20261545, 7710541, 19398842,
3480
- 57127292, 4383044, 22546403, 437323}},
3481
- {{31665558, 21373968, 50922033, 1491338, 48740239, 3294681,
3482
- 27343084, 2786261, 36475274, 19457415}},
3483
- },
3484
- {
3485
- {{52641566, 32870716, 33734756, 7448551, 19294360, 14334329,
3486
- 47418233, 2355318, 47824193, 27440058}},
3487
- {{15121312, 17758270, 6377019, 27523071, 56310752, 20596586,
3488
- 18952176, 15496498, 37728731, 11754227}},
3489
- {{64471568, 20071356, 8488726, 19250536, 12728760, 31931939,
3490
- 7141595, 11724556, 22761615, 23420291}},
3491
- },
3492
- {
3493
- {{16918416, 11729663, 49025285, 3022986, 36093132, 20214772,
3494
- 38367678, 21327038, 32851221, 11717399}},
3495
- {{11166615, 7338049, 60386341, 4531519, 37640192, 26252376,
3496
- 31474878, 3483633, 65915689, 29523600}},
3497
- {{66923210, 9921304, 31456609, 20017994, 55095045, 13348922,
3498
- 33142652, 6546660, 47123585, 29606055}},
3499
- },
3500
- {
3501
- {{34648249, 11266711, 55911757, 25655328, 31703693, 3855903,
3502
- 58571733, 20721383, 36336829, 18068118}},
3503
- {{49102387, 12709067, 3991746, 27075244, 45617340, 23004006,
3504
- 35973516, 17504552, 10928916, 3011958}},
3505
- {{60151107, 17960094, 31696058, 334240, 29576716, 14796075,
3506
- 36277808, 20749251, 18008030, 10258577}},
3507
- },
3508
- {
3509
- {{44660220, 15655568, 7018479, 29144429, 36794597, 32352840,
3510
- 65255398, 1367119, 25127874, 6671743}},
3511
- {{29701166, 19180498, 56230743, 9279287, 67091296, 13127209,
3512
- 21382910, 11042292, 25838796, 4642684}},
3513
- {{46678630, 14955536, 42982517, 8124618, 61739576, 27563961,
3514
- 30468146, 19653792, 18423288, 4177476}},
3515
- },
3516
- },
3517
- };
3518
-
3519
1868
  static uint8_t negative(signed char b) {
3520
1869
  uint32_t x = b;
3521
1870
  x >>= 31; // 1: yes; 0: no
@@ -3698,73 +2047,6 @@ static void slide(signed char *r, const uint8_t *a) {
3698
2047
  }
3699
2048
  }
3700
2049
 
3701
- static const ge_precomp Bi[8] = {
3702
- {
3703
- {{25967493, 19198397, 29566455, 3660896, 54414519, 4014786, 27544626,
3704
- 21800161, 61029707, 2047604}},
3705
- {{54563134, 934261, 64385954, 3049989, 66381436, 9406985, 12720692,
3706
- 5043384, 19500929, 18085054}},
3707
- {{58370664, 4489569, 9688441, 18769238, 10184608, 21191052, 29287918,
3708
- 11864899, 42594502, 29115885}},
3709
- },
3710
- {
3711
- {{15636272, 23865875, 24204772, 25642034, 616976, 16869170, 27787599,
3712
- 18782243, 28944399, 32004408}},
3713
- {{16568933, 4717097, 55552716, 32452109, 15682895, 21747389, 16354576,
3714
- 21778470, 7689661, 11199574}},
3715
- {{30464137, 27578307, 55329429, 17883566, 23220364, 15915852, 7512774,
3716
- 10017326, 49359771, 23634074}},
3717
- },
3718
- {
3719
- {{10861363, 11473154, 27284546, 1981175, 37044515, 12577860, 32867885,
3720
- 14515107, 51670560, 10819379}},
3721
- {{4708026, 6336745, 20377586, 9066809, 55836755, 6594695, 41455196,
3722
- 12483687, 54440373, 5581305}},
3723
- {{19563141, 16186464, 37722007, 4097518, 10237984, 29206317, 28542349,
3724
- 13850243, 43430843, 17738489}},
3725
- },
3726
- {
3727
- {{5153727, 9909285, 1723747, 30776558, 30523604, 5516873, 19480852,
3728
- 5230134, 43156425, 18378665}},
3729
- {{36839857, 30090922, 7665485, 10083793, 28475525, 1649722, 20654025,
3730
- 16520125, 30598449, 7715701}},
3731
- {{28881826, 14381568, 9657904, 3680757, 46927229, 7843315, 35708204,
3732
- 1370707, 29794553, 32145132}},
3733
- },
3734
- {
3735
- {{44589871, 26862249, 14201701, 24808930, 43598457, 8844725, 18474211,
3736
- 32192982, 54046167, 13821876}},
3737
- {{60653668, 25714560, 3374701, 28813570, 40010246, 22982724, 31655027,
3738
- 26342105, 18853321, 19333481}},
3739
- {{4566811, 20590564, 38133974, 21313742, 59506191, 30723862, 58594505,
3740
- 23123294, 2207752, 30344648}},
3741
- },
3742
- {
3743
- {{41954014, 29368610, 29681143, 7868801, 60254203, 24130566, 54671499,
3744
- 32891431, 35997400, 17421995}},
3745
- {{25576264, 30851218, 7349803, 21739588, 16472781, 9300885, 3844789,
3746
- 15725684, 171356, 6466918}},
3747
- {{23103977, 13316479, 9739013, 17404951, 817874, 18515490, 8965338,
3748
- 19466374, 36393951, 16193876}},
3749
- },
3750
- {
3751
- {{33587053, 3180712, 64714734, 14003686, 50205390, 17283591, 17238397,
3752
- 4729455, 49034351, 9256799}},
3753
- {{41926547, 29380300, 32336397, 5036987, 45872047, 11360616, 22616405,
3754
- 9761698, 47281666, 630304}},
3755
- {{53388152, 2639452, 42871404, 26147950, 9494426, 27780403, 60554312,
3756
- 17593437, 64659607, 19263131}},
3757
- },
3758
- {
3759
- {{63957664, 28508356, 9282713, 6866145, 35201802, 32691408, 48168288,
3760
- 15033783, 25105118, 25659556}},
3761
- {{42782475, 15950225, 35307649, 18961608, 55446126, 28463506,
3762
- 1573891, 30928545, 2198789, 17749813}},
3763
- {{64009494, 10324966, 64867251, 7453182, 61661885, 30818928, 53296841,
3764
- 17317989, 34647629, 21263748}},
3765
- },
3766
- };
3767
-
3768
2050
  // r = a * A + b * B
3769
2051
  // where a = a[0]+256*a[1]+...+256^31 a[31].
3770
2052
  // and b = b[0]+256*b[1]+...+256^31 b[31].
@@ -3848,7 +2130,7 @@ static void ge_double_scalarmult_vartime(ge_p2 *r, const uint8_t *a,
3848
2130
  // s[0]+256*s[1]+...+256^31*s[31] = s mod l
3849
2131
  // where l = 2^252 + 27742317777372353535851937790883648493.
3850
2132
  // Overwrites s in place.
3851
- void x25519_sc_reduce(uint8_t *s) {
2133
+ void x25519_sc_reduce(uint8_t s[64]) {
3852
2134
  int64_t s0 = 2097151 & load_3(s);
3853
2135
  int64_t s1 = 2097151 & (load_4(s + 2) >> 5);
3854
2136
  int64_t s2 = 2097151 & (load_3(s + 5) >> 2);
@@ -4676,8 +2958,8 @@ void ED25519_keypair(uint8_t out_public_key[32], uint8_t out_private_key[64]) {
4676
2958
  ED25519_keypair_from_seed(out_public_key, out_private_key, seed);
4677
2959
  }
4678
2960
 
4679
- int ED25519_sign(uint8_t *out_sig, const uint8_t *message, size_t message_len,
4680
- const uint8_t private_key[64]) {
2961
+ int ED25519_sign(uint8_t out_sig[64], const uint8_t *message,
2962
+ size_t message_len, const uint8_t private_key[64]) {
4681
2963
  uint8_t az[SHA512_DIGEST_LENGTH];
4682
2964
  SHA512(private_key, 32, az);
4683
2965
 
@@ -4728,8 +3010,31 @@ int ED25519_verify(const uint8_t *message, size_t message_len,
4728
3010
  OPENSSL_memcpy(pkcopy, public_key, 32);
4729
3011
  uint8_t rcopy[32];
4730
3012
  OPENSSL_memcpy(rcopy, signature, 32);
4731
- uint8_t scopy[32];
4732
- OPENSSL_memcpy(scopy, signature + 32, 32);
3013
+ union {
3014
+ uint64_t u64[4];
3015
+ uint8_t u8[32];
3016
+ } scopy;
3017
+ OPENSSL_memcpy(&scopy.u8[0], signature + 32, 32);
3018
+
3019
+ // https://tools.ietf.org/html/rfc8032#section-5.1.7 requires that s be in
3020
+ // the range [0, order) in order to prevent signature malleability.
3021
+
3022
+ // kOrder is the order of Curve25519 in little-endian form.
3023
+ static const uint64_t kOrder[4] = {
3024
+ UINT64_C(0x5812631a5cf5d3ed),
3025
+ UINT64_C(0x14def9dea2f79cd6),
3026
+ 0,
3027
+ UINT64_C(0x1000000000000000),
3028
+ };
3029
+ for (size_t i = 3;; i--) {
3030
+ if (scopy.u64[i] > kOrder[i]) {
3031
+ return 0;
3032
+ } else if (scopy.u64[i] < kOrder[i]) {
3033
+ break;
3034
+ } else if (i == 0) {
3035
+ return 0;
3036
+ }
3037
+ }
4733
3038
 
4734
3039
  SHA512_CTX hash_ctx;
4735
3040
  SHA512_Init(&hash_ctx);
@@ -4742,7 +3047,7 @@ int ED25519_verify(const uint8_t *message, size_t message_len,
4742
3047
  x25519_sc_reduce(h);
4743
3048
 
4744
3049
  ge_p2 R;
4745
- ge_double_scalarmult_vartime(&R, h, &A, scopy);
3050
+ ge_double_scalarmult_vartime(&R, h, &A, scopy.u8);
4746
3051
 
4747
3052
  uint8_t rcheck[32];
4748
3053
  x25519_ge_tobytes(rcheck, &R);
@@ -4769,154 +3074,6 @@ void ED25519_keypair_from_seed(uint8_t out_public_key[32],
4769
3074
  }
4770
3075
 
4771
3076
 
4772
- #if defined(BORINGSSL_X25519_X86_64)
4773
-
4774
- static void x25519_scalar_mult(uint8_t out[32], const uint8_t scalar[32],
4775
- const uint8_t point[32]) {
4776
- x25519_x86_64(out, scalar, point);
4777
- }
4778
-
4779
- #else
4780
-
4781
- // Replace (f,g) with (g,f) if b == 1;
4782
- // replace (f,g) with (f,g) if b == 0.
4783
- //
4784
- // Preconditions: b in {0,1}.
4785
- static void fe_cswap(fe *f, fe *g, unsigned int b) {
4786
- b = 0-b;
4787
- unsigned i;
4788
- for (i = 0; i < 10; i++) {
4789
- uint32_t x = f->v[i] ^ g->v[i];
4790
- x &= b;
4791
- f->v[i] ^= x;
4792
- g->v[i] ^= x;
4793
- }
4794
- }
4795
-
4796
- // NOTE: based on fiat-crypto fe_mul, edited for in2=121666, 0, 0..
4797
- static void fe_mul_121666_impl(uint32_t out[10], const uint32_t in1[10]) {
4798
- assert_fe_loose(in1);
4799
- { const uint32_t x20 = in1[9];
4800
- { const uint32_t x21 = in1[8];
4801
- { const uint32_t x19 = in1[7];
4802
- { const uint32_t x17 = in1[6];
4803
- { const uint32_t x15 = in1[5];
4804
- { const uint32_t x13 = in1[4];
4805
- { const uint32_t x11 = in1[3];
4806
- { const uint32_t x9 = in1[2];
4807
- { const uint32_t x7 = in1[1];
4808
- { const uint32_t x5 = in1[0];
4809
- { const uint32_t x38 = 0;
4810
- { const uint32_t x39 = 0;
4811
- { const uint32_t x37 = 0;
4812
- { const uint32_t x35 = 0;
4813
- { const uint32_t x33 = 0;
4814
- { const uint32_t x31 = 0;
4815
- { const uint32_t x29 = 0;
4816
- { const uint32_t x27 = 0;
4817
- { const uint32_t x25 = 0;
4818
- { const uint32_t x23 = 121666;
4819
- { uint64_t x40 = ((uint64_t)x23 * x5);
4820
- { uint64_t x41 = (((uint64_t)x23 * x7) + ((uint64_t)x25 * x5));
4821
- { uint64_t x42 = ((((uint64_t)(0x2 * x25) * x7) + ((uint64_t)x23 * x9)) + ((uint64_t)x27 * x5));
4822
- { uint64_t x43 = (((((uint64_t)x25 * x9) + ((uint64_t)x27 * x7)) + ((uint64_t)x23 * x11)) + ((uint64_t)x29 * x5));
4823
- { uint64_t x44 = (((((uint64_t)x27 * x9) + (0x2 * (((uint64_t)x25 * x11) + ((uint64_t)x29 * x7)))) + ((uint64_t)x23 * x13)) + ((uint64_t)x31 * x5));
4824
- { uint64_t x45 = (((((((uint64_t)x27 * x11) + ((uint64_t)x29 * x9)) + ((uint64_t)x25 * x13)) + ((uint64_t)x31 * x7)) + ((uint64_t)x23 * x15)) + ((uint64_t)x33 * x5));
4825
- { uint64_t x46 = (((((0x2 * ((((uint64_t)x29 * x11) + ((uint64_t)x25 * x15)) + ((uint64_t)x33 * x7))) + ((uint64_t)x27 * x13)) + ((uint64_t)x31 * x9)) + ((uint64_t)x23 * x17)) + ((uint64_t)x35 * x5));
4826
- { uint64_t x47 = (((((((((uint64_t)x29 * x13) + ((uint64_t)x31 * x11)) + ((uint64_t)x27 * x15)) + ((uint64_t)x33 * x9)) + ((uint64_t)x25 * x17)) + ((uint64_t)x35 * x7)) + ((uint64_t)x23 * x19)) + ((uint64_t)x37 * x5));
4827
- { uint64_t x48 = (((((((uint64_t)x31 * x13) + (0x2 * (((((uint64_t)x29 * x15) + ((uint64_t)x33 * x11)) + ((uint64_t)x25 * x19)) + ((uint64_t)x37 * x7)))) + ((uint64_t)x27 * x17)) + ((uint64_t)x35 * x9)) + ((uint64_t)x23 * x21)) + ((uint64_t)x39 * x5));
4828
- { uint64_t x49 = (((((((((((uint64_t)x31 * x15) + ((uint64_t)x33 * x13)) + ((uint64_t)x29 * x17)) + ((uint64_t)x35 * x11)) + ((uint64_t)x27 * x19)) + ((uint64_t)x37 * x9)) + ((uint64_t)x25 * x21)) + ((uint64_t)x39 * x7)) + ((uint64_t)x23 * x20)) + ((uint64_t)x38 * x5));
4829
- { uint64_t x50 = (((((0x2 * ((((((uint64_t)x33 * x15) + ((uint64_t)x29 * x19)) + ((uint64_t)x37 * x11)) + ((uint64_t)x25 * x20)) + ((uint64_t)x38 * x7))) + ((uint64_t)x31 * x17)) + ((uint64_t)x35 * x13)) + ((uint64_t)x27 * x21)) + ((uint64_t)x39 * x9));
4830
- { uint64_t x51 = (((((((((uint64_t)x33 * x17) + ((uint64_t)x35 * x15)) + ((uint64_t)x31 * x19)) + ((uint64_t)x37 * x13)) + ((uint64_t)x29 * x21)) + ((uint64_t)x39 * x11)) + ((uint64_t)x27 * x20)) + ((uint64_t)x38 * x9));
4831
- { uint64_t x52 = (((((uint64_t)x35 * x17) + (0x2 * (((((uint64_t)x33 * x19) + ((uint64_t)x37 * x15)) + ((uint64_t)x29 * x20)) + ((uint64_t)x38 * x11)))) + ((uint64_t)x31 * x21)) + ((uint64_t)x39 * x13));
4832
- { uint64_t x53 = (((((((uint64_t)x35 * x19) + ((uint64_t)x37 * x17)) + ((uint64_t)x33 * x21)) + ((uint64_t)x39 * x15)) + ((uint64_t)x31 * x20)) + ((uint64_t)x38 * x13));
4833
- { uint64_t x54 = (((0x2 * ((((uint64_t)x37 * x19) + ((uint64_t)x33 * x20)) + ((uint64_t)x38 * x15))) + ((uint64_t)x35 * x21)) + ((uint64_t)x39 * x17));
4834
- { uint64_t x55 = (((((uint64_t)x37 * x21) + ((uint64_t)x39 * x19)) + ((uint64_t)x35 * x20)) + ((uint64_t)x38 * x17));
4835
- { uint64_t x56 = (((uint64_t)x39 * x21) + (0x2 * (((uint64_t)x37 * x20) + ((uint64_t)x38 * x19))));
4836
- { uint64_t x57 = (((uint64_t)x39 * x20) + ((uint64_t)x38 * x21));
4837
- { uint64_t x58 = ((uint64_t)(0x2 * x38) * x20);
4838
- { uint64_t x59 = (x48 + (x58 << 0x4));
4839
- { uint64_t x60 = (x59 + (x58 << 0x1));
4840
- { uint64_t x61 = (x60 + x58);
4841
- { uint64_t x62 = (x47 + (x57 << 0x4));
4842
- { uint64_t x63 = (x62 + (x57 << 0x1));
4843
- { uint64_t x64 = (x63 + x57);
4844
- { uint64_t x65 = (x46 + (x56 << 0x4));
4845
- { uint64_t x66 = (x65 + (x56 << 0x1));
4846
- { uint64_t x67 = (x66 + x56);
4847
- { uint64_t x68 = (x45 + (x55 << 0x4));
4848
- { uint64_t x69 = (x68 + (x55 << 0x1));
4849
- { uint64_t x70 = (x69 + x55);
4850
- { uint64_t x71 = (x44 + (x54 << 0x4));
4851
- { uint64_t x72 = (x71 + (x54 << 0x1));
4852
- { uint64_t x73 = (x72 + x54);
4853
- { uint64_t x74 = (x43 + (x53 << 0x4));
4854
- { uint64_t x75 = (x74 + (x53 << 0x1));
4855
- { uint64_t x76 = (x75 + x53);
4856
- { uint64_t x77 = (x42 + (x52 << 0x4));
4857
- { uint64_t x78 = (x77 + (x52 << 0x1));
4858
- { uint64_t x79 = (x78 + x52);
4859
- { uint64_t x80 = (x41 + (x51 << 0x4));
4860
- { uint64_t x81 = (x80 + (x51 << 0x1));
4861
- { uint64_t x82 = (x81 + x51);
4862
- { uint64_t x83 = (x40 + (x50 << 0x4));
4863
- { uint64_t x84 = (x83 + (x50 << 0x1));
4864
- { uint64_t x85 = (x84 + x50);
4865
- { uint64_t x86 = (x85 >> 0x1a);
4866
- { uint32_t x87 = ((uint32_t)x85 & 0x3ffffff);
4867
- { uint64_t x88 = (x86 + x82);
4868
- { uint64_t x89 = (x88 >> 0x19);
4869
- { uint32_t x90 = ((uint32_t)x88 & 0x1ffffff);
4870
- { uint64_t x91 = (x89 + x79);
4871
- { uint64_t x92 = (x91 >> 0x1a);
4872
- { uint32_t x93 = ((uint32_t)x91 & 0x3ffffff);
4873
- { uint64_t x94 = (x92 + x76);
4874
- { uint64_t x95 = (x94 >> 0x19);
4875
- { uint32_t x96 = ((uint32_t)x94 & 0x1ffffff);
4876
- { uint64_t x97 = (x95 + x73);
4877
- { uint64_t x98 = (x97 >> 0x1a);
4878
- { uint32_t x99 = ((uint32_t)x97 & 0x3ffffff);
4879
- { uint64_t x100 = (x98 + x70);
4880
- { uint64_t x101 = (x100 >> 0x19);
4881
- { uint32_t x102 = ((uint32_t)x100 & 0x1ffffff);
4882
- { uint64_t x103 = (x101 + x67);
4883
- { uint64_t x104 = (x103 >> 0x1a);
4884
- { uint32_t x105 = ((uint32_t)x103 & 0x3ffffff);
4885
- { uint64_t x106 = (x104 + x64);
4886
- { uint64_t x107 = (x106 >> 0x19);
4887
- { uint32_t x108 = ((uint32_t)x106 & 0x1ffffff);
4888
- { uint64_t x109 = (x107 + x61);
4889
- { uint64_t x110 = (x109 >> 0x1a);
4890
- { uint32_t x111 = ((uint32_t)x109 & 0x3ffffff);
4891
- { uint64_t x112 = (x110 + x49);
4892
- { uint64_t x113 = (x112 >> 0x19);
4893
- { uint32_t x114 = ((uint32_t)x112 & 0x1ffffff);
4894
- { uint64_t x115 = (x87 + (0x13 * x113));
4895
- { uint32_t x116 = (uint32_t) (x115 >> 0x1a);
4896
- { uint32_t x117 = ((uint32_t)x115 & 0x3ffffff);
4897
- { uint32_t x118 = (x116 + x90);
4898
- { uint32_t x119 = (x118 >> 0x19);
4899
- { uint32_t x120 = (x118 & 0x1ffffff);
4900
- out[0] = x117;
4901
- out[1] = x120;
4902
- out[2] = (x119 + x93);
4903
- out[3] = x96;
4904
- out[4] = x99;
4905
- out[5] = x102;
4906
- out[6] = x105;
4907
- out[7] = x108;
4908
- out[8] = x111;
4909
- out[9] = x114;
4910
- }}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}
4911
- assert_fe(out);
4912
- }
4913
-
4914
- static void fe_mul121666(fe *h, const fe_loose *f) {
4915
- assert_fe_loose(f->v);
4916
- fe_mul_121666_impl(h->v, f->v);
4917
- assert_fe(h->v);
4918
- }
4919
-
4920
3077
  static void x25519_scalar_mult_generic(uint8_t out[32],
4921
3078
  const uint8_t scalar[32],
4922
3079
  const uint8_t point[32]) {
@@ -4928,6 +3085,24 @@ static void x25519_scalar_mult_generic(uint8_t out[32],
4928
3085
  e[0] &= 248;
4929
3086
  e[31] &= 127;
4930
3087
  e[31] |= 64;
3088
+
3089
+ // The following implementation was transcribed to Coq and proven to
3090
+ // correspond to unary scalar multiplication in affine coordinates given that
3091
+ // x1 != 0 is the x coordinate of some point on the curve. It was also checked
3092
+ // in Coq that doing a ladderstep with x1 = x3 = 0 gives z2' = z3' = 0, and z2
3093
+ // = z3 = 0 gives z2' = z3' = 0. The statement was quantified over the
3094
+ // underlying field, so it applies to Curve25519 itself and the quadratic
3095
+ // twist of Curve25519. It was not proven in Coq that prime-field arithmetic
3096
+ // correctly simulates extension-field arithmetic on prime-field values.
3097
+ // The decoding of the byte array representation of e was not considered.
3098
+ // Specification of Montgomery curves in affine coordinates:
3099
+ // <https://github.com/mit-plv/fiat-crypto/blob/2456d821825521f7e03e65882cc3521795b0320f/src/Spec/MontgomeryCurve.v#L27>
3100
+ // Proof that these form a group that is isomorphic to a Weierstrass curve:
3101
+ // <https://github.com/mit-plv/fiat-crypto/blob/2456d821825521f7e03e65882cc3521795b0320f/src/Curves/Montgomery/AffineProofs.v#L35>
3102
+ // Coq transcription and correctness proof of the loop (where scalarbits=255):
3103
+ // <https://github.com/mit-plv/fiat-crypto/blob/2456d821825521f7e03e65882cc3521795b0320f/src/Curves/Montgomery/XZ.v#L118>
3104
+ // <https://github.com/mit-plv/fiat-crypto/blob/2456d821825521f7e03e65882cc3521795b0320f/src/Curves/Montgomery/XZProofs.v#L278>
3105
+ // preconditions: 0 <= e < 2^255 (not necessarily e < order), fe_invert(0) = 0
4931
3106
  fe_frombytes(&x1, point);
4932
3107
  fe_1(&x2);
4933
3108
  fe_0(&z2);
@@ -4937,11 +3112,22 @@ static void x25519_scalar_mult_generic(uint8_t out[32],
4937
3112
  unsigned swap = 0;
4938
3113
  int pos;
4939
3114
  for (pos = 254; pos >= 0; --pos) {
3115
+ // loop invariant as of right before the test, for the case where x1 != 0:
3116
+ // pos >= -1; if z2 = 0 then x2 is nonzero; if z3 = 0 then x3 is nonzero
3117
+ // let r := e >> (pos+1) in the following equalities of projective points:
3118
+ // to_xz (r*P) === if swap then (x3, z3) else (x2, z2)
3119
+ // to_xz ((r+1)*P) === if swap then (x2, z2) else (x3, z3)
3120
+ // x1 is the nonzero x coordinate of the nonzero point (r*P-(r+1)*P)
4940
3121
  unsigned b = 1 & (e[pos / 8] >> (pos & 7));
4941
3122
  swap ^= b;
4942
3123
  fe_cswap(&x2, &x3, swap);
4943
3124
  fe_cswap(&z2, &z3, swap);
4944
3125
  swap = b;
3126
+ // Coq transcription of ladderstep formula (called from transcribed loop):
3127
+ // <https://github.com/mit-plv/fiat-crypto/blob/2456d821825521f7e03e65882cc3521795b0320f/src/Curves/Montgomery/XZ.v#L89>
3128
+ // <https://github.com/mit-plv/fiat-crypto/blob/2456d821825521f7e03e65882cc3521795b0320f/src/Curves/Montgomery/XZProofs.v#L131>
3129
+ // x1 != 0 <https://github.com/mit-plv/fiat-crypto/blob/2456d821825521f7e03e65882cc3521795b0320f/src/Curves/Montgomery/XZProofs.v#L217>
3130
+ // x1 = 0 <https://github.com/mit-plv/fiat-crypto/blob/2456d821825521f7e03e65882cc3521795b0320f/src/Curves/Montgomery/XZProofs.v#L147>
4945
3131
  fe_sub(&tmp0l, &x3, &z3);
4946
3132
  fe_sub(&tmp1l, &x2, &z2);
4947
3133
  fe_add(&x2l, &x2, &z2);
@@ -4961,6 +3147,7 @@ static void x25519_scalar_mult_generic(uint8_t out[32],
4961
3147
  fe_mul_ttt(&z3, &x1, &z2);
4962
3148
  fe_mul_tll(&z2, &tmp1l, &tmp0l);
4963
3149
  }
3150
+ // here pos=-1, so r=e, so to_xz (e*P) === if swap then (x3, z3) else (x2, z2)
4964
3151
  fe_cswap(&x2, &x3, swap);
4965
3152
  fe_cswap(&z2, &z3, swap);
4966
3153
 
@@ -4981,9 +3168,6 @@ static void x25519_scalar_mult(uint8_t out[32], const uint8_t scalar[32],
4981
3168
  x25519_scalar_mult_generic(out, scalar, point);
4982
3169
  }
4983
3170
 
4984
- #endif // BORINGSSL_X25519_X86_64
4985
-
4986
-
4987
3171
  void X25519_keypair(uint8_t out_public_value[32], uint8_t out_private_key[32]) {
4988
3172
  RAND_bytes(out_private_key, 32);
4989
3173
 
@@ -5015,20 +3199,6 @@ int X25519(uint8_t out_shared_key[32], const uint8_t private_key[32],
5015
3199
  return CRYPTO_memcmp(kZeros, out_shared_key, 32) != 0;
5016
3200
  }
5017
3201
 
5018
- #if defined(BORINGSSL_X25519_X86_64)
5019
-
5020
- // When |BORINGSSL_X25519_X86_64| is set, base point multiplication is done with
5021
- // the Montgomery ladder because it's faster. Otherwise it's done using the
5022
- // Ed25519 tables.
5023
-
5024
- void X25519_public_from_private(uint8_t out_public_value[32],
5025
- const uint8_t private_key[32]) {
5026
- static const uint8_t kMongomeryBasePoint[32] = {9};
5027
- x25519_scalar_mult(out_public_value, private_key, kMongomeryBasePoint);
5028
- }
5029
-
5030
- #else
5031
-
5032
3202
  void X25519_public_from_private(uint8_t out_public_value[32],
5033
3203
  const uint8_t private_key[32]) {
5034
3204
  #if defined(BORINGSSL_X25519_NEON)
@@ -5058,5 +3228,3 @@ void X25519_public_from_private(uint8_t out_public_value[32],
5058
3228
  fe_mul_tlt(&zminusy_inv, &zplusy, &zminusy_inv);
5059
3229
  fe_tobytes(out_public_value, &zminusy_inv);
5060
3230
  }
5061
-
5062
- #endif // BORINGSSL_X25519_X86_64