longfellow 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (289) hide show
  1. checksums.yaml +7 -0
  2. data/CODE_OF_CONDUCT.md +10 -0
  3. data/LICENSE.txt +21 -0
  4. data/README.md +152 -0
  5. data/ext/longfellow/CMakeLists.txt +76 -0
  6. data/ext/longfellow/extconf.rb +77 -0
  7. data/lib/longfellow/attribute.rb +65 -0
  8. data/lib/longfellow/c.rb +105 -0
  9. data/lib/longfellow/errors.rb +78 -0
  10. data/lib/longfellow/version.rb +5 -0
  11. data/lib/longfellow/zk_spec.rb +40 -0
  12. data/lib/longfellow.rb +162 -0
  13. data/sig/longfellow.rbs +74 -0
  14. data/vendor/longfellow-zk/LICENSE +203 -0
  15. data/vendor/longfellow-zk/lib/algebra/blas.h +121 -0
  16. data/vendor/longfellow-zk/lib/algebra/bogorng.h +68 -0
  17. data/vendor/longfellow-zk/lib/algebra/compare.h +40 -0
  18. data/vendor/longfellow-zk/lib/algebra/convolution.h +219 -0
  19. data/vendor/longfellow-zk/lib/algebra/crt.cc +42 -0
  20. data/vendor/longfellow-zk/lib/algebra/crt.h +299 -0
  21. data/vendor/longfellow-zk/lib/algebra/crt_convolution.h +114 -0
  22. data/vendor/longfellow-zk/lib/algebra/crt_test.cc +371 -0
  23. data/vendor/longfellow-zk/lib/algebra/fft.h +104 -0
  24. data/vendor/longfellow-zk/lib/algebra/fft_interpolation.h +304 -0
  25. data/vendor/longfellow-zk/lib/algebra/fft_interpolation_test.cc +168 -0
  26. data/vendor/longfellow-zk/lib/algebra/fft_test.cc +257 -0
  27. data/vendor/longfellow-zk/lib/algebra/fp.h +59 -0
  28. data/vendor/longfellow-zk/lib/algebra/fp2.h +240 -0
  29. data/vendor/longfellow-zk/lib/algebra/fp24.h +342 -0
  30. data/vendor/longfellow-zk/lib/algebra/fp24_6.h +305 -0
  31. data/vendor/longfellow-zk/lib/algebra/fp24_6_test.cc +197 -0
  32. data/vendor/longfellow-zk/lib/algebra/fp2_test.cc +280 -0
  33. data/vendor/longfellow-zk/lib/algebra/fp_generic.h +533 -0
  34. data/vendor/longfellow-zk/lib/algebra/fp_p128.h +91 -0
  35. data/vendor/longfellow-zk/lib/algebra/fp_p256.h +68 -0
  36. data/vendor/longfellow-zk/lib/algebra/fp_p256k1.h +123 -0
  37. data/vendor/longfellow-zk/lib/algebra/fp_p384.h +65 -0
  38. data/vendor/longfellow-zk/lib/algebra/fp_p521.h +62 -0
  39. data/vendor/longfellow-zk/lib/algebra/fp_test.cc +522 -0
  40. data/vendor/longfellow-zk/lib/algebra/hash.h +39 -0
  41. data/vendor/longfellow-zk/lib/algebra/interpolation.h +117 -0
  42. data/vendor/longfellow-zk/lib/algebra/interpolation_test.cc +74 -0
  43. data/vendor/longfellow-zk/lib/algebra/limb.h +153 -0
  44. data/vendor/longfellow-zk/lib/algebra/limb_test.cc +75 -0
  45. data/vendor/longfellow-zk/lib/algebra/nat.cc +32 -0
  46. data/vendor/longfellow-zk/lib/algebra/nat.h +212 -0
  47. data/vendor/longfellow-zk/lib/algebra/nat_test.cc +183 -0
  48. data/vendor/longfellow-zk/lib/algebra/nussbaumer.h +400 -0
  49. data/vendor/longfellow-zk/lib/algebra/nussbaumer_test.cc +138 -0
  50. data/vendor/longfellow-zk/lib/algebra/nussbaumerfp2_test.cc +139 -0
  51. data/vendor/longfellow-zk/lib/algebra/permutations.h +79 -0
  52. data/vendor/longfellow-zk/lib/algebra/poly.h +240 -0
  53. data/vendor/longfellow-zk/lib/algebra/poly_test.cc +123 -0
  54. data/vendor/longfellow-zk/lib/algebra/reed_solomon.h +150 -0
  55. data/vendor/longfellow-zk/lib/algebra/reed_solomon_extension.h +108 -0
  56. data/vendor/longfellow-zk/lib/algebra/reed_solomon_extension_test.cc +76 -0
  57. data/vendor/longfellow-zk/lib/algebra/reed_solomon_test.cc +473 -0
  58. data/vendor/longfellow-zk/lib/algebra/rfft.h +400 -0
  59. data/vendor/longfellow-zk/lib/algebra/rfft_test.cc +102 -0
  60. data/vendor/longfellow-zk/lib/algebra/static_string.h +29 -0
  61. data/vendor/longfellow-zk/lib/algebra/sysdep.h +495 -0
  62. data/vendor/longfellow-zk/lib/algebra/sysdep_test.cc +41 -0
  63. data/vendor/longfellow-zk/lib/algebra/twiddle.h +59 -0
  64. data/vendor/longfellow-zk/lib/algebra/utility.h +86 -0
  65. data/vendor/longfellow-zk/lib/algebra/utility_test.cc +86 -0
  66. data/vendor/longfellow-zk/lib/arrays/affine.h +56 -0
  67. data/vendor/longfellow-zk/lib/arrays/affine_test.cc +220 -0
  68. data/vendor/longfellow-zk/lib/arrays/dense.h +210 -0
  69. data/vendor/longfellow-zk/lib/arrays/eq.h +75 -0
  70. data/vendor/longfellow-zk/lib/arrays/eqs.h +137 -0
  71. data/vendor/longfellow-zk/lib/arrays/eqs_test.cc +151 -0
  72. data/vendor/longfellow-zk/lib/arrays/sparse.h +192 -0
  73. data/vendor/longfellow-zk/lib/cbor/host_decoder.h +323 -0
  74. data/vendor/longfellow-zk/lib/cbor/host_decoder_test.cc +541 -0
  75. data/vendor/longfellow-zk/lib/circuits/cbor_parser/cbor.h +594 -0
  76. data/vendor/longfellow-zk/lib/circuits/cbor_parser/cbor_byte_decoder.h +150 -0
  77. data/vendor/longfellow-zk/lib/circuits/cbor_parser/cbor_byte_decoder_test.cc +147 -0
  78. data/vendor/longfellow-zk/lib/circuits/cbor_parser/cbor_constants.h +27 -0
  79. data/vendor/longfellow-zk/lib/circuits/cbor_parser/cbor_pluck.h +110 -0
  80. data/vendor/longfellow-zk/lib/circuits/cbor_parser/cbor_pluck_test.cc +55 -0
  81. data/vendor/longfellow-zk/lib/circuits/cbor_parser/cbor_test.cc +174 -0
  82. data/vendor/longfellow-zk/lib/circuits/cbor_parser/cbor_testing.h +98 -0
  83. data/vendor/longfellow-zk/lib/circuits/cbor_parser/cbor_witness.h +312 -0
  84. data/vendor/longfellow-zk/lib/circuits/cbor_parser/mso2_test.cc +662 -0
  85. data/vendor/longfellow-zk/lib/circuits/cbor_parser/mso_test.cc +485 -0
  86. data/vendor/longfellow-zk/lib/circuits/cbor_parser/scan.h +104 -0
  87. data/vendor/longfellow-zk/lib/circuits/cbor_parser/scan_test.cc +137 -0
  88. data/vendor/longfellow-zk/lib/circuits/cbor_parser_v2/cbor.h +640 -0
  89. data/vendor/longfellow-zk/lib/circuits/cbor_parser_v2/cbor_byte_decoder.h +150 -0
  90. data/vendor/longfellow-zk/lib/circuits/cbor_parser_v2/cbor_byte_decoder_test.cc +147 -0
  91. data/vendor/longfellow-zk/lib/circuits/cbor_parser_v2/cbor_constants.h +27 -0
  92. data/vendor/longfellow-zk/lib/circuits/cbor_parser_v2/cbor_testing.h +99 -0
  93. data/vendor/longfellow-zk/lib/circuits/cbor_parser_v2/cbor_witness.h +319 -0
  94. data/vendor/longfellow-zk/lib/circuits/cbor_parser_v2/lexer_test.cc +120 -0
  95. data/vendor/longfellow-zk/lib/circuits/cbor_parser_v2/mdoc_examples_test.cc +89 -0
  96. data/vendor/longfellow-zk/lib/circuits/cbor_parser_v2/parser_circuit_test.cc +506 -0
  97. data/vendor/longfellow-zk/lib/circuits/cbor_parser_v2/parser_size_test.cc +79 -0
  98. data/vendor/longfellow-zk/lib/circuits/cbor_parser_v2/parser_test.cc +473 -0
  99. data/vendor/longfellow-zk/lib/circuits/compiler/canonicalization_test.cc +185 -0
  100. data/vendor/longfellow-zk/lib/circuits/compiler/circuit_dump.h +65 -0
  101. data/vendor/longfellow-zk/lib/circuits/compiler/compiler.h +471 -0
  102. data/vendor/longfellow-zk/lib/circuits/compiler/compiler_test.cc +110 -0
  103. data/vendor/longfellow-zk/lib/circuits/compiler/node.h +176 -0
  104. data/vendor/longfellow-zk/lib/circuits/compiler/pdqhash.h +127 -0
  105. data/vendor/longfellow-zk/lib/circuits/compiler/schedule.h +435 -0
  106. data/vendor/longfellow-zk/lib/circuits/ecdsa/verify_circuit.h +371 -0
  107. data/vendor/longfellow-zk/lib/circuits/ecdsa/verify_external_test.cc +246 -0
  108. data/vendor/longfellow-zk/lib/circuits/ecdsa/verify_test.cc +587 -0
  109. data/vendor/longfellow-zk/lib/circuits/ecdsa/verify_witness.h +201 -0
  110. data/vendor/longfellow-zk/lib/circuits/logic/bit_adder.h +140 -0
  111. data/vendor/longfellow-zk/lib/circuits/logic/bit_adder_test.cc +64 -0
  112. data/vendor/longfellow-zk/lib/circuits/logic/bit_plucker.h +247 -0
  113. data/vendor/longfellow-zk/lib/circuits/logic/bit_plucker_constants.h +35 -0
  114. data/vendor/longfellow-zk/lib/circuits/logic/bit_plucker_encoder.h +72 -0
  115. data/vendor/longfellow-zk/lib/circuits/logic/bit_plucker_test.cc +183 -0
  116. data/vendor/longfellow-zk/lib/circuits/logic/compiler_backend.h +62 -0
  117. data/vendor/longfellow-zk/lib/circuits/logic/counter.h +171 -0
  118. data/vendor/longfellow-zk/lib/circuits/logic/counter_test.cc +102 -0
  119. data/vendor/longfellow-zk/lib/circuits/logic/evaluation_backend.h +94 -0
  120. data/vendor/longfellow-zk/lib/circuits/logic/logic.h +1232 -0
  121. data/vendor/longfellow-zk/lib/circuits/logic/logic_circuit_test.cc +310 -0
  122. data/vendor/longfellow-zk/lib/circuits/logic/logic_test.cc +521 -0
  123. data/vendor/longfellow-zk/lib/circuits/logic/memcmp.h +68 -0
  124. data/vendor/longfellow-zk/lib/circuits/logic/memcmp_test.cc +148 -0
  125. data/vendor/longfellow-zk/lib/circuits/logic/polynomial.h +94 -0
  126. data/vendor/longfellow-zk/lib/circuits/logic/polynomial_test.cc +62 -0
  127. data/vendor/longfellow-zk/lib/circuits/logic/routing.h +445 -0
  128. data/vendor/longfellow-zk/lib/circuits/logic/routing_test.cc +241 -0
  129. data/vendor/longfellow-zk/lib/circuits/logic/unary.h +55 -0
  130. data/vendor/longfellow-zk/lib/circuits/logic/unary_plucker.h +77 -0
  131. data/vendor/longfellow-zk/lib/circuits/logic/unary_plucker_constants.h +37 -0
  132. data/vendor/longfellow-zk/lib/circuits/logic/unary_plucker_test.cc +53 -0
  133. data/vendor/longfellow-zk/lib/circuits/logic/unary_size_test.cc +69 -0
  134. data/vendor/longfellow-zk/lib/circuits/logic/unary_test.cc +62 -0
  135. data/vendor/longfellow-zk/lib/circuits/mac/mac_circuit.h +193 -0
  136. data/vendor/longfellow-zk/lib/circuits/mac/mac_circuit_test.cc +223 -0
  137. data/vendor/longfellow-zk/lib/circuits/mac/mac_reference.h +72 -0
  138. data/vendor/longfellow-zk/lib/circuits/mac/mac_witness.h +94 -0
  139. data/vendor/longfellow-zk/lib/circuits/mdoc/circuit_maker.cc +242 -0
  140. data/vendor/longfellow-zk/lib/circuits/mdoc/mdoc_attribute_ids.h +311 -0
  141. data/vendor/longfellow-zk/lib/circuits/mdoc/mdoc_attribute_test.cc +64 -0
  142. data/vendor/longfellow-zk/lib/circuits/mdoc/mdoc_circuit_id.cc +85 -0
  143. data/vendor/longfellow-zk/lib/circuits/mdoc/mdoc_constants.h +85 -0
  144. data/vendor/longfellow-zk/lib/circuits/mdoc/mdoc_decompress.cc +41 -0
  145. data/vendor/longfellow-zk/lib/circuits/mdoc/mdoc_decompress.h +27 -0
  146. data/vendor/longfellow-zk/lib/circuits/mdoc/mdoc_examples.h +5232 -0
  147. data/vendor/longfellow-zk/lib/circuits/mdoc/mdoc_generate_circuit.cc +199 -0
  148. data/vendor/longfellow-zk/lib/circuits/mdoc/mdoc_hash.h +554 -0
  149. data/vendor/longfellow-zk/lib/circuits/mdoc/mdoc_signature.h +143 -0
  150. data/vendor/longfellow-zk/lib/circuits/mdoc/mdoc_signature_test.cc +444 -0
  151. data/vendor/longfellow-zk/lib/circuits/mdoc/mdoc_test_attributes.h +157 -0
  152. data/vendor/longfellow-zk/lib/circuits/mdoc/mdoc_witness.h +863 -0
  153. data/vendor/longfellow-zk/lib/circuits/mdoc/mdoc_zk.cc +693 -0
  154. data/vendor/longfellow-zk/lib/circuits/mdoc/mdoc_zk.h +216 -0
  155. data/vendor/longfellow-zk/lib/circuits/mdoc/mdoc_zk_test.cc +724 -0
  156. data/vendor/longfellow-zk/lib/circuits/mdoc/zk_spec.cc +100 -0
  157. data/vendor/longfellow-zk/lib/circuits/mdoc/zk_spec_test.cc +155 -0
  158. data/vendor/longfellow-zk/lib/circuits/sha/flatsha256_circuit.h +330 -0
  159. data/vendor/longfellow-zk/lib/circuits/sha/flatsha256_circuit_test.cc +607 -0
  160. data/vendor/longfellow-zk/lib/circuits/sha/flatsha256_io.h +26 -0
  161. data/vendor/longfellow-zk/lib/circuits/sha/flatsha256_witness.cc +163 -0
  162. data/vendor/longfellow-zk/lib/circuits/sha/flatsha256_witness.h +47 -0
  163. data/vendor/longfellow-zk/lib/circuits/sha/sha256_constants.cc +34 -0
  164. data/vendor/longfellow-zk/lib/circuits/sha/sha256_constants.h +27 -0
  165. data/vendor/longfellow-zk/lib/circuits/sha/sha256_test_values.h +389 -0
  166. data/vendor/longfellow-zk/lib/circuits/tests/anoncred/ptrcred.h +171 -0
  167. data/vendor/longfellow-zk/lib/circuits/tests/anoncred/small.h +218 -0
  168. data/vendor/longfellow-zk/lib/circuits/tests/anoncred/small_examples.h +118 -0
  169. data/vendor/longfellow-zk/lib/circuits/tests/anoncred/small_io.h +25 -0
  170. data/vendor/longfellow-zk/lib/circuits/tests/anoncred/small_test.cc +208 -0
  171. data/vendor/longfellow-zk/lib/circuits/tests/anoncred/small_witness.h +130 -0
  172. data/vendor/longfellow-zk/lib/circuits/tests/base64/decode.h +508 -0
  173. data/vendor/longfellow-zk/lib/circuits/tests/base64/decode_circuit_test.cc +95 -0
  174. data/vendor/longfellow-zk/lib/circuits/tests/base64/decode_test.cc +119 -0
  175. data/vendor/longfellow-zk/lib/circuits/tests/base64/decode_util.cc +47 -0
  176. data/vendor/longfellow-zk/lib/circuits/tests/base64/decode_util.h +29 -0
  177. data/vendor/longfellow-zk/lib/circuits/tests/ec/pk_circuit.h +231 -0
  178. data/vendor/longfellow-zk/lib/circuits/tests/ec/pk_circuit_test.cc +428 -0
  179. data/vendor/longfellow-zk/lib/circuits/tests/ec/pk_witness.h +102 -0
  180. data/vendor/longfellow-zk/lib/circuits/tests/jwt/jwt.h +190 -0
  181. data/vendor/longfellow-zk/lib/circuits/tests/jwt/jwt_constants.h +26 -0
  182. data/vendor/longfellow-zk/lib/circuits/tests/jwt/jwt_test.cc +559 -0
  183. data/vendor/longfellow-zk/lib/circuits/tests/jwt/jwt_witness.h +315 -0
  184. data/vendor/longfellow-zk/lib/circuits/tests/mdoc/mdoc_1f.h +411 -0
  185. data/vendor/longfellow-zk/lib/circuits/tests/mdoc/mdoc_1f_io.h +32 -0
  186. data/vendor/longfellow-zk/lib/circuits/tests/mdoc/mdoc_1f_test.cc +364 -0
  187. data/vendor/longfellow-zk/lib/circuits/tests/mdoc/mdoc_1f_witness.h +278 -0
  188. data/vendor/longfellow-zk/lib/circuits/tests/mdoc/mdoc_revocation.h +146 -0
  189. data/vendor/longfellow-zk/lib/circuits/tests/mdoc/mdoc_revocation_constants.h +25 -0
  190. data/vendor/longfellow-zk/lib/circuits/tests/mdoc/mdoc_revocation_test.cc +315 -0
  191. data/vendor/longfellow-zk/lib/circuits/tests/mdoc/mdoc_revocation_witness.h +136 -0
  192. data/vendor/longfellow-zk/lib/circuits/tests/pq/bitaddr/bitaddr.h +250 -0
  193. data/vendor/longfellow-zk/lib/circuits/tests/pq/bitaddr/bitaddr_test.cc +333 -0
  194. data/vendor/longfellow-zk/lib/circuits/tests/pq/bitaddr/bitaddr_witness.h +152 -0
  195. data/vendor/longfellow-zk/lib/circuits/tests/pq/ml_dsa/ml_dsa_44.h +903 -0
  196. data/vendor/longfellow-zk/lib/circuits/tests/pq/ml_dsa/ml_dsa_44_circuit_test.cc +274 -0
  197. data/vendor/longfellow-zk/lib/circuits/tests/pq/ml_dsa/ml_dsa_44_eval_test.cc +440 -0
  198. data/vendor/longfellow-zk/lib/circuits/tests/pq/ml_dsa/ml_dsa_44_examples.cc +8851 -0
  199. data/vendor/longfellow-zk/lib/circuits/tests/pq/ml_dsa/ml_dsa_44_examples.h +93 -0
  200. data/vendor/longfellow-zk/lib/circuits/tests/pq/ml_dsa/ml_dsa_44_types.cc +24 -0
  201. data/vendor/longfellow-zk/lib/circuits/tests/pq/ml_dsa/ml_dsa_44_types.h +118 -0
  202. data/vendor/longfellow-zk/lib/circuits/tests/pq/ml_dsa/ml_dsa_44_witness.h +453 -0
  203. data/vendor/longfellow-zk/lib/circuits/tests/pq/ml_dsa/ml_dsa_44_witness_test.cc +49 -0
  204. data/vendor/longfellow-zk/lib/circuits/tests/pq/ml_dsa/ml_dsa_ref.cc +458 -0
  205. data/vendor/longfellow-zk/lib/circuits/tests/pq/ml_dsa/ml_dsa_ref.h +150 -0
  206. data/vendor/longfellow-zk/lib/circuits/tests/pq/ml_dsa/ml_dsa_ref_test.cc +398 -0
  207. data/vendor/longfellow-zk/lib/circuits/tests/pq/ml_dsa/ml_dsa_ref_test_vectors.inc +3618 -0
  208. data/vendor/longfellow-zk/lib/circuits/tests/pq/ml_dsa/ml_dsa_ref_test_vectors_pkdecode.inc +689 -0
  209. data/vendor/longfellow-zk/lib/circuits/tests/pq/ml_dsa/ml_dsa_ref_test_vectors_sigdecode.inc +1501 -0
  210. data/vendor/longfellow-zk/lib/circuits/tests/pq/ml_dsa/sigdecode_test_vectors.inc +540 -0
  211. data/vendor/longfellow-zk/lib/circuits/tests/ripemd/ripemd_circuit.h +394 -0
  212. data/vendor/longfellow-zk/lib/circuits/tests/ripemd/ripemd_circuit_test.cc +577 -0
  213. data/vendor/longfellow-zk/lib/circuits/tests/ripemd/ripemd_constants.h +90 -0
  214. data/vendor/longfellow-zk/lib/circuits/tests/ripemd/ripemd_witness.cc +174 -0
  215. data/vendor/longfellow-zk/lib/circuits/tests/ripemd/ripemd_witness.h +140 -0
  216. data/vendor/longfellow-zk/lib/circuits/tests/sha3/sha3_circuit.h +351 -0
  217. data/vendor/longfellow-zk/lib/circuits/tests/sha3/sha3_circuit_test.cc +466 -0
  218. data/vendor/longfellow-zk/lib/circuits/tests/sha3/sha3_reference.cc +207 -0
  219. data/vendor/longfellow-zk/lib/circuits/tests/sha3/sha3_reference.h +59 -0
  220. data/vendor/longfellow-zk/lib/circuits/tests/sha3/sha3_reference_test.cc +153 -0
  221. data/vendor/longfellow-zk/lib/circuits/tests/sha3/sha3_round_constants.cc +39 -0
  222. data/vendor/longfellow-zk/lib/circuits/tests/sha3/sha3_round_constants.h +29 -0
  223. data/vendor/longfellow-zk/lib/circuits/tests/sha3/sha3_slicing.h +31 -0
  224. data/vendor/longfellow-zk/lib/circuits/tests/sha3/sha3_witness.cc +83 -0
  225. data/vendor/longfellow-zk/lib/circuits/tests/sha3/sha3_witness.h +72 -0
  226. data/vendor/longfellow-zk/lib/circuits/tests/sha3/shake_test_vectors.h +477 -0
  227. data/vendor/longfellow-zk/lib/ec/elliptic_curve.h +596 -0
  228. data/vendor/longfellow-zk/lib/ec/elliptic_curve_test.cc +548 -0
  229. data/vendor/longfellow-zk/lib/ec/p256.cc +36 -0
  230. data/vendor/longfellow-zk/lib/ec/p256.h +60 -0
  231. data/vendor/longfellow-zk/lib/ec/p256k1.cc +34 -0
  232. data/vendor/longfellow-zk/lib/ec/p256k1.h +60 -0
  233. data/vendor/longfellow-zk/lib/gf2k/gf2_128.h +503 -0
  234. data/vendor/longfellow-zk/lib/gf2k/gf2_128_bench.cc +48 -0
  235. data/vendor/longfellow-zk/lib/gf2k/gf2_128_test.cc +416 -0
  236. data/vendor/longfellow-zk/lib/gf2k/gf2poly.h +74 -0
  237. data/vendor/longfellow-zk/lib/gf2k/lch14.h +242 -0
  238. data/vendor/longfellow-zk/lib/gf2k/lch14_bench.cc +75 -0
  239. data/vendor/longfellow-zk/lib/gf2k/lch14_reed_solomon.h +127 -0
  240. data/vendor/longfellow-zk/lib/gf2k/lch14_reed_solomon_test.cc +110 -0
  241. data/vendor/longfellow-zk/lib/gf2k/lch14_test.cc +246 -0
  242. data/vendor/longfellow-zk/lib/gf2k/sysdep.h +329 -0
  243. data/vendor/longfellow-zk/lib/ligero/ligero_param.h +449 -0
  244. data/vendor/longfellow-zk/lib/ligero/ligero_prover.h +354 -0
  245. data/vendor/longfellow-zk/lib/ligero/ligero_test.cc +136 -0
  246. data/vendor/longfellow-zk/lib/ligero/ligero_transcript.h +67 -0
  247. data/vendor/longfellow-zk/lib/ligero/ligero_verifier.h +272 -0
  248. data/vendor/longfellow-zk/lib/merkle/merkle_commitment.h +104 -0
  249. data/vendor/longfellow-zk/lib/merkle/merkle_tree.h +216 -0
  250. data/vendor/longfellow-zk/lib/merkle/merkle_tree_test.cc +240 -0
  251. data/vendor/longfellow-zk/lib/proto/circuit.h +354 -0
  252. data/vendor/longfellow-zk/lib/proto/circuit_test.cc +202 -0
  253. data/vendor/longfellow-zk/lib/random/random.h +119 -0
  254. data/vendor/longfellow-zk/lib/random/random_test.cc +189 -0
  255. data/vendor/longfellow-zk/lib/random/secure_random_engine.h +37 -0
  256. data/vendor/longfellow-zk/lib/random/transcript.h +193 -0
  257. data/vendor/longfellow-zk/lib/random/transcript_test.cc +344 -0
  258. data/vendor/longfellow-zk/lib/sumcheck/circuit.h +148 -0
  259. data/vendor/longfellow-zk/lib/sumcheck/circuit_id.h +71 -0
  260. data/vendor/longfellow-zk/lib/sumcheck/equad.h +126 -0
  261. data/vendor/longfellow-zk/lib/sumcheck/hquad.h +115 -0
  262. data/vendor/longfellow-zk/lib/sumcheck/prover.h +59 -0
  263. data/vendor/longfellow-zk/lib/sumcheck/prover_layers.h +362 -0
  264. data/vendor/longfellow-zk/lib/sumcheck/quad.h +227 -0
  265. data/vendor/longfellow-zk/lib/sumcheck/quad_builder.h +211 -0
  266. data/vendor/longfellow-zk/lib/sumcheck/quad_test.cc +169 -0
  267. data/vendor/longfellow-zk/lib/sumcheck/sumcheck_test.cc +324 -0
  268. data/vendor/longfellow-zk/lib/sumcheck/testing.h +69 -0
  269. data/vendor/longfellow-zk/lib/sumcheck/transcript_sumcheck.h +85 -0
  270. data/vendor/longfellow-zk/lib/sumcheck/verifier.h +84 -0
  271. data/vendor/longfellow-zk/lib/sumcheck/verifier_layers.h +221 -0
  272. data/vendor/longfellow-zk/lib/testing/test_main.cc +50 -0
  273. data/vendor/longfellow-zk/lib/util/ceildiv.h +164 -0
  274. data/vendor/longfellow-zk/lib/util/ceildiv_test.cc +152 -0
  275. data/vendor/longfellow-zk/lib/util/crc64.h +45 -0
  276. data/vendor/longfellow-zk/lib/util/crypto.cc +39 -0
  277. data/vendor/longfellow-zk/lib/util/crypto.h +108 -0
  278. data/vendor/longfellow-zk/lib/util/log.cc +110 -0
  279. data/vendor/longfellow-zk/lib/util/log.h +33 -0
  280. data/vendor/longfellow-zk/lib/util/panic.h +40 -0
  281. data/vendor/longfellow-zk/lib/util/readbuffer.h +67 -0
  282. data/vendor/longfellow-zk/lib/util/serialization.h +54 -0
  283. data/vendor/longfellow-zk/lib/zk/zk_common.h +455 -0
  284. data/vendor/longfellow-zk/lib/zk/zk_proof.h +378 -0
  285. data/vendor/longfellow-zk/lib/zk/zk_prover.h +202 -0
  286. data/vendor/longfellow-zk/lib/zk/zk_test.cc +340 -0
  287. data/vendor/longfellow-zk/lib/zk/zk_testing.h +154 -0
  288. data/vendor/longfellow-zk/lib/zk/zk_verifier.h +109 -0
  289. metadata +347 -0
@@ -0,0 +1,163 @@
1
+ // Copyright 2026 Google LLC.
2
+ //
3
+ // Licensed under the Apache License, Version 2.0 (the "License");
4
+ // you may not use this file except in compliance with the License.
5
+ // You may obtain a copy of the License at
6
+ //
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
+ //
9
+ // Unless required by applicable law or agreed to in writing, software
10
+ // distributed under the License is distributed on an "AS IS" BASIS,
11
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ // See the License for the specific language governing permissions and
13
+ // limitations under the License.
14
+
15
+ #include "circuits/sha/flatsha256_witness.h"
16
+
17
+ #include <stddef.h>
18
+ #include <stdint.h>
19
+
20
+ #include "circuits/sha/sha256_constants.h"
21
+ #include "util/ceildiv.h"
22
+ #include "util/panic.h"
23
+
24
+ namespace proofs {
25
+
26
+ static inline uint32_t shr(uint32_t x, size_t b) { return (x >> b); }
27
+
28
+ static inline uint32_t rotr(uint32_t x, size_t b) {
29
+ return (x >> b) | (x << (32 - b));
30
+ }
31
+
32
+ static inline uint32_t Ch(uint32_t x, uint32_t y, uint32_t z) {
33
+ return (x & y) ^ (~x & z);
34
+ }
35
+
36
+ static inline uint32_t Maj(uint32_t x, uint32_t y, uint32_t z) {
37
+ return (x & y) ^ (x & z) ^ (y & z);
38
+ }
39
+
40
+ // See FIPS 180-4, section 4.1.2. Use the confusing Sigma/sigma terminology
41
+ // from that document.
42
+ static inline uint32_t Sigma0(uint32_t x) {
43
+ return rotr(x, 2) ^ rotr(x, 13) ^ rotr(x, 22);
44
+ }
45
+
46
+ static inline uint32_t Sigma1(uint32_t x) {
47
+ return rotr(x, 6) ^ rotr(x, 11) ^ rotr(x, 25);
48
+ }
49
+
50
+ static inline uint32_t sigma0(uint32_t x) {
51
+ return rotr(x, 7) ^ rotr(x, 18) ^ shr(x, 3);
52
+ }
53
+
54
+ static inline uint32_t sigma1(uint32_t x) {
55
+ return rotr(x, 17) ^ rotr(x, 19) ^ shr(x, 10);
56
+ }
57
+
58
+ uint32_t SHA256_ru32be(const uint8_t *d) {
59
+ uint32_t r = 0;
60
+ for (size_t i = 0; i < 4; ++i) {
61
+ r = (r << 8) + (d[i] & 0xffu);
62
+ }
63
+ return r;
64
+ }
65
+
66
+ void SHA256_wu64be(uint8_t *d, uint64_t n) {
67
+ for (size_t i = 0; i < 8; ++i) {
68
+ d[7 - i] = (n >> (8 * i)) & 0xffu;
69
+ }
70
+ }
71
+
72
+ void FlatSHA256Witness::transform_and_witness_block(
73
+ const uint32_t in[16], const uint32_t H0[8], uint32_t outw[48],
74
+ uint32_t oute[64], uint32_t outa[64], uint32_t H1[8]) {
75
+ uint32_t w[64];
76
+ for (size_t i = 0; i < 16; ++i) {
77
+ w[i] = in[i];
78
+ }
79
+
80
+ for (size_t i = 16; i < 64; ++i) {
81
+ outw[i - 16] = w[i] =
82
+ sigma1(w[i - 2]) + w[i - 7] + sigma0(w[i - 15]) + w[i - 16];
83
+ }
84
+
85
+ uint32_t a = H0[0];
86
+ uint32_t b = H0[1];
87
+ uint32_t c = H0[2];
88
+ uint32_t d = H0[3];
89
+ uint32_t e = H0[4];
90
+ uint32_t f = H0[5];
91
+ uint32_t g = H0[6];
92
+ uint32_t h = H0[7];
93
+
94
+ for (size_t t = 0; t < 64; ++t) {
95
+ uint32_t t1 = h + Sigma1(e) + Ch(e, f, g) + kSha256Round[t] + w[t];
96
+ uint32_t t2 = Sigma0(a) + Maj(a, b, c);
97
+ h = g;
98
+ g = f;
99
+ f = e;
100
+ oute[t] = e = d + t1;
101
+ d = c;
102
+ c = b;
103
+ b = a;
104
+ outa[t] = a = t1 + t2;
105
+ }
106
+
107
+ H1[0] = H0[0] + a;
108
+ H1[1] = H0[1] + b;
109
+ H1[2] = H0[2] + c;
110
+ H1[3] = H0[3] + d;
111
+ H1[4] = H0[4] + e;
112
+ H1[5] = H0[5] + f;
113
+ H1[6] = H0[6] + g;
114
+ H1[7] = H0[7] + h;
115
+ }
116
+
117
+ static const uint32_t initial_h0[8] = {0x6a09e667u, 0xbb67ae85u, 0x3c6ef372u,
118
+ 0xa54ff53au, 0x510e527fu, 0x9b05688cu,
119
+ 0x1f83d9abu, 0x5be0cd19u};
120
+
121
+ void FlatSHA256Witness::transform_and_witness_message(
122
+ size_t n, const uint8_t msg[/*n*/], size_t max, uint8_t &numb,
123
+ uint8_t in[/* 64*max */], BlockWitness bw[/*max*/]) {
124
+ // Compute the exact number of blocks needed for hashing.
125
+ numb = ceildiv<size_t>(n + 9, 64);
126
+
127
+ size_t ii = 0;
128
+ for (size_t i = 0; i < n; ++i, ++ii) {
129
+ in[ii] = msg[i];
130
+ }
131
+ in[ii++] = 0x80;
132
+ if ((ii % 64) == 0 || (ii % 64) > 56) {
133
+ while (ii % 64) {
134
+ in[ii++] = 0;
135
+ }
136
+ }
137
+ while ((ii % 64) < 56) {
138
+ in[ii++] = 0;
139
+ }
140
+ SHA256_wu64be(&in[ii], n * 8);
141
+ ii += 8;
142
+ check(ii % 64 == 0, "Invalid padding");
143
+
144
+ // Pad to end.
145
+ while (ii < 64 * max) {
146
+ in[ii++] = 0;
147
+ }
148
+
149
+ // Compute all of the intermediate hashes and witnesses.
150
+ uint32_t data[16];
151
+ const uint32_t *H = initial_h0;
152
+ for (size_t bl = 0; bl < max; bl++) {
153
+ for (size_t i = 0; i < 16; ++i) {
154
+ data[i] = SHA256_ru32be(&in[bl * 64 + i * 4]);
155
+ }
156
+
157
+ transform_and_witness_block(data, H, bw[bl].outw, bw[bl].oute, bw[bl].outa,
158
+ bw[bl].h1);
159
+ H = bw[bl].h1;
160
+ }
161
+ }
162
+
163
+ } // namespace proofs
@@ -0,0 +1,47 @@
1
+ // Copyright 2026 Google LLC.
2
+ //
3
+ // Licensed under the Apache License, Version 2.0 (the "License");
4
+ // you may not use this file except in compliance with the License.
5
+ // You may obtain a copy of the License at
6
+ //
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
+ //
9
+ // Unless required by applicable law or agreed to in writing, software
10
+ // distributed under the License is distributed on an "AS IS" BASIS,
11
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ // See the License for the specific language governing permissions and
13
+ // limitations under the License.
14
+
15
+ #ifndef PRIVACY_PROOFS_ZK_LIB_CIRCUITS_SHA_FLATSHA256_WITNESS_H_
16
+ #define PRIVACY_PROOFS_ZK_LIB_CIRCUITS_SHA_FLATSHA256_WITNESS_H_
17
+
18
+ #include <stddef.h>
19
+ #include <stdint.h>
20
+
21
+ namespace proofs {
22
+
23
+ uint32_t SHA256_ru32be(const uint8_t *d);
24
+
25
+ class FlatSHA256Witness {
26
+ public:
27
+ struct BlockWitness {
28
+ uint32_t outw[48];
29
+ uint32_t oute[64];
30
+ uint32_t outa[64];
31
+ uint32_t h1[8];
32
+ };
33
+
34
+ static void transform_and_witness_block(const uint32_t in[16],
35
+ const uint32_t H0[8],
36
+ uint32_t outw[48], uint32_t oute[64],
37
+ uint32_t outa[64], uint32_t H1[8]);
38
+
39
+ static void transform_and_witness_message(size_t n, const uint8_t msg[/*n*/],
40
+ size_t max, uint8_t &numb,
41
+ uint8_t in[/* 64*max */],
42
+ BlockWitness bw[/*max*/]);
43
+ };
44
+
45
+ } // namespace proofs
46
+
47
+ #endif // PRIVACY_PROOFS_ZK_LIB_CIRCUITS_SHA_FLATSHA256_WITNESS_H_
@@ -0,0 +1,34 @@
1
+ // Copyright 2026 Google LLC.
2
+ //
3
+ // Licensed under the Apache License, Version 2.0 (the "License");
4
+ // you may not use this file except in compliance with the License.
5
+ // You may obtain a copy of the License at
6
+ //
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
+ //
9
+ // Unless required by applicable law or agreed to in writing, software
10
+ // distributed under the License is distributed on an "AS IS" BASIS,
11
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ // See the License for the specific language governing permissions and
13
+ // limitations under the License.
14
+
15
+ #include "circuits/sha/sha256_constants.h"
16
+
17
+ namespace proofs {
18
+
19
+ #include <cstdint>
20
+
21
+ const uint32_t kSha256Round[64] = {
22
+ 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1,
23
+ 0x923f82a4, 0xab1c5ed5, 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3,
24
+ 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174, 0xe49b69c1, 0xefbe4786,
25
+ 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da,
26
+ 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147,
27
+ 0x06ca6351, 0x14292967, 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13,
28
+ 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85, 0xa2bfe8a1, 0xa81a664b,
29
+ 0xc24b8b70, 0xc76c51a3, 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070,
30
+ 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a,
31
+ 0x5b9cca4f, 0x682e6ff3, 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208,
32
+ 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2};
33
+
34
+ } // namespace proofs
@@ -0,0 +1,27 @@
1
+ // Copyright 2026 Google LLC.
2
+ //
3
+ // Licensed under the Apache License, Version 2.0 (the "License");
4
+ // you may not use this file except in compliance with the License.
5
+ // You may obtain a copy of the License at
6
+ //
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
+ //
9
+ // Unless required by applicable law or agreed to in writing, software
10
+ // distributed under the License is distributed on an "AS IS" BASIS,
11
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ // See the License for the specific language governing permissions and
13
+ // limitations under the License.
14
+
15
+ #ifndef PRIVACY_PROOFS_ZK_LIB_CIRCUITS_SHA_SHA256_CONSTANTS_H_
16
+ #define PRIVACY_PROOFS_ZK_LIB_CIRCUITS_SHA_SHA256_CONSTANTS_H_
17
+
18
+ #include <cstdint>
19
+
20
+ namespace proofs {
21
+
22
+ // Array of round constants used to define SHA256.
23
+ // See FIPS 180-4, section 4.2.2.
24
+ extern const uint32_t kSha256Round[64];
25
+
26
+ } // namespace proofs
27
+ #endif // PRIVACY_PROOFS_ZK_LIB_CIRCUITS_SHA_SHA256_CONSTANTS_H_
@@ -0,0 +1,389 @@
1
+ // Copyright 2026 Google LLC.
2
+ //
3
+ // Licensed under the Apache License, Version 2.0 (the "License");
4
+ // you may not use this file except in compliance with the License.
5
+ // You may obtain a copy of the License at
6
+ //
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
+ //
9
+ // Unless required by applicable law or agreed to in writing, software
10
+ // distributed under the License is distributed on an "AS IS" BASIS,
11
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ // See the License for the specific language governing permissions and
13
+ // limitations under the License.
14
+
15
+ #ifndef PRIVACY_PROOFS_ZK_LIB_CIRCUITS_SHA_SHA256_TEST_VALUES_H_
16
+ #define PRIVACY_PROOFS_ZK_LIB_CIRCUITS_SHA_SHA256_TEST_VALUES_H_
17
+
18
+ #include <stdint.h>
19
+ #include <stdlib.h>
20
+ #include <sys/types.h>
21
+
22
+ namespace proofs {
23
+
24
+ struct sha256_testvec {
25
+ const char* str;
26
+ size_t len;
27
+ uint8_t hash[32];
28
+ };
29
+
30
+ // A set of SHA256 test vectors used to verify the circuit implementation.
31
+ static const struct sha256_testvec SHA256_TV[] = {
32
+ {"", 0, {0xe3, 0xb0, 0xc4, 0x42, 0x98, 0xfc, 0x1c, 0x14, 0x9a, 0xfb, 0xf4,
33
+ 0xc8, 0x99, 0x6f, 0xb9, 0x24, 0x27, 0xae, 0x41, 0xe4, 0x64, 0x9b,
34
+ 0x93, 0x4c, 0xa4, 0x95, 0x99, 0x1b, 0x78, 0x52, 0xb8, 0x55}},
35
+ {"abc", 3, {0xba, 0x78, 0x16, 0xbf, 0x8f, 0x01, 0xcf, 0xea,
36
+ 0x41, 0x41, 0x40, 0xde, 0x5d, 0xae, 0x22, 0x23,
37
+ 0xb0, 0x03, 0x61, 0xa3, 0x96, 0x17, 0x7a, 0x9c,
38
+ 0xb4, 0x10, 0xff, 0x61, 0xf2, 0x00, 0x15, 0xad}},
39
+ {"abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
40
+ 56,
41
+ {0x24, 0x8d, 0x6a, 0x61, 0xd2, 0x06, 0x38, 0xb8, 0xe5, 0xc0, 0x26,
42
+ 0x93, 0x0c, 0x3e, 0x60, 0x39, 0xa3, 0x3c, 0xe4, 0x59, 0x64, 0xff,
43
+ 0x21, 0x67, 0xf6, 0xec, 0xed, 0xd4, 0x19, 0xdb, 0x06, 0xc1}},
44
+ {"abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhijklmnoijklmno"
45
+ "pjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu",
46
+ 112,
47
+ {0xcf, 0x5b, 0x16, 0xa7, 0x78, 0xaf, 0x83, 0x80, 0x03, 0x6c, 0xe5,
48
+ 0x9e, 0x7b, 0x04, 0x92, 0x37, 0x0b, 0x24, 0x9b, 0x11, 0xe8, 0xf0,
49
+ 0x7a, 0x51, 0xaf, 0xac, 0x45, 0x03, 0x7a, 0xfe, 0xe9, 0xd1}},
50
+ {"D818590293A66776657273696F6E63312E306F646967657374416C676F726974686D67534"
51
+ "8412D32353667646F6354797065756F72672E69736F2E31383031332E352E312E6D444C6C"
52
+ "76616C756544696765737473A2716F72672E69736F2E31383031332E352E31A3005820CF9"
53
+ "C1CB89584BF8C4176A37C2C954A8DC56077D3BA65EE44011E62AB7C63CE2D0158202F00C7"
54
+ "0D5FA9867D7BD2207E0D0B87E35A9AC962A8DE36EE1BE3944B63B39141025820EA9C0339A"
55
+ "AF9BAE8",
56
+ 372,
57
+ {0xc7, 0xce, 0x90, 0x99, 0xbd, 0xb6, 0x41, 0x75, 0x02, 0xb7, 0x3e,
58
+ 0x44, 0xc9, 0x82, 0x7c, 0xd2, 0x95, 0x6c, 0x54, 0x11, 0x0a, 0x39,
59
+ 0xb2, 0x60, 0x67, 0xfb, 0xf7, 0x9f, 0xf8, 0x9b, 0x20, 0xee}},
60
+
61
+ // test boundary conditions for padding
62
+ // 55 a's
63
+ {"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
64
+ 55,
65
+ {0x9f, 0x43, 0x90, 0xf8, 0xd3, 0x0c, 0x2d, 0xd9, 0x2e, 0xc9, 0xf0,
66
+ 0x95, 0xb6, 0x5e, 0x2b, 0x9a, 0xe9, 0xb0, 0xa9, 0x25, 0xa5, 0x25,
67
+ 0x8e, 0x24, 0x1c, 0x9f, 0x1e, 0x91, 0x0f, 0x73, 0x43, 0x18}},
68
+ // 56 a's
69
+ {"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
70
+ 56,
71
+ {0xb3, 0x54, 0x39, 0xa4, 0xac, 0x6f, 0x09, 0x48, 0xb6, 0xd6, 0xf9,
72
+ 0xe3, 0xc6, 0xaf, 0x0f, 0x5f, 0x59, 0x0c, 0xe2, 0x0f, 0x1b, 0xde,
73
+ 0x70, 0x90, 0xef, 0x79, 0x70, 0x68, 0x6e, 0xc6, 0x73, 0x8a}},
74
+ // 57 a's
75
+ {"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
76
+ 57,
77
+ {0xf1, 0x3b, 0x2d, 0x72, 0x46, 0x59, 0xeb, 0x3b, 0xf4, 0x7f, 0x2d,
78
+ 0xd6, 0xaf, 0x1a, 0xcc, 0xc8, 0x7b, 0x81, 0xf0, 0x9f, 0x59, 0xf2,
79
+ 0xb7, 0x5e, 0x5c, 0x0b, 0xed, 0x65, 0x89, 0xdf, 0xe8, 0xc6}},
80
+ {"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
81
+ 63,
82
+ {0x7d, 0x3e, 0x74, 0xa0, 0x5d, 0x7d, 0xb1, 0x5b, 0xce, 0x4a, 0xd9,
83
+ 0xec, 0x06, 0x58, 0xea, 0x98, 0xe3, 0xf0, 0x6e, 0xee, 0xcf, 0x16,
84
+ 0xb4, 0xc6, 0xff, 0xf2, 0xda, 0x45, 0x7d, 0xdc, 0x2f, 0x34}},
85
+ {"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
86
+ 64,
87
+ {0xff, 0xe0, 0x54, 0xfe, 0x7a, 0xe0, 0xcb, 0x6d, 0xc6, 0x5c, 0x3a,
88
+ 0xf9, 0xb6, 0x1d, 0x52, 0x09, 0xf4, 0x39, 0x85, 0x1d, 0xb4, 0x3d,
89
+ 0x0b, 0xa5, 0x99, 0x73, 0x37, 0xdf, 0x15, 0x46, 0x68, 0xeb}},
90
+ {"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
91
+ 65,
92
+ {0x63, 0x53, 0x61, 0xc4, 0x8b, 0xb9, 0xea, 0xb1, 0x41, 0x98, 0xe7,
93
+ 0x6e, 0xa8, 0xab, 0x7f, 0x1a, 0x41, 0x68, 0x5d, 0x6a, 0xd6, 0x2a,
94
+ 0xa9, 0x14, 0x6d, 0x30, 0x1d, 0x4f, 0x17, 0xeb, 0x0a, 0xe0}},
95
+ {"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
96
+ 66,
97
+ {0xac, 0x13, 0x7f, 0xce, 0x49, 0x83, 0x7c, 0x7c, 0x29, 0x45, 0xf6,
98
+ 0x16, 0x0d, 0x3c, 0x0e, 0x67, 0x9e, 0x6f, 0x40, 0x07, 0x08, 0x50,
99
+ 0x42, 0x0a, 0x22, 0xbc, 0x10, 0xe0, 0x69, 0x2c, 0xbd, 0xc7}},
100
+ // 2 block boundary conditions
101
+ {"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbb"
102
+ "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
103
+ 118,
104
+ {0x16, 0x1f, 0x88, 0x3d, 0xfb, 0x71, 0x6c, 0x8a, 0xcf, 0x49, 0x6c,
105
+ 0x04, 0x78, 0x8d, 0x42, 0xf8, 0x0c, 0xe2, 0x21, 0x50, 0x4a, 0xfa,
106
+ 0x81, 0x63, 0xc0, 0xe7, 0x3b, 0x11, 0xb5, 0xd2, 0x5f, 0xd0}},
107
+ {"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbb"
108
+ "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbc",
109
+ 119,
110
+ {0x6c, 0x17, 0x1b, 0xd6, 0x6a, 0x89, 0x03, 0x44, 0xee, 0x32, 0xde,
111
+ 0x77, 0xe9, 0xdb, 0x13, 0xc0, 0x18, 0x23, 0xac, 0x16, 0xc6, 0xf4,
112
+ 0x76, 0x67, 0x69, 0xd8, 0xa3, 0xf4, 0x91, 0x27, 0xda, 0x98}},
113
+ {"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbb"
114
+ "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbcccccccc",
115
+ 126,
116
+ {0x8c, 0xfb, 0x31, 0xd1, 0x1d, 0xd7, 0x6e, 0xfb, 0x8c, 0x70, 0x38,
117
+ 0xa5, 0x09, 0xb9, 0x80, 0x69, 0xbb, 0xb7, 0xa6, 0x04, 0x67, 0x55,
118
+ 0xc5, 0x5b, 0x10, 0x83, 0x9e, 0xd8, 0x72, 0x39, 0x9b, 0x9c}},
119
+ {"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbb"
120
+ "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbccccccccd",
121
+ 127,
122
+ {0xf4, 0xaf, 0x59, 0x2b, 0xd9, 0x85, 0xc2, 0x48, 0x66, 0x64, 0x61,
123
+ 0x9a, 0xff, 0xd7, 0xf6, 0xe1, 0x97, 0x8d, 0x9b, 0x24, 0x01, 0x7c,
124
+ 0xe8, 0x63, 0x82, 0x83, 0x62, 0xa1, 0xcd, 0xcd, 0x33, 0xfc}},
125
+ {"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbb"
126
+ "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbccccccccdd",
127
+ 128,
128
+ {0xdb, 0x2c, 0x2b, 0xe4, 0xf8, 0x50, 0xcf, 0xd4, 0x2d, 0xce, 0x67,
129
+ 0x8b, 0xe2, 0x63, 0xa9, 0xbb, 0x74, 0x26, 0xf6, 0xbf, 0x39, 0x12,
130
+ 0x8e, 0x9e, 0x75, 0xd3, 0xa3, 0xbd, 0x02, 0x31, 0x64, 0x9a}},
131
+ {"\x00", 1, {0x6e, 0x34, 0x0b, 0x9c, 0xff, 0xb3, 0x7a, 0x98,
132
+ 0x9c, 0xa5, 0x44, 0xe6, 0xbb, 0x78, 0x0a, 0x2c,
133
+ 0x78, 0x90, 0x1d, 0x3f, 0xb3, 0x37, 0x38, 0x76,
134
+ 0x85, 0x11, 0xa3, 0x06, 0x17, 0xaf, 0xa0, 0x1d}},
135
+ {"\x00\x01", 2, {0xb4, 0x13, 0xf4, 0x7d, 0x13, 0xee, 0x2f, 0xe6,
136
+ 0xc8, 0x45, 0xb2, 0xee, 0x14, 0x1a, 0xf8, 0x1d,
137
+ 0xe8, 0x58, 0xdf, 0x4e, 0xc5, 0x49, 0xa5, 0x8b,
138
+ 0x79, 0x70, 0xbb, 0x96, 0x64, 0x5b, 0xc8, 0xd2}},
139
+ {"\x00\x01\x02", 3, {0xae, 0x4b, 0x32, 0x80, 0xe5, 0x6e, 0x2f, 0xaf,
140
+ 0x83, 0xf4, 0x14, 0xa6, 0xe3, 0xda, 0xbe, 0x9d,
141
+ 0x5f, 0xbe, 0x18, 0x97, 0x65, 0x44, 0xc0, 0x5f,
142
+ 0xed, 0x12, 0x1a, 0xcc, 0xb8, 0x5b, 0x53, 0xfc}},
143
+ {"\x00\x01\x02\x03", 4, {0x05, 0x4e, 0xde, 0xc1, 0xd0, 0x21, 0x1f, 0x62,
144
+ 0x4f, 0xed, 0x0c, 0xbc, 0xa9, 0xd4, 0xf9, 0x40,
145
+ 0x0b, 0x0e, 0x49, 0x1c, 0x43, 0x74, 0x2a, 0xf2,
146
+ 0xc5, 0xb0, 0xab, 0xeb, 0xf0, 0xc9, 0x90, 0xd8}},
147
+ };
148
+
149
+ // Sample input-output pairs for the block transform.
150
+ struct SHA256BlockTests {
151
+ uint32_t input[16];
152
+ uint32_t h[8];
153
+ uint32_t want[8];
154
+ };
155
+
156
+ static const struct SHA256BlockTests kSha_bt_[] = {
157
+ {
158
+ {
159
+ 0,
160
+ 0xdeadbeef,
161
+ 0xbd5b7dde,
162
+ 0x9c093ccd,
163
+ 0x7ab6fbbc,
164
+ 0x5964baab,
165
+ 0x3812799a,
166
+ 0x16c03889,
167
+ 0xf56df778,
168
+ 0xd41bb667,
169
+ 0xb2c97556,
170
+ 0x91773445,
171
+ 0x7024f334,
172
+ 0x4ed2b223,
173
+ 0x2d807112,
174
+ 0xc2e3001,
175
+ },
176
+ {0, 0xabadcafe, 0x575b95fc, 0x30960fa, 0xaeb72bf8, 0x5a64f6f6,
177
+ 0x612c1f4, 0xb1c08cf2},
178
+ {
179
+ 0x656f967b,
180
+ 0x508cb605,
181
+ 0x109902c5,
182
+ 0xbe9909c,
183
+ 0x30ed1bc6,
184
+ 0x8d3bb28c,
185
+ 0x836c99a8,
186
+ 0x30731a12,
187
+ },
188
+ },
189
+ {
190
+ {
191
+ 0x7,
192
+ 0xe,
193
+ 0x15,
194
+ 0x1c,
195
+ 0x23,
196
+ 0x2a,
197
+ 0x31,
198
+ 0x38,
199
+ 0x3f,
200
+ 0x46,
201
+ 0x4d,
202
+ 0x54,
203
+ 0x5b,
204
+ 0x62,
205
+ 0x69,
206
+ 0x70,
207
+ },
208
+ {0x0, 0x13, 0x26, 0x39, 0x4c, 0x5f, 0x72, 0x85},
209
+ {
210
+ 0x95ddd507,
211
+ 0x1a7a4b1f,
212
+ 0xf5951676,
213
+ 0x105a25a3,
214
+ 0x511cee03,
215
+ 0xd0972a96,
216
+ 0xb1cb76d7,
217
+ 0xf9f46d72,
218
+ },
219
+ },
220
+ {
221
+ {
222
+ 0xf0cee5d1,
223
+ 0x615dfa6a,
224
+ 0xbda82adf,
225
+ 0xcb66fb25,
226
+ 0x30d60637,
227
+ 0xb1018af9,
228
+ 0x2c5c0e06,
229
+ 0xb0556e74,
230
+ 0xf8e2da1f,
231
+ 0xf05b699b,
232
+ 0xabbf6d16,
233
+ 0x3377e5ad,
234
+ 0x46d8cd9e,
235
+ 0xcc01d8dd,
236
+ 0x5532a535,
237
+ 0x34e928ea,
238
+ },
239
+ {
240
+ 0x515f007c,
241
+ 0x5bd062c2,
242
+ 0x12200854,
243
+ 0x4db127f8,
244
+ 0x216231b,
245
+ 0x1f16e9e8,
246
+ 0x1190cde7,
247
+ 0x66ef438d,
248
+ },
249
+ {
250
+ 0x3a3995a,
251
+ 0xb55e568e,
252
+ 0x5fb4b933,
253
+ 0x97c9e9c0,
254
+ 0xaea7d67c,
255
+ 0xaee17ae4,
256
+ 0xcfffacb8,
257
+ 0x91d6ab5e,
258
+ },
259
+ }};
260
+
261
+ // Output values for SHA256(a^k) for various values of k used in the
262
+ // benchmarking results.
263
+ struct sha256_bench {
264
+ size_t len;
265
+ uint8_t hash[32];
266
+ };
267
+
268
+ static const struct sha256_bench kSha_benchmark_[] = {
269
+ {50, {0x16, 0x0b, 0x4e, 0x43, 0x3e, 0x38, 0x4e, 0x05, 0xe5, 0x37, 0xdc,
270
+ 0x59, 0xb4, 0x67, 0xf7, 0xcb, 0x24, 0x03, 0xf0, 0x21, 0x4d, 0xb1,
271
+ 0x5c, 0x5d, 0xb5, 0x88, 0x62, 0xa3, 0xf1, 0x15, 0x6d, 0x2e}},
272
+ {114, {0x6c, 0xb7, 0x50, 0xb2, 0x18, 0x16, 0x06, 0x51, 0x1f, 0x4a, 0x7e,
273
+ 0x47, 0x86, 0xb5, 0x36, 0x92, 0xf5, 0x1a, 0x9c, 0xdc, 0x4d, 0x31,
274
+ 0x72, 0xfd, 0xcf, 0xb9, 0x26, 0x7a, 0xec, 0xa7, 0xe4, 0xe4}},
275
+ {178, {0xca, 0xad, 0x4b, 0x2f, 0xbb, 0x83, 0x0f, 0xa5, 0x40, 0x02, 0xa1,
276
+ 0x67, 0x5f, 0x15, 0x99, 0xd9, 0xb0, 0x92, 0xcd, 0x39, 0x8a, 0xd6,
277
+ 0xfb, 0xb8, 0x16, 0xbf, 0xe8, 0xf9, 0x48, 0xcd, 0xd6, 0x20}},
278
+ {242, {0x8f, 0xde, 0xd5, 0x9c, 0x42, 0x7b, 0x2e, 0x68, 0x09, 0xc8, 0x10,
279
+ 0x91, 0x5a, 0xac, 0xa9, 0x63, 0x57, 0x32, 0xa1, 0xde, 0xcc, 0x4b,
280
+ 0xa2, 0xac, 0x8e, 0x0a, 0x1d, 0x90, 0xfc, 0x10, 0x92, 0xc9}},
281
+ {306, {0x4c, 0xef, 0xdb, 0xa1, 0xba, 0x8d, 0x39, 0x75, 0xf3, 0x2c, 0xba,
282
+ 0xc9, 0xf2, 0x27, 0xc7, 0xe6, 0xb6, 0xe6, 0x63, 0x43, 0x9e, 0x79,
283
+ 0x85, 0x61, 0x6b, 0xbb, 0x5c, 0x61, 0x82, 0x4d, 0xbb, 0x0c}},
284
+ {370, {0x27, 0xdd, 0xc5, 0x8e, 0xcc, 0x58, 0xfd, 0x86, 0x93, 0x37, 0x48,
285
+ 0x1a, 0xf7, 0x73, 0x02, 0xd5, 0x4d, 0xd5, 0xba, 0x91, 0x84, 0x21,
286
+ 0x44, 0xf8, 0x7d, 0xeb, 0x83, 0x24, 0x09, 0x06, 0x9d, 0x0b}},
287
+ {434, {0xd9, 0x67, 0xcc, 0x55, 0x05, 0x9d, 0x00, 0x82, 0xb6, 0xb2, 0x47,
288
+ 0xd2, 0xa7, 0xd7, 0xfb, 0x79, 0xb7, 0xdd, 0xed, 0xa9, 0x7b, 0xe5,
289
+ 0x92, 0x7d, 0xf4, 0x0c, 0xf9, 0x64, 0x2c, 0xee, 0xc6, 0xd3}},
290
+ {498, {0x40, 0x47, 0x02, 0x9c, 0x99, 0xeb, 0x4e, 0xf6, 0x39, 0x25, 0x9b,
291
+ 0x2e, 0xe3, 0xc8, 0xde, 0xb4, 0x40, 0x90, 0x86, 0xc8, 0x1d, 0xe1,
292
+ 0xcd, 0xab, 0x00, 0x53, 0xbb, 0xcc, 0x08, 0x84, 0xe4, 0x1e}},
293
+ {562, {0x3e, 0x47, 0xed, 0x99, 0x0d, 0x31, 0xf0, 0xfe, 0xb0, 0xa7, 0x77,
294
+ 0x1c, 0x72, 0xd1, 0x32, 0x0f, 0xad, 0x55, 0x58, 0x14, 0xf7, 0x81,
295
+ 0x95, 0x6e, 0xfc, 0x89, 0xda, 0x88, 0x4f, 0xf6, 0x3d, 0x40}},
296
+ {626, {0xc6, 0x20, 0x91, 0x3d, 0xad, 0x86, 0x0a, 0x2a, 0x77, 0x3d, 0x9d,
297
+ 0x56, 0x0c, 0x2c, 0xed, 0x25, 0x03, 0xf6, 0xf9, 0xe2, 0xc5, 0x5c,
298
+ 0xcd, 0x65, 0x08, 0x3b, 0xf0, 0x53, 0x2d, 0x60, 0x62, 0x61}},
299
+ {690, {0x21, 0x8d, 0xb2, 0x31, 0x17, 0xd4, 0x98, 0x63, 0x1b, 0xfc, 0x22,
300
+ 0x96, 0x49, 0x9a, 0xb2, 0x7e, 0x07, 0x2c, 0xce, 0xf4, 0xfa, 0xea,
301
+ 0xca, 0x63, 0xe5, 0xa2, 0xec, 0xcc, 0x7e, 0x22, 0xf4, 0xac}},
302
+ {754, {0x29, 0x2c, 0x65, 0x83, 0xeb, 0xe8, 0x2f, 0xee, 0xec, 0xed, 0x13,
303
+ 0xa8, 0x6b, 0xdb, 0x83, 0x8a, 0x15, 0xaf, 0xcc, 0x5b, 0xf4, 0x7f,
304
+ 0x2a, 0xcf, 0x51, 0x51, 0x50, 0x7e, 0xae, 0x03, 0xd7, 0x7c}},
305
+ {818, {0x5f, 0x99, 0x78, 0x83, 0x81, 0x11, 0x36, 0x98, 0x23, 0x16, 0x54,
306
+ 0xd9, 0x80, 0xfc, 0x73, 0x8d, 0x8e, 0x19, 0x11, 0xc6, 0xa3, 0x0d,
307
+ 0xe8, 0xcb, 0x33, 0xa2, 0x9e, 0xf7, 0xc1, 0xed, 0xc3, 0x19}},
308
+ {882, {0x5f, 0x2e, 0xb1, 0xec, 0x0f, 0xd7, 0x93, 0x76, 0xc4, 0x8a, 0xfc,
309
+ 0x9c, 0x15, 0xd1, 0x98, 0x64, 0x94, 0x20, 0x5f, 0x69, 0x08, 0x36,
310
+ 0x43, 0xb9, 0xd6, 0x9a, 0x05, 0x85, 0xf4, 0xfb, 0xdc, 0x5f}},
311
+ {946, {0xe8, 0x06, 0x78, 0xdf, 0xad, 0xb0, 0x70, 0x4e, 0x5e, 0x68, 0x4a,
312
+ 0xda, 0x0b, 0x0b, 0xe7, 0xac, 0x2f, 0x22, 0x54, 0x7f, 0x13, 0x04,
313
+ 0xfe, 0x9a, 0xb4, 0xaa, 0xa7, 0x30, 0xd9, 0x90, 0x9a, 0x3a}},
314
+ {1010, {0x69, 0x4d, 0x24, 0xc6, 0x82, 0x83, 0xb9, 0x9a, 0xd5, 0xee, 0x5c,
315
+ 0xea, 0xa3, 0x5d, 0x9d, 0xe4, 0xdd, 0x55, 0x45, 0xdd, 0x7a, 0x38,
316
+ 0x5f, 0x4b, 0x18, 0xfa, 0x85, 0xb2, 0xdc, 0x6d, 0xe2, 0xba}},
317
+ {1074, {0x55, 0xd2, 0xfe, 0x88, 0x80, 0x0f, 0x6b, 0xcb, 0xe7, 0xce, 0xa2,
318
+ 0x98, 0xf4, 0x88, 0xa7, 0xc8, 0x41, 0xd4, 0x03, 0x9f, 0x3f, 0xf3,
319
+ 0xf0, 0xc6, 0xea, 0x2f, 0xa5, 0x40, 0x84, 0xf4, 0xa0, 0xdf}},
320
+ {1138, {0xa3, 0x38, 0x31, 0x67, 0x79, 0x4a, 0x75, 0x6d, 0x88, 0x9a, 0x7a,
321
+ 0x99, 0xf4, 0x15, 0x79, 0x4d, 0xe9, 0xdf, 0xeb, 0x21, 0x67, 0x2c,
322
+ 0xd1, 0x04, 0x41, 0xcf, 0xfd, 0x93, 0xdb, 0xd8, 0x20, 0x5a}},
323
+ {1202, {0xdb, 0xb3, 0x3f, 0x50, 0xf1, 0xc7, 0xb1, 0xd9, 0x28, 0x63, 0x2f,
324
+ 0x81, 0x35, 0x08, 0x6a, 0x58, 0xc2, 0x6a, 0x66, 0x55, 0x3b, 0xd2,
325
+ 0x27, 0x7e, 0x4f, 0x9a, 0x5f, 0x00, 0x61, 0xc6, 0xcc, 0x25}},
326
+ {1266, {0xeb, 0xdd, 0x77, 0xc4, 0x04, 0x96, 0xa9, 0xeb, 0x3f, 0xf9, 0x24,
327
+ 0xf4, 0xcf, 0xb5, 0x4e, 0xee, 0xb2, 0xc6, 0xf5, 0x04, 0x26, 0xb1,
328
+ 0xca, 0x2f, 0xd4, 0xd9, 0x72, 0x83, 0xd8, 0x49, 0x72, 0xce}},
329
+ {1330, {0x05, 0x3b, 0xbf, 0x41, 0xf3, 0x3d, 0xad, 0x63, 0x5a, 0x69, 0x03,
330
+ 0xca, 0x32, 0x8f, 0x2e, 0xfd, 0x98, 0x87, 0x70, 0x2a, 0x3e, 0x02,
331
+ 0x1e, 0x6a, 0xac, 0x55, 0x9c, 0x53, 0x53, 0xec, 0x43, 0x41}},
332
+ {1394, {0xf2, 0xda, 0xba, 0x28, 0x4a, 0x48, 0xf7, 0xc6, 0x8f, 0x72, 0x9a,
333
+ 0x17, 0x2b, 0x26, 0x3a, 0xaf, 0x97, 0xd8, 0x0c, 0x57, 0xab, 0xba,
334
+ 0x9b, 0xec, 0xa6, 0x75, 0xb9, 0x4c, 0xcb, 0x6e, 0x9d, 0xa7}},
335
+ {1458, {0x20, 0x2f, 0x4f, 0x63, 0xe9, 0x31, 0x90, 0x1a, 0xe1, 0xcb, 0x8d,
336
+ 0x42, 0x1d, 0x16, 0x9b, 0x12, 0x78, 0x2a, 0x58, 0x51, 0xca, 0x49,
337
+ 0x73, 0x72, 0xf4, 0xf4, 0x7c, 0x6f, 0xea, 0xc7, 0x61, 0x1d}},
338
+ {1522, {0xee, 0x97, 0x06, 0xa8, 0xbd, 0x8b, 0x8f, 0xbe, 0x96, 0xa9, 0xff,
339
+ 0x52, 0xb7, 0xc6, 0x36, 0x02, 0x80, 0x70, 0x5f, 0x74, 0xbe, 0x73,
340
+ 0xb8, 0x65, 0x5b, 0xdb, 0x8d, 0x56, 0x07, 0x61, 0xa7, 0xad}},
341
+ {1586, {0x60, 0xd6, 0x6a, 0xa2, 0x83, 0xbf, 0x1c, 0xed, 0x60, 0x6f, 0xa6,
342
+ 0x40, 0x73, 0xf4, 0x36, 0x3d, 0xed, 0x46, 0x92, 0x4e, 0x93, 0xbe,
343
+ 0x67, 0xb8, 0x19, 0x0b, 0x04, 0xa5, 0x70, 0xab, 0x4a, 0xb5}},
344
+ {1650, {0x93, 0x32, 0xff, 0xe0, 0x58, 0x84, 0xbf, 0x8f, 0xdd, 0x09, 0x2f,
345
+ 0x94, 0x43, 0x22, 0x57, 0x28, 0x4f, 0x9c, 0x23, 0x2a, 0x72, 0xe5,
346
+ 0xaa, 0x3b, 0x9b, 0x11, 0xda, 0xc4, 0x57, 0xe3, 0x46, 0x34}},
347
+ {1714, {0xd3, 0x47, 0xa1, 0xbe, 0xf9, 0xea, 0x05, 0x0d, 0xe5, 0x06, 0x2e,
348
+ 0x27, 0x86, 0x72, 0x7d, 0x2b, 0x4c, 0xcb, 0x60, 0x77, 0x7c, 0x82,
349
+ 0xf9, 0x7c, 0xd7, 0x58, 0xfa, 0x44, 0x27, 0x35, 0x51, 0x42}},
350
+ {1778, {0xdd, 0xf6, 0x34, 0x5e, 0x0e, 0xd2, 0x19, 0x75, 0x06, 0xac, 0x22,
351
+ 0x9f, 0x3b, 0x5f, 0x53, 0xe8, 0xc0, 0x44, 0x24, 0x1d, 0xf6, 0x52,
352
+ 0x72, 0x79, 0xdd, 0x08, 0xa1, 0x2c, 0xbf, 0x75, 0x9f, 0x5e}},
353
+ {1842, {0xd3, 0xc1, 0x90, 0xe9, 0x4b, 0x65, 0xd4, 0xd6, 0x87, 0xf4, 0xa0,
354
+ 0x14, 0xc6, 0x9a, 0x21, 0x93, 0x87, 0x64, 0x19, 0xcc, 0xa9, 0xa4,
355
+ 0x11, 0xf5, 0xdb, 0x10, 0x03, 0x29, 0xb2, 0x44, 0xe7, 0x98}},
356
+ {1906, {0x5a, 0x13, 0x1d, 0xa8, 0x27, 0xb8, 0x8a, 0x0e, 0x43, 0x40, 0x7b,
357
+ 0x2b, 0x61, 0x5a, 0x9b, 0x39, 0x1f, 0x80, 0xee, 0x45, 0xab, 0x70,
358
+ 0x55, 0x6c, 0x13, 0xa4, 0x72, 0xe2, 0xa6, 0xf5, 0x79, 0xb3}},
359
+ {1970, {0x36, 0xaf, 0x67, 0x22, 0xf2, 0xf8, 0x6f, 0x99, 0x3d, 0x5f, 0x36,
360
+ 0x02, 0xc3, 0x1f, 0x3d, 0xea, 0xbd, 0x34, 0xdc, 0xf1, 0xe4, 0xe4,
361
+ 0x78, 0x73, 0x05, 0x20, 0xea, 0xec, 0xf8, 0x71, 0x76, 0xac}},
362
+ {2034, {0xad, 0x21, 0x5f, 0x13, 0xa8, 0xf7, 0x7d, 0xa1, 0xd0, 0x15, 0xc3,
363
+ 0x5a, 0xdd, 0xee, 0xf8, 0x08, 0x54, 0x79, 0x51, 0xa0, 0x1b, 0x06,
364
+ 0x58, 0x0d, 0x06, 0x31, 0x29, 0x3a, 0xab, 0x6b, 0x24, 0x31}},
365
+ {2098, {0x5b, 0xff, 0x21, 0x09, 0x0b, 0x8c, 0x80, 0xcf, 0xaf, 0x9c, 0xae,
366
+ 0x93, 0x11, 0x75, 0x05, 0x3e, 0xb2, 0x37, 0x9b, 0xa4, 0xe5, 0xd5,
367
+ 0xa1, 0x2a, 0x60, 0x7c, 0x55, 0x57, 0x72, 0x10, 0xf0, 0xb3}},
368
+ {2162, {0xad, 0x56, 0x0c, 0xd1, 0x7d, 0x76, 0x14, 0x5f, 0x19, 0x34, 0x14,
369
+ 0x78, 0x31, 0x88, 0x89, 0xdc, 0x35, 0x58, 0xb1, 0x83, 0xed, 0xd4,
370
+ 0x6a, 0x80, 0x07, 0x82, 0x93, 0xdf, 0x94, 0xd9, 0x35, 0x43}},
371
+ {2226, {0x49, 0x2d, 0x5a, 0x85, 0xfc, 0x33, 0x49, 0xc1, 0x01, 0x83, 0xb0,
372
+ 0x54, 0x80, 0x3c, 0x6d, 0x97, 0x52, 0x8d, 0xcf, 0x61, 0x5b, 0x7a,
373
+ 0x6f, 0xfa, 0x12, 0x97, 0xee, 0x46, 0x3b, 0x48, 0x0b, 0x08}},
374
+ {2290, {0x9b, 0xfc, 0x47, 0x6b, 0xc9, 0x7e, 0x17, 0x78, 0xd9, 0x20, 0x9f,
375
+ 0x8e, 0x1f, 0x5b, 0xa5, 0x79, 0x1d, 0xad, 0x62, 0xb0, 0x9d, 0xf2,
376
+ 0x45, 0x33, 0x17, 0x4e, 0xf6, 0x8f, 0x3a, 0x04, 0xfb, 0x11}},
377
+ {2354, {0x7a, 0xbb, 0x72, 0xe9, 0x1a, 0xb0, 0x42, 0x7d, 0xf0, 0x33, 0xaa,
378
+ 0xb7, 0x21, 0xaa, 0x8c, 0x0a, 0xd0, 0x73, 0xe7, 0xd0, 0xea, 0x03,
379
+ 0x40, 0x15, 0xda, 0x17, 0x9c, 0xe7, 0x85, 0xf1, 0x0e, 0x1e}},
380
+ {2418, {0x21, 0xc6, 0xcc, 0xdb, 0x95, 0x84, 0x53, 0x12, 0xe3, 0xc9, 0x35,
381
+ 0xff, 0xb8, 0xff, 0x69, 0xc2, 0x6e, 0x00, 0x4e, 0x9c, 0x10, 0x80,
382
+ 0xb0, 0x0d, 0x82, 0xfb, 0x17, 0x77, 0x98, 0x23, 0x52, 0x66}},
383
+ {2482, {0xda, 0x0f, 0x57, 0x79, 0x4d, 0x99, 0x1e, 0x88, 0xd7, 0x4e, 0x03,
384
+ 0x86, 0x63, 0x2a, 0xeb, 0x24, 0xc8, 0x60, 0xe8, 0xc7, 0xff, 0x62,
385
+ 0x5d, 0x5a, 0xd1, 0x20, 0x03, 0x0c, 0x78, 0xb5, 0xba, 0x62}}};
386
+
387
+ } // namespace proofs
388
+
389
+ #endif // PRIVACY_PROOFS_ZK_LIB_CIRCUITS_SHA_SHA256_TEST_VALUES_H_