From 5ca72805fb2af19d7617b53e4dbb2e16cc42e1ba Mon Sep 17 00:00:00 2001 From: Davide Galassi Date: Sat, 27 Jul 2024 13:37:17 +0200 Subject: [PATCH] Use Zcash SRS --- ...dersnatch_ed_sha512_ell2_ring_vectors.json | 14 +++---- ...ndersnatch_sw_sha512_tai_ring_vectors.json | 14 +++---- ...zcash-bls12-381-srs-2-11-uncompressed.bin} | Bin src/ring.rs | 36 ++++++++++-------- src/suites/bandersnatch.rs | 34 +++++++++++++++++ src/testing.rs | 4 +- 6 files changed, 71 insertions(+), 31 deletions(-) rename data/{zcash-srs-2-11-uncompressed.bin => zcash-bls12-381-srs-2-11-uncompressed.bin} (100%) diff --git a/data/bandersnatch_ed_sha512_ell2_ring_vectors.json b/data/bandersnatch_ed_sha512_ell2_ring_vectors.json index ed81f04..bcc0d60 100644 --- a/data/bandersnatch_ed_sha512_ell2_ring_vectors.json +++ b/data/bandersnatch_ed_sha512_ell2_ring_vectors.json @@ -14,7 +14,7 @@ "proof_ok": "647c218cec9610102b202bcf7d29bdbf91770c326f07586051fa40bee863b63e", "proof_s": "7f27df1375f1217c4a34fa57b61de6b1cf7b023e17298ed53071b8dd95c32818", "proof_sb": "1716ad8149314c978dc5f1ca626246166c50258225554eda646cc6d4b96e5e18", - "ring-proof": "b5855f0f547d09627d537e67669c7f997aedaf8d9ed32f044072207371dc5ab7ef894575c76be09d389d898266d1da3f8cbb71dc2217eb25ee5a88d847cd93f94664a9aafc6fd9bdda4c622089d775b164b0b7cceb7fbb9b3887edfb8a8def7f942b25514900d6319f3d3db90f48f896b613144f2344eaef8da58a07e5ccc2ec55154440ceeac43960f31cf98a407885b963db1318becad8d03e5156cda327232be0d1b10442302d272980f08a4aa126a7bb2fc86f4d153a02954bdb130a6e737660554269888eca6d51b86a7b251cde33545056f16996136cda126a54dccf22e791eed172bede3c310208d2abf0e93995b2c02d0fdb4eecc29d566b123cfb2d90f8e2069a0b52456ebaa46e3ac02d5317a6bcfb9c6d90c287f55422b1f1113fee605f7dd76d3342286b1b7294405026098a862b77610286659f248d2f08ca1a7c05516f1b3598be905d1fe53633d941fc1030e1e7349b53a27002af4547a8483cd99d3339aa5e352b2ad80c311a2c37cc0e1755fc2b23f4416f96922080c3383492e0ad4fd5696618c00b5e9ce99546cae9e1d5a5821c132d8971003bd65313aa07853c9f952e06977fc5c8ea4953f4e690916f28ccdfc1774a7a7ed8cf7cc57f70e70fcad27f4b5536a1701c9553288353a6ed038b107f6fda89923b3d1b025f3edca6fc259343ed29c0c1a5749930b922d0cef71b9a98894a9d76296881960118703e36d256be96a4672e28456b279f7ea46ee5ba2da87905ab25534edab3a0ac28d2d10537b4ba7fe24efd45a597342a1243cdb48badd927b4b90b215efdb8ae0c49b84107019b6494fec151b4b2" + "ring_proof": "8da7a0455ecd3ffb412576b1a14c7ed061df7da0adfb89c296a0d60e2a47a886171a72a90ab9684cce516c3a6b7579fc8885c963d5b8ee302ff675426f452b1fd3b1b463c814332956070952f4436c8746347a78824db3139f6704a0ee3daf45888bf79c51eb4245a3398b058b60a982742221d3d4469b8605a36d3dff71ad42561d8f78ff21164aac961aaff67db78b9086e342db0b8d70321c009a1a5d34528e50b50e200de4bea99b6f8d540701013d45a77c239a9bbc7999180568d4efcf55826fadad4e803db0791b0610d82903f98ae369149eb59c60318f11fb540f078fd9175dc2de37020962fd67823e7f1164461097bdfe0bbf66e7ca4e54925f3d9f13f5200c022d8f68133a5513b9c21870c8b482659582f087052d8245012057bfd75a4ed087216ee6d0ec402a8a8f57331aff828754dadb733be44e95476b67084b596474109fff11b335f36a131e2f91522aaaeade69845a7c2f1f3854006b7390029560204459b7b419f9f54026a1415527735c0d30f6e758438108b27330b6741dfdf5e730ec78da887c2507ae8cde182209471cf59ee15ff10a3097a3698cedcbcee13007a6b36fc6f3ed96fd42840d2cabc14919334ff81dd59b22e7b6fbd3fc49e09a492d8f33010debe417846de092f8500a2e54f28cf22f2eae768b7915d50fc3599977f2eba175d7ae3e018861b4dfbee95cd5e22bcf12c9ca0c7adc866787f70f70bc9a05febe682996ec5f0da2998a49f5ae2aa3c1031d20855595211be415f53c581481fc3981afbc0389cf867e73cf2525a6524013fd55912b234794d7c553c075ea4b4ba696bf9f0c" }, { "comment": "Bandersnatch_SHA-512_ELL2 - vector-2", @@ -31,7 +31,7 @@ "proof_ok": "83a9519edb8ecc4f360eee599c6c1310019c4c3451ca42b4887328e347003bdf", "proof_s": "13362d25281e988c02e24a1e639bdc2839bdcca7eb9eec1a4305c44f27dea104", "proof_sb": "fe20fa2d4ebfd45f414b3bea7eef827cc394d8ed04149ffb8232499f5b51b411", - "ring-proof": "97160a3d44229c05a26034119033878fcb7c833f7c15b963f6b85aacad4eef990d5cafd3c33f293b0cd72d8309f9e12e8cbb71dc2217eb25ee5a88d847cd93f94664a9aafc6fd9bdda4c622089d775b164b0b7cceb7fbb9b3887edfb8a8def7fb11ec5e164d08c3a826bb6bea3335de2772bc0f9e6c7e0d0404556043f2f794cfa8130a1d8ccdc02c1832cab581fe1c8a28db1a9ce4a31e0ced36510c8b84412d645a70794371cbe93864733c84bb77b695dab4c8ce9f0d91db14763746f617ce3a0b92ac579cadc188b93c8cbfd29051583e3b5f7744f84b2b774e8d21f370e6380a4d19f701d2b4c98bf05f766f478fbf255bcdcc7584ac96820746ea2d15b52835b49c7a04d3203410b835ff70b130a94a8f0f679bfa730e8d41b939e03672f11e4d89deb2d47f1094a96df6d898203e53e953b7caa44ce9e62d34a793c3dcb16dea25109fa0d02b1890b40c10edeb0fdd36944ee167c9ab9f47ba8e96a350cea3d3c3814b7be2046c6e1398a8eac972adc06b3ec11be79d6d2997409543a8f628a4643cc962a3643c7635cc411379f7bce98ae29b3bca36bc3e841ce883dae5cc8142f19d2f00678045fe3e307000c24fb9b362521b35a8b97ea02ec797f2cfcfe5964df2b30eef4a6f33777cd771e4234e5f92364a80f3182fec06dcaebfa57add3fb678e9f8167518861287037a58eeba73c7c5453c00c6557741a052acb850ef4db83095e7f95147e994467081ba02266482f1545c208ee2934bcfe14b219be5b75b104108f48fe4cf224d276a7f4b5267d0bde021e7a0e4e6200daecad7b078791bf90ac96480637fdeefa66" + "ring_proof": "b3c623766623ddcbe5ff3d6933d91e1cd772cba99f50bf9fce938f6e20057fedcbca10063b5d62f67dbd05dd9daffaf88885c963d5b8ee302ff675426f452b1fd3b1b463c814332956070952f4436c8746347a78824db3139f6704a0ee3daf45ac94bfb39b2d47fecc0d12dd6dd10052d803a69541bbe17d0ac0fdfc9470fc025585e2d0d8034f69b4edccf6262e69afb443952b1c337b005fa961b659f0e6f9846930d7405f46abf795426fb0a6b5435f0ce020e3876e175781ca110b56f05618c9590ea6d2eb328166a6410da0c0aa6473f6ff658d3ed0ba74b647b19fe63eebc1c419a5b19c727f1d4230bb1cbbcf565a8fbda47b788a59bbbc0d9cde650789dfd2403e50852202e003d40d17a673b4549a830de579921692ea42ea84630b6d950e697768f84d3828b9259625f8864605d74027741f74330d19ca2251253664ec91f76fba5c4b06dce0bf9899a567e3d9a6d5b5d4bdc720de0d252f9f7c133ae955ca2a0bec96f03d3c4f92facbd4efc3b42a3d42a93f41f84304dca5e336bf7e42d01067de3cc11058dcbfad676f1a2c5010efc1760e02cd66902734fe2caa948fc1633047218bdf3acc0c2eb62e4b3efe2c4f37ec32414931740a78dc9f897650ca0c1e897b8274184980ef84353697efe5d2e68847b00fb1c62f8b8b4c82ffe5b12cb3898d4380d6f1917965168bf3c6f2cf7a75298ef790ce6aaaf56858c3fe7d416d1cad8d7850c98550d3e40f77d7b3e80ff8fffe2108065a85c9df94ea88be3c640fd1648eb5f0ec219d7bfa0b1b60ddc38b66890c58b01b73ceb01838bd0b5634e25d5c77ee0c2621f495" }, { "comment": "Bandersnatch_SHA-512_ELL2 - vector-3", @@ -48,7 +48,7 @@ "proof_ok": "d502f832afaddb7bb54e8c28cce458a2a9c3c6c230e4b85539913ec531de168b", "proof_s": "f3713c659eb353f95d47b60e8bceef5c07e870da05ad3ae8410e9c4438105908", "proof_sb": "c07ba2fc0e17f99cdee9f5c9ad42c721e4a67c8eba99540c1a1bf3ed13cc010a", - "ring-proof": "b363bde64a4944670f58f8680bbf471ca847d70d9c6a28631dda32bb122ca0b17ddf17cc683f7297fd62d8ae0c318fdc8cbb71dc2217eb25ee5a88d847cd93f94664a9aafc6fd9bdda4c622089d775b164b0b7cceb7fbb9b3887edfb8a8def7fb93c3e75be176524bfd570ec9adf4014f6d689f31d57b2265f78950432a052bd3670f0be122b161ca739cc10f93d2a3ea893698995dfa293b0a3588c4090be671cd279066543d4b8c76b332d76eb2557e29e2c9d1549df23396e52b5bfb561baf3f6528b61e72797c118bb018eb4faea85eb400da1153e9ccf5ce743d766210cf7f80dd14c9816038079bc079ed4a54f5e714a0f2abc516c2ba383873b392e3395b8fed7268c775233afff6f2938ded9ebefa032814631b45773630eaede1835d5364df6038356371ca98e5da4252ef97c929913efb987d7914328e37059d72020bfbd2f86c5aca13802fbe214e366ce5cf2d9642db3dd931329df452afab70cb6e22b42f92eb52dd10898dd5ae5b702aea881619dd74123eb25c009d434fd47ccfeecec1dfddfcb8ba80ce932a6e4ea21025596277158a8e7309349d0b021149494c473f5030ac450dd92c6b068888cfeae246b819a1c30ac45822afd209b0d2e0a66f064463820684b122c351cb41befcf6315e57c20147cd9a8adb820086583f973289090eb530a3b02182cd82c2daa3d29f072ea001edbdb0b6501bea51f1bbce519f1c3c5be4561624858d71405526caee06b9cf3fe70f40e5f7c05ddc1890cc862ec830548a03977d7ad20692b4332e2721acbeeba205ea14a9bf456d9042259cc62dfeb1c403979c9e211e4de" + "ring_proof": "b23cec64a24c640fdc5326e37554ae680524e820bd59594647c84a1bc509198cb4f3d283e90806105b8d267ca9634d8a8885c963d5b8ee302ff675426f452b1fd3b1b463c814332956070952f4436c8746347a78824db3139f6704a0ee3daf45a417c0ab29152f311817a56f34c239b8fa19e953acc8d247ec6b2d91832fa94d6d0400c769f8dfd2ab4116224583d687a0ceae562c60f8ddc95b14b39c9ebf2338e708decb7be3755e7e6a7a825383df3aef883daffadc88fd1d38f531548e6296a85735006cf22840e0874da45988e867a46a7a717ad52c04243b0b0d29d2485356fed553a93aa6029af6ddbce482b04215f17f1355685c691731edf8682544c04bab31d9962ef59422bc9a4b70a02201d597c45b8a85ea220ce75021a70842e1f1b2d58c374ceeafcf2805c8f98d972009d2715ecd65238c9a3fecb615482b58893d15524fe78e570d6d8131b19ffbb31fd4cc6cefc2941642683aa86ff44c6feb7d555d7e00e34e6cd51c8cd0d91f988bbf43fb0e9779c30207359dba0d525b5409a6d690c61e1b58a7120a59803070633d8d0da3c007e0155f160ccf0567b3ada71f74d0c2c8ffb8ca2e4f42b87ee41e28a09f3ee90c54bc48c5be4c9e757b18aea212eb4c3807fa363289b2ebc87941b3ed43617ddfe664dc8b0f42f1c24f0bb19f37226cef8fe3eaecaac4944891ec487df7af40d3849784219878517b159a460df332e8865b356dcb3a3f90c0a25af3c843d3a8a140b3dfc31d35c1858c1a377453f6476b76bd6db2c20a7819c152f96d1c613dcf87ae6ac9004d9903d40bdbd6547f83087d20edc416d6c2d9" }, { "comment": "Bandersnatch_SHA-512_ELL2 - vector-4", @@ -65,7 +65,7 @@ "proof_ok": "c59024c715d21f2a08fb0cd8cb24046558222c6753180853f9601d92186c5e3b", "proof_s": "92baeb32b97ca7f056c1412c5f1b596f2328bc092d18b295a6e4553cbd547d0f", "proof_sb": "0573a4a51cbf33b0cf23b1c82fbfc44735420f4f9d0b75f4f0f0258fdd3b3c05", - "ring-proof": "8868fca9fef968153cb7ed7d61ee997127aa7a21fb746e82663871ffe7e3ecdd1e33d80fbbfff854f0fe7bba856cfd848cbb71dc2217eb25ee5a88d847cd93f94664a9aafc6fd9bdda4c622089d775b164b0b7cceb7fbb9b3887edfb8a8def7f99d26c369756a60662c37c9a060ff94b9718f39ef7dd17fb4947a2285cc38bf169cc1728089a7a23ab755ad317f741b69473687cd76fb0774d6ae5ee1f601bda18484f526fc82ac7313294ed01e08bcf973dbcff4e73b803a5feb7763ad23ae34f12e8a423ff4e4ae1e9a0388d0644ba1eb6748d8439677a5677ac2200018f0aa2b16f1a64193a60e6bf2ca542bebc45f265f52f54bb7404687d6d46891b6559fe153bb27f71eabfe9c291da21a44ce64a530146c66dddd4bf9e2c5c28be173b1142f1041da0172f6914c459092a6f5a08aad3fe4dd0538557f5dd12a8d70466d3d3a4a322dcaf1fd1fa860b024393a2087cc4d7f83d01e2a23570e5ced6d42e329dc2a095ccc457be1151670b2c5336aa84ff18e0b123d76ab9510c8139971846fc232c7e852c4fe35c4995476d224ba9aad5138898786eafc1e7e92893e2638b585ec31658baac1fe6e0383e0bf1d09af5ce5078a461c745b4e4ddcb4aa6c61a64d70989a70c5a7d60729c8815262b8897ed8e701be78079e94f38f54f6b9f962e7e9fa80bff036b7087cb5262cc62b8e8c9f19dcb76f91c825e68b725c48a35a54aff52bff99989aaeff318ce1cd3f5beba74746c446fd44adfaf82850acc86d265b852322e91215c77fce3646a9d753fba230d87f727e27fe306ee5a3ff04d490b2e172d6e6439b0812ceaaa2cdc" + "ring_proof": "b33d2e876ae74c7b59c529625a86d575e642b4d61d158b180a66fc302ab0401e3405edfec5de361965bea36210729e728885c963d5b8ee302ff675426f452b1fd3b1b463c814332956070952f4436c8746347a78824db3139f6704a0ee3daf458e062bee084d7a2b2de2c265f706397581d21a048d2118b487829eb326215bfa71f87671fb5eb9831a2f9c2e5d3a6c2bb30578161b4607e7d245b00a1bb0730ed08edf17820828dbd48760b91f834fd2dc9f9dbb2e19303c897389eb5384605f47dcccb7d1eeabc31c401d67e1da3218368b3594eadbde926f9a0c69aee6bc5b0091316c0e098994e811698e57e4d80c7020947a66ce14910f41234e10a228225a5af7c6f8f8dc0a7b71decd6ad2f2eb9f05ce6f513e242365bca0a30cd05e4dcfb5eca1a7edbbd32a35fa339e5cb09be54797130e099c25393d5b3d379fb25f006710b7e22d769805c133c8bcc3136fec5f0b5e7c11cd52fccadbb832a277646671fbcb3171c5a9cef4f025b632028969641b09d2ae641116839bab1c37245737174014c25d21917ee7748aaa1b7fb083da92be3cc69df670b2668ba04fa25ea5d7d72e9522b1605b3a0ff16e1bb8c39dd68217d524bc29f2a33170bc3027e5aac95c2dc699c45fd17b3830c07c1f156c7456cb34a8a35c94779e98ce78606de8f50c608f7d8d40712a16f39b1a66398fdaf13514aebae9abd65bd3bf70f45b87d0c43a42baa0cca87bfc35762a55b04036e8add4bfd76161816237a0f62ade827fe4659c53ba98970f5341ac3fd6b421819a8ff654ecc3c6d1cf5858a3dc10b13f016dcbf3a8f52b2bfabd92167817" }, { "comment": "Bandersnatch_SHA-512_ELL2 - vector-5", @@ -82,7 +82,7 @@ "proof_ok": "3639790d6414b474aa1d53de4e7a896b4e6458c078867acd22200f00f20f280a", "proof_s": "e0fd2d5a4adfe396072c22d22aa249da71b7a9576bcc5819b38d182e001d201c", "proof_sb": "8a776d2c4999ae38d872b9e487dd2ce6ade338fcaa45e881fa33b2a686ec660f", - "ring-proof": "884beb152618803c9ae40d0ce90554d708e7a696431f35fdf6a5715110588c61c0a7f8bc1d0591cff3aea02b2ecb06b58cbb71dc2217eb25ee5a88d847cd93f94664a9aafc6fd9bdda4c622089d775b164b0b7cceb7fbb9b3887edfb8a8def7f90e1d83221a03596ff3fd3941857bb9e0a563d36e770c7e5979b1808fe547537e6a7c54e305a0d2a48e9d3cbfb88aff8ab3d3dee94b1d15b813f789bba4346a925105f27295d4c2541b5643881720ce1124455f06d202a14b6019b046bcd5d0c56d584f5b835c8da1f154f387c91af32422c05bd600a138b9aa4544a9c1a8a5610348afc8959a75f5efe13a80287702dd9421452866e5caf4c380adfc806ab21d19deef3551d687d9e8498391da7e2a2b0857cc9a3e168f0f47cab019486ab038dccd8ad9b1c17deb17e9318f28bd4851fa6bb93f5c62177bff0f0c60d9b1e6c9e9b8a54072295d6d5863acaeb58ddbe945b86f0143437bcbacd79957449e504f9d1844241e9f572e5ea0cbf3489c2a9a1633c91bb740acf521c2d356f96244b7b4e608770c6660617167b832e2a531188f0c61384f56ae069ccd84b0a59d66f8b11c0ad1e357e4c43f08d2af8d2d49681e6af678918db28fc5d6261103356b1eb9aa68635f392da214f5529ac3bc16fb26a626f76899d8233ee96b41f19209020c92c5b0ee5b71c334a0cad3de1f337a690a779b3599436454e5061fc39f30f0e6ed508781ce3accd61d7243c64e0d9aa12605a18272081fa21b3bb89f232e7923ca5fd599ea5acfce07f978b68343abad4f26fc9a376866a29cc879571d4488a0866dda83fce234c2ddaebc4e35386" + "ring_proof": "83dcc1a57402029dba062b3d4b90fd5e9c5288dd93c289694409cf33c2d1a03b87b2eba2378747ea7a5b0bc8e553cf148885c963d5b8ee302ff675426f452b1fd3b1b463c814332956070952f4436c8746347a78824db3139f6704a0ee3daf45b69ca7caf10883c6d721c1b58a0fdb2231755c75677a9918b0c87d251ab2f373459777727f2b9d095a54c9683266c3d3910e490b956d8e5e8599a471731e4842549426ff4b1e432ee13e91055d5609a66bf7cb51fa16b65d58accbe35b784c16fe482c301c3d2fa38cfa0044abc48afedcde53e5c3d60a799fb5ce8d257540041992b313680fb71285a87a8740f4d01f4d2558701c6db83b3abace8542f0aa01fe508f2854ac5ebc5272df71d13244f8a187026243e05711deae4938db4bd14342feda36b4184d5768fd8cc9ab79b39b8bd7809071ffe102fefc449671693c0280b3486e0cf2aa16e593546de5ed4019b991ade1d2e678c6fe4011986d117335a2e2206bee95ef40b2cc6db463de1787b7031a120a21d139903094428a61213f3c87d5528d6af3a064a71f03f22d9715ae700265a3c69e398d547e9c9a0bd225b60ce210f4db2a65d0268d01b2c6a48677b5fe3b8b992eff6a3b16e919912ebe47b46608358daa882ca01c76fd608035568b324be7a79bb2bf64acf040a40ab70dcadc76df1aa05bbf56b0c107ff014f9159e59f217f6a0a50a3aa780c1556a8f7f0436ac3d0a61df7b2018dfc7cb3c7b1dc7fb5fb6f9682eb094317f31eee5fb43f5be1293e0a855ce14bd60e9a83c33ad88e518dfc41a268f0b2eaf126b0a4109732787718dbbae70ee1569e27c3f8" }, { "comment": "Bandersnatch_SHA-512_ELL2 - vector-6", @@ -99,7 +99,7 @@ "proof_ok": "3639790d6414b474aa1d53de4e7a896b4e6458c078867acd22200f00f20f280a", "proof_s": "b19e0d4c7c61ad0667f60b2e51d2555139a0e511800f92c15ec44eee2a547005", "proof_sb": "d06b4be651aa3f1858a391984413a12a83f04e5f54d794ead2d8088ccb2fbd14", - "ring-proof": "92cd2249ab0917915af4586431f201b358ec3e8520ad0a2cd7bf8cf72cae815d262be8871be76b4cf50454701fdefd458cbb71dc2217eb25ee5a88d847cd93f94664a9aafc6fd9bdda4c622089d775b164b0b7cceb7fbb9b3887edfb8a8def7f868b49753d01c1ca1fbf2a2c52c835394b9fe63418f936c758a82bfd5e205bc138689347b1d3ad618a0fed34e9d3ee9e832fd1893042d95f3a7e8b566da015deb281499e2d4f794e8e99af45876abe64f8b3bfb6cbfc87246e72b0ca499529e00a5d0a48682d5e076139ba2f64131a70cad230d95071acd860b6ed4ba0b0f6165884e80eace5e1127d4d8f132cfc6d152e416140b3d132243b28f7250ac5d007ff9d85b3ae75531761014216f58d6f21de01ead934c25b04ef5833670b3e251c7504186e614f80411caf9dfbf5d9e8863ebd7fb81e3ea5f0359f0ede0e0eba2ff968bbbf14ff7f478c125278d360584da08cfb498878b7a23b16e222f2c62260378ee4a06440c448c0aece86f6615cf0452e99ed38069f505d926e9efad6746fc11ea9a618d748f6b9ab35c730640ffed2209bc456fdade1d86b1b4b8cedf3208a5e4310f60ac829bda6e246d17720b0d591a73d54ebf255f417abda6d1bba33197a6edc9492ca076c370b8f7312b0317e34dbd7beb9d669e8036a721f2f6a3765c143374436cd1315180c189075050590ada8ae762c121321cdf71a5925475f48a08ec346ada370de6ed82e784de98c7b61d2781c51b7c31cd5dea02ebf829ba09f6a86f074a9752beecfb4c75761f76a5c61de73cb168db4c1cd1a0b4e255f423b40a0dd21d59a2acc3b32d2a77457" + "ring_proof": "aa5683342ba3c4b9fcd6b71743dccad4fc9704ac66b856c5ed654e3f20972fd2f4f169f8ae47abf3e07df736ee673f098885c963d5b8ee302ff675426f452b1fd3b1b463c814332956070952f4436c8746347a78824db3139f6704a0ee3daf45863322bcc074ad4fae8702686e863a0e4a2784d7b0780d7c4585926216a3fdca599b43c6bec1b89b692c1f320b1c0132af403a65bbf0ec8db35fbd175349cacb89cfe85c8156093480787003e439b219a49d4086df55c05924976b901f3295bc6f6caa06efb2a296e09dd8410bfe9bba93098414909fdfe258502b25ae66770cd98eee8905d4098889a412006d90c44691ef42327627c77875f7365d8c4286592fa56299935689fdd1255d0951b5ad1988fbb201bcc9641c038358db11db5c12511c9298f7aac3dfee8f59371174b65803093b3310cdba7b08f6dc7342c9bc20e8e312a8e0d7a9403644aa45e6ba3c647271469e64743edc77bfb3c74c3aa53ccfce02b94ea14e2500e8827992da0599cac8349fe8d68e5ad494d945726811111a8846fc6de6b49d84a51c80500755cab90fbecd53fea578d8d3c1ba396c6e228b6b06353af560ff599653a0ac423cd7a1e6e9fe48626a8aaeb9e2cb48ab20a0f3e3dcda754606530668519167a295e95065953479ab9a8e9bfd13c96ff0e2e29555c84df8e20a1ccc2e961b900cc906889dccac5d3d0f59803c91f3fb36de8689b6e72cabea78f151fc7c0da91100bccbce4b5fba7be20a6f3e7096b7f6464ba8b6d37177b1ea73ae48d9505972a41a4a081207bd2902360f05dd615066e433ea6a6697c2c1878e91cf0f2bbecd7c21" }, { "comment": "Bandersnatch_SHA-512_ELL2 - vector-7", @@ -116,6 +116,6 @@ "proof_ok": "b846dfbceb2a74fe102b3aec94e7b8460f5adcb609c407839ab6cb06d1e3bd38", "proof_s": "ad87350848df54f79c16dae9b37d052b4906a1b5ffd83c00405ad8c548603c17", "proof_sb": "f1cdde2944544cbc9de259348e76eda794ec757e8f2f5df719a8961e060c6f1c", - "ring-proof": "aee0c16f3f187d6349f3dfade6215d9aa76fada837d2a2b10e0c56d7156a99708f402363d6e5c64c7858355a114954868cbb71dc2217eb25ee5a88d847cd93f94664a9aafc6fd9bdda4c622089d775b164b0b7cceb7fbb9b3887edfb8a8def7fa9b01750116d190089e148cd68584f788b22906819071996b541f7f84365909fd438365a6aef5250858fe969f50b726aae46363c017b50a2b60fe953e59acbfe35ff44458adf3ad66727b5ec624ce5ceca04a68ec372140cd8cd2f50bfc29db3c92ec812ec6760b511827c69da3c6ce34a78e34e5b8e3102449b1e217d928f34dc10ebfb8e4d6dee826ed86b16a77f38cf51b7cca3b165b70450b46c366a8059dd19bf4a8d50af21120386985334752f7020689924ec123aec834a6e1a3759664aa12fe0f74dfd7fe73954bf255fabb147b04d3c6f9ead4bd1346dcbe513cb125defe93fca6c5d3d841e53e4ea8307eb49446761bf3554bbd19672518b2bf724b9c6e3cae5fbf7e5f87afdac3b676ae0097a0672756d252a0243ceb873027110572b1c8dc6283c7c80ebe1f6b36b791df23e6c44a50166ebc818b6981674cf1eb6f17e1e970815fc0988644f16325e99aedcdac324366e891f7863a1522aaa6e5fef157e20075a25474e5a1cdec067a7f21981aa21a3c212e9086b1c1a980e87c4963de24e80c67be2a68dba636de80bb916e9d3783c207f33c3e0057d43f07e39312047f4545f9f24b8b28da8c1c2ec53ffbbc75fbe22e38be463d39ffefcdd8f74d565b4b91e518878489e983580ae158a3ba7c4db1e5d0103158b0cef0d29c471b69a407f9d3a8f0b839ae57ae118" + "ring_proof": "a34c7eb57765910ad171c4220e02479de24bd95dacc554bc4fefd0c9604e6395923b17ebea95cc4f3f26167bf236c1a18885c963d5b8ee302ff675426f452b1fd3b1b463c814332956070952f4436c8746347a78824db3139f6704a0ee3daf459976e86c18462268f8a76396fb310a156d4e17b302755165b3a1eaed7c4e4afda2d90ba812f0d3a7e897bb66850a04a4b5e2d77a4469b36a21635c33edd608d64b476f88897e8cfc917f60f0453452aad1002822f484a592d73fde9d7d81ebd0f70008f3899130b0d6c7e45e2323bf582452aac63ceeff178353b93ee922372564b3ed6e9ade0962f3d01b34522c1b0cc0c8619673f8dc33ae7a643290e9d84f77a9e7ff71e116112ebdfab1a5f44f3adecc6110ef34f00ea09653dc7778cc4ff6f9b4f0c2cc89c49451e3047eddfe2ce4a935950c01ecd609520c04e549444a91117c27983e50ac23d693f887f0dc0c5fbb4fab6bf1ce5bfecfa4b99b83b63a9197785484cd21cdb5e65b0f504f40ad23b163f4f4c643c5bd415ab182a814503b874c8a78748f015e15971d000a13a92a10dd5eeb5ae216cb2326218124da68a815b2961b41cf161fc1fee0ccbceb02bf0346a5cbbe02ac5e1e7a2d576074645242082ca58959d921377849fc9124c3fb00f5f38dd517cfcda87efa4b67ad2f88dc42b4954b8c37bea45cbae44f6e45b8a5a6f9f0315464bb63d8da3f12cfe2f189e7cf4372b6a4187cb263d19f09308a32416a608da6216b3b0cd8ba0da7cb916bb30b822c8c8f2ae88c9d439e1b516b445113aa88fa3ba34d4003ff2af723c1b3433f26289680ebcf63db82ff6c85" } ] \ No newline at end of file diff --git a/data/bandersnatch_sw_sha512_tai_ring_vectors.json b/data/bandersnatch_sw_sha512_tai_ring_vectors.json index e816366..c5b21bb 100644 --- a/data/bandersnatch_sw_sha512_tai_ring_vectors.json +++ b/data/bandersnatch_sw_sha512_tai_ring_vectors.json @@ -14,7 +14,7 @@ "proof_ok": "b095103542abc9ec78ab52ee908f8af6971ae8f264c9a50c56c6f91541ec150980", "proof_s": "bce7fd9b65379916cca77f243ac0071baa0e259816da8e0a96ac538ee657490a", "proof_sb": "6b2dbc4b088b21d732cc5193439b5186cddecb4ee12f8233cbe3057c06849216", - "ring-proof": "8f3806194a7eaf868dae69fced9375dbd65701a34cc735a0ed9b0d93eb53dca3147f9c9b3e6d4a15ab528b5f79fc57378cbb71dc2217eb25ee5a88d847cd93f94664a9aafc6fd9bdda4c622089d775b164b0b7cceb7fbb9b3887edfb8a8def7fb56e09a203569ee033c1468776b988bf74203a08b41977b533145a916a83e70a7fe52ba33eb71d7e117b0717bc7b72e6b088b31f2f8e7d2625da738e7d1f61aa217df088a4729227fbbce5f6161afc45cf663c390af1cb3b09ece4271cbd7802117d2c42ffb34cc8975fb3ba393794aabe0c4ed83db0f8e05dcb75ca249b7a1033cfc4a043fca7210c70a209e8a668ee07565c7393ae540b27bca3d2713a5d52043c46c2b3e79cc6f095779a4d9434df7bfd010cfe083689a561c1f30e1a521011fa709f8aa53ac3c4bfcd4dd9566ade5e5e7be70cdbfe7008d511bd9380575e677a4503c5a20cfd262b977c2d3ef916931be1dd8134f7959fe32daf1bc67a2f60878b8f8f72c91a755df31cd8b93dd180effc7b9eaf543e2d1525eca25f04204bf214e8c0a9111a8ded1bcf593ecd91ac79679929997d5c7409cb8d82af08488a06b57311b9e08b2a85c60dbeee942c6ecf2a6f408ed83bae33634658a5f76b72397029c5877637b91476e20b8204036783911e921068bf1dd9fb2f18eb23589b1635a827a0095286068666bf730b2993aab3eaeff507476ef834e39d139ab25ad13b11b8489933d11b5bc261d77558b28a13c8df2c0418ac774096a3f7e84b88e641d1f1f5da98a8d7c737e15b7b0b63660c6176cf3988a6bd1c119d6d714af71ef462532f11a7622120f8071638a5" + "ring_proof": "a4c3634b0ff931ac5b6c0bbe7c441c0dfa0ee6faf92057cb90d626152aac6dc6a61745852b9fb793f92441bfd2cc16278885c963d5b8ee302ff675426f452b1fd3b1b463c814332956070952f4436c8746347a78824db3139f6704a0ee3daf4594c3cbc6699d021b72a5e09ea3f196cf39021215c34491c95d00b32c5ccda25d7afe866e18baeeb385a194fe75cf98d1b9ac5f4226b55a7285175cc4f0fdc795c8380ac6a7b9efb0d393cd73970c58f5f4c3320b77ea624b5513ff46a3d0f51eb969127e19bb27a2e43e0d0fc890975a17e36f319f4d961b6ec6fe79dbd6bf1d1cd47c17c53577abf3a2c56cfb08e6ca58b9049aa05ff7ebc8fed0801f0d8f684f4449f2358056c02939ebb08a2d478bed1c2bfdbcef279fbe42b69d674e083720b96e8ad5c5504156d98f9b27913071a552354e34ea565ae3a27773f713c5293f1b78c0ba523fdfc5bd957fa15083bc7d077227ef632ca51d5df994cc5fdd646ce076e23366912c230fb9195a2b7e35f95c52cc53fa8372aede4c4adc3ea659b5565840169b2f554cc30df7a4e35ba94fb6659f943c68569076cade42549417a49624cc7a5ff499f76750d6b4cde10f9d0eb9a623cb3f3225323b193e8fcf48190293a4f713507a280ee781ccde5a37a71df9f6e579315240fafc2a6c6fe3ad4cc14658190d400914b68530a89d2366ad9edf20381d3203497566a80ff68792df4d7fd0b0b7d85990aef1f2e9aadd0f4d7511a2b9bd18c08b2e2ac763c8216da5d276eb562445b3493a8fb5e3256621495ffff5dd3e4d1c426309ea3c9ed45e7c32f1733270ecf0867d700d92a8fead" }, { "comment": "Bandersnatch_SW_SHA-512_TAI - vector-2", @@ -31,7 +31,7 @@ "proof_ok": "d3773503ac5557f7551930f6c14fd9f4d81eb8cc64a87271cd9860cc99a0db6380", "proof_s": "99e5cadc5dc736153d9482e65c85bd4ee3e22b7060c428b77256753472c1fb17", "proof_sb": "f05d631c7ae9fbc33ea4464af81188c1342f7c6aa127531e1f1bd203d608f613", - "ring-proof": "82405a72a54e6be1c98cdf7a503f3c4a7e424acc0212b2450bb3d724cf3af646084350d42c83f2d8fa5caefc38d4342f8cbb71dc2217eb25ee5a88d847cd93f94664a9aafc6fd9bdda4c622089d775b164b0b7cceb7fbb9b3887edfb8a8def7f8ce8be56d2cceaf67f2d1b7821ee128d064d7c05043f60a0d960133b7097c37c1564eb1f98aa74768e90a6bce18b19c1a07ab33324db203508cc9efbb52639ee58344835aa84d1632c938c900c6a0a508ee62cbdbd7aaddf3dfd46d263ad96e443b324cb9563a4dd1ef429b6414dcf15b57097a701fde410091057c395642f3694bba7c3980e691de6fc88cc83beb070a9a4b50e7f2f8e95f0431e1614af9b4805341a237ba971b7eebf81c29ade074655a2edb267877ad5e9d485bc6fa8b109fc473468ed6c9d00056b1b1771fb8ca0001bd454af08c19f832b5ebcc395a53f1786e102f9f86e67d8e3ab6336fc18d0e8da637b18576af73481f56a18a67e3035c63358497ec4e735b700b0726b123100fd8533da097cc908bfd42879616a01c360c35dae18f63cc215e7944c7a3f30e066ee04385521bc871d0cfbefd2da668f4ecc1a5ad476b75015ca01e05f896873b9cdc8c4a78f083cb9d6ccb8a9cb075ea1c7c86225b08f7b24d00e53b92eb9950a0bc01f2b10ee13946ce72e00d64f12ecb92f985a6178ec4e65d1c323101d8bf6c44497ee985be243bd2de23a5b0368bf06cfbca3099b9875010f6fafa7515b17342df106812021325eed8788d5f08f34ac28e2678d4d35709b216040bf4bb50ce6039bace7dd79d49e9a04619b58aee301837c2a892647ac4fa360ce1f05" + "ring_proof": "8544e8aac2d96ea0f9b44e2a0be6359c635d2515d3990c23b2c839919b23ac1931b877dc54d5556d9feca0a901972fcc8885c963d5b8ee302ff675426f452b1fd3b1b463c814332956070952f4436c8746347a78824db3139f6704a0ee3daf45ae2243ef2458cf3eae98a24ffb800ee38c92d1b4e5d17646f6f6e2a72c7b346d8d9d1d98dd5ba418cd576499d1b8b948979c4131fa609b89d946b2fbf6878716135c5235d9986eca0ca118252ff2877e1fc343c46584595618155b5f235488d191525cff81ac7396edcf6b9878047ae1287f4cfbc9f4b366c3d2b3206321e15da1f35aef24d3c07ce48d64ad343714a537f60847e6497d6fa2f207b6c0a84620a301c4223a4ce2d84bdec24e18d626bc1d17fd23d24a8967523edb8788cfa812c395f5673a916ed457f9b9300bb65b5879d703dd3092d0c946818bf696198107f95bd7c5b12cd812abd29bfbd214d83f7afec46e9255ad172c64f782b71324625822eaff914c9d09024876332dc9b92736f9acc17e84bccd4a88b65bd9e4d208a389934ec657cb742875d2bf328a882c1b6ff273167d07a99151c26a2e4e6f2281dedd46edb648ac38d486797a02334aa10a842732c0dafbceef71798c0b8928b082dedecd798ef970c0adeabd286cc56cbdc185cc16293ce9c5231e7aab7dc3db53ec83a9ef58e85c011c28e582055fa3cd5f80e22c43aa1943a900bd315f78c6d0736f15b5cf59937f70f15115cfae1202fc1ddc89f5646cb88b0b6513b1848a1158d5f678a45598e03e8c734b282d9f88d62478367df42a93f9030501180e3b7d85137a97578427a4fcf2ecb3fa3e" }, { "comment": "Bandersnatch_SW_SHA-512_TAI - vector-3", @@ -48,7 +48,7 @@ "proof_ok": "a0265bef71e318e27e293810a403053f4f3d322a58d406964d71f72a6b52e32600", "proof_s": "701152ce19ff66fb5228051b39fa8bfe52ad2c49556dd9c82513d1071ede8d19", "proof_sb": "07a177cf9a9d08282194c8cc0d856be3de2681c642ecd0cb95a014a82f7f5c11", - "ring-proof": "920a0dd21eaa93cd5ac1ff1e15274d1d0ca065b99bdd5b8a583c3875eb46f1130d092912c3711275c66669871fbdb1418cbb71dc2217eb25ee5a88d847cd93f94664a9aafc6fd9bdda4c622089d775b164b0b7cceb7fbb9b3887edfb8a8def7f97f2d16bc56e4043820e4bf0ab5da733bf08b2ecb5ddf7d0dd2944a753f25c55eba997e9149f0115193ff0b8b680f973acb3d950866229a2b31417a1e7c96e08d7c4e3c56f6401af74bfa7ad80d2e9438db28948dba2e8acef0bb84733e3297fe8ee71bc8523868cd80acd2265f946434da0813f78ba403d24c64a0b061ebd6c0c483075b6c3cd5598eab9e6307d9e4987d18f0358dd95c5f38c40c4ce3b5b07303bb0a23c797f0965a326b7fb66559b8e8c2d69784b0809af9544a3528c1e4945337e0f6808d21db22237b3b0b97c93bfa3268003696087097a3af0f01f8c30d1db457afd8f35ce04390956004d0bf71076100874d10e1957c1c42afaf4992c1aa2da952437d6ff930ba0e7fbf5a8fcfec99d7cfa8234a382e295d35726a168d3cb9190b6da847979c64680850bc63cf866f67b6218b1dca5f9f9bdbeb15b6ab0af953f8db9934fe928d6996a8f08e5f4db89aedfff43bada13abc950767bd21a818661efda8c64a0875127a36e20ec99e863ff09b9b4ba9b72eb7fe275eddb930a425d10a6ae96244476e4e3b0bb338d6cde91a301c901b54e05004713a58a67c47718e6f4c5cd12f8b934a10350d041cf1ced4332124339693113f0073221a10cbe3bcfdd3fa12b523f095695c74c8f1443c30a0ca83368debd3799f319229eb3f6052a8dd3343e03e1c6852dca69" + "ring_proof": "abacb36a4bd314069bd7fd01a7b39268be29f1d48abd064b7a60656f4f536d492fce4cefb80f7adca8c719f009982fc58885c963d5b8ee302ff675426f452b1fd3b1b463c814332956070952f4436c8746347a78824db3139f6704a0ee3daf45afc6c8f4fdf77658a19e3d1048a0ecb90653bf1099e6b5e1814b820c3d51cff6c5e07e984cd20ccfd28ff0b3a0b09f7a8d2776c80e6739238b18c7ea0ef4852229bd0cfeb5a88a9374fd5090c21328a52e33267cc217921fac95f18b203cf4b5a0d21a644682da738e7fb8a348315250b1a3c41654ff37a09c27fc456a85e3366e3cbf38578bf520f47ffd4b4f1fd7cab8e739902ba306c8a071c66f91b75e24a4ee525aefd18214150717a7ff8fb96d032a9242e3660388a1443d4cfdffac4cc40b6ccbaddccd40ee960b032a339cf39a29a2e118163fae4e159e98b1badb47a1d357fb869f43eeb95f5e0c88e6f6c57399599c2b44c491041c0d235359b368b6aef4bfa790fd2dc59421f96155ad1d5d236fbe570d175814ab107d30c8f0587123b594c79b31d1aa808b0594e660efaa85f881b278763c223c4db9b64c782189e67d29b93c3b00b6f10d77de89376fecab9fe1de216b4e37c647e44c292288308b211ec7bbfe7fb56948ce27f07f3aa4c86d74578199330e3380c424f060f324605f5ffac637dfc344ca2e3f245f24b537cfa08908a8e42d3158e2dc248d3da085181da0a74f1b164c2a60f57ba7592cf2e721f801daecd1dc1af15d22db9887637cd66031cf921fb9f682350f39ebf6d227209832ffc83e2b9aa7488ae5e1408637502ffc0e03baca7758e3875448" }, { "comment": "Bandersnatch_SW_SHA-512_TAI - vector-4", @@ -65,7 +65,7 @@ "proof_ok": "082084d4130c2c573ce2aa2832da054bba21b484daac99d59b91a92d29f0680100", "proof_s": "1357ba5172e62dee2038ede9e6b0ba25ccf5b035323c6956c5c1b725df8fd00a", "proof_sb": "5b4d6ef3445d8dc8bcc38f44b3649d39fcb5c0b169c5085245f6903ef8ba940c", - "ring-proof": "9843676db46f94b8bb5764ce697a780f80357001fb2e35a4f2b8578a579d79217ea161b1ad6ae5e419201b986920acc38cbb71dc2217eb25ee5a88d847cd93f94664a9aafc6fd9bdda4c622089d775b164b0b7cceb7fbb9b3887edfb8a8def7f888a43650d69168b28544d7bed18308839775cc31c45c9ccf757db145c9399583ea209b80c9891b0d001be385ca505d2837db0d81bf7c33dc6ad4c0407a06918ca6af2f9d7d7799a9b68f1d6ee9478f66bec1d8c96239efd2704818a4334febfff687db06d94e9f5637f9eaf37f4afddd5aa192327f2daf43b7ecdb689b4253b93e2a887e9b4e1dc7edf0a31123d83edb16db3ee6cc5604910bfbf7e6971793e8c0175ed4e516620aea1aa6c8225da3049e6c719c72cb6de1597fc708dc76546be264b7aa90addba8dbf7fbe610a882ba50ad44c5b4e0b6152469f7891dc092f5229c58bf74b524cc63f5def267286fa38c13837873168f139e49b7db2cde93a0604b085461740b82b94541da459f174e3e60f3862e4a38f3947f3d94b94fa3406c875cb5453c9a29e807e1a13262bc047a58a47fbf25641b4af676a371def4183469ce7d1990f2052853cd8a464ea75d04dfa27a408d7e0125b29c35ecbde1076cf282617ff7f306766d7adcb2224e335c0b84803c257535e3b01ec8a4706828c0ae8cb25c07eaed66fad39ef8b8a1a8d171360ef94b5058e399683548300ff3f069ed4cb30d588d8229e203954d7b0d0c363af839a75661243489f106aa2aeb7bd830654287d2186eaf932d8c312b2537e9c183918044a75b0b5035a48ae3a6a3fe498512ff1e2dbb83378de9ecd49" + "ring_proof": "95e9537fe5d7dabe8047b7b830f6a0b5019e2547b516b346544503cdc30fbf685284c8e68db802650064ec899208d0f58885c963d5b8ee302ff675426f452b1fd3b1b463c814332956070952f4436c8746347a78824db3139f6704a0ee3daf45ac26e7a880f323ce90b95450334c84439ab1fa26a6077c4b8e724c1eaee6289a9e74f13882b7846648b97442fe93e6cf8379af654c1702ebce831a44848aeb749746a531d0522a237b96e76b926935426e09e4d1ac534ca64207b2056e8fa5bf9f469e67d008e7790a955e391645e61e3201bc4ea3ab1bd27815daf7756e8d69feef50ba9a169177fdb29c232f202a73cbea80f551235edaa0d5799fbbdefb0548b252a4b0e216f34cb7bb4113152cf2c67260f14cd3c06461ed2bb423cd34179622c9dcbc803a94cddc9b6363939e7dd470211c5ebb42d719a41c954e300b1facd58f662cf8d4d9f6f3e2789d0d97684e4c2af0e96c83a4d1179f0f7b13100709a49e66bc5788b854edcb560215e58b556566c23d7dacf5f6aefa71c0668a0e0f0a1bda689648488ea684d4a9b064893d51f1ed3927cd150bf3163faac27214aa47bb1c8cabfce779b213e042d45608407ae7bcfd4c5507aef81872d2c6c6b41da6a3c318c7d4cf9ff8895120d8cbffe8aebc59cc89aa52847f02c616fc6f3492f1b69b1aa809593417d58041aa5f3da218d3cf5ef834133b141e4811d7ab86a5f14c370a1500cc843d09cab4bbc04a6c307b280c79928c9739ed1397f5b04586439bef6b1006eac1ed5d065a830d411aac4c52206ab7f7ff8f84906ceaf0ece3e296352c3149eb067c784c7c71e3ac" }, { "comment": "Bandersnatch_SW_SHA-512_TAI - vector-5", @@ -82,7 +82,7 @@ "proof_ok": "6d63a2b05cc3a230a6a02b89c63c2a4daa13cccbd73e82960813d65a2d0d5b0580", "proof_s": "6f5e9d3b17ac3473e49d518c7d8ec17ceb72f4a7efa474112d022841939ef009", "proof_sb": "bd365d1ff09f59a9ad885bf3f71e81151747757788f6c07387f4100842784e13", - "ring-proof": "a94ec1b6e321ddd0a3ea0c80add12e491babff7d3e991bb7df76b62b4d6adbb066da8d33d5972b4a7717fc9bd8eba8d88cbb71dc2217eb25ee5a88d847cd93f94664a9aafc6fd9bdda4c622089d775b164b0b7cceb7fbb9b3887edfb8a8def7fa4ed986c4454f5ec4e5f8bd38f0ec2e2d0e5dcc8dce52518b92f8ad99718b5714ae011efa55bab073fd8d88e51bfa91993aab0edf7531f712d7ea26b861f722192cd04efac1f91efaa467d333f7a50f42e6dab2c7aa3891dfc9cbfd11c926576a61ebeb152d7d96ed1a5ca302b9db14fc06263da76947c39a78bc01042d243681795ac7b5c07e24a24de08e7f1c8982488bf90aed12b03ba50fca3c253a21b47ff8b0a1519b06dc5701a17b09a05a73ba1b5d82c943f848c45b553f74deb1b49b82d299be304a3ede7d14f8e9a7912d96fb878b302ea7606fc57de68871e884f7d02d7e437bfef7ce133ab0cec18ba2b9f73a41a7a1907f28ba6f4c76ab2c337e7b298df6b9b3dad5f0440c3a171fcaed5a6f0ee4047eae901c66a2fb10dae6793e5ddc20da721dbe5ea346451cbadedac72fe6af835faeaec2965eab9a36806a53b559303cf9735ab8f849bfe7d30786d2f4f66779999d564e1360e23380f48b471e5576816c43b91505fb905488fd47a856cb6a23fe7696aaa7c20ac4e99e194b653da1dc6e67e5cedb897a58fc073a99f8ac0bddf9f571351b92f549681ea7210c63b78dedc651339285e2d541148e3b944a8e9d23f615e3cad8d8d7bd2b6b017cd90c44b2e1bd2db54802116383b1fd014ffa16ad3e286fb4253c54bd8c9943c21eb8c7583dfffdf5295f477c53d" + "ring_proof": "8615bd9df07a466324886158e90f86f94821708ca821e79dcda9ff104d79e1cd0f27f2028bd5f08285495bae0f8185488885c963d5b8ee302ff675426f452b1fd3b1b463c814332956070952f4436c8746347a78824db3139f6704a0ee3daf45add2b682b8013b6701b469ce652c8cd9ed64108f22d4e18cf08b5eea42a8d853d5243592cb0abb7e00cedd9e810d020e98cfe19790ee430e7fae0af0e95d9abaca849670ee600ef43d4de8b316bd6c33b742fb236678e4dce6f199cb3c399d45cab8ae3da13af60496e1b1e380027707ff1ac6051669e7edfa444ddbff90295fb11d1cc690391334ad88098a3eee591a5358e27302e8f76c72e9d2820d691722ad9890fc35c4fac4c7a35afe14ab038028a902e2fa6f24efdc17ca2f4c5ea41b91e23aa81e20982962c8734787f966f295ffb0147547a7c9ba4c856fbd614b5cb0a7d1c74dc3656c2e84bad2051a8e0da650756ac4d22f96ad520cdd98817a6f20b533f05f17fba1b7e14d68ca96a9cecf72d001b9dc6651ef6a7c86facd0624fd6acc8061ee87279001631346d2aa8f20a67f869d5c65773b2664c92d8fea65b19a40002c4abdf1577b908569bb7d481740f44802c8e0283f81a0c169ae64cf45ec1539bc32bd598cf3516c9678d5fe341fa98fdc0b271006f94d88b8287648ff65bd5ed57d806797423928ac901a50ab97ad8d865b58bbba67894905545dfb70472ac33e53bd850079cc5ea18a7dd7cf52b1bf0732b643c925df651589a63983e59c2797922fe1621aeba64b2e716fa4229b2c83108ebc55d41d35973f7cd1e7ff2d3a0211313b4c70cf08e9010113" }, { "comment": "Bandersnatch_SW_SHA-512_TAI - vector-6", @@ -99,7 +99,7 @@ "proof_ok": "6d63a2b05cc3a230a6a02b89c63c2a4daa13cccbd73e82960813d65a2d0d5b0580", "proof_s": "12f8a97cf8ddf1361c247e51d0876fa93425706e21e1403ca6b430a4b7ad1708", "proof_sb": "9e989c2ae5177ef9505705cc144116f0b633693ca4fcdb85ec9b073fa06afb08", - "ring-proof": "99f7fc695729534dde5bd023f34dbd42ceb6d0d85997724393f542b2d4f0cbcf028816a6952ac4e54b7381da3043ebab8cbb71dc2217eb25ee5a88d847cd93f94664a9aafc6fd9bdda4c622089d775b164b0b7cceb7fbb9b3887edfb8a8def7fa101a75c97fc830f6832016ee6ba9fe16f4bc3864a4ea105dd6c7e97cca4d49d0562e553eedd42622281064180bfb23b8f10157b4dc414639c3fc270ea471c08b2b3b7c9fcdc3a588b62255144b91a6d626ccf46c702cc229329bd1b89490508e4985d1f9a2c322a3ee4e1beba4f3ac11db3c98c951b9787922d26f7704ce46ebce2705c220bd4384fc348e5606712c89f00e1ec9da860678a5c99dd759c495d5abc31cd8c0ca3829abfc25ea48a673b5d1496b694d3c445dada696f07e9330c777e5d2ff6c44c02f8b1d2c1444ab0a68f3a04a46357307773fef44e94ddab1377cde0cfa15ee2fc9e97e201b69feb99acc7936e953d5a789253a4eb4a9b551eede9fec6e6bffe227ebdd45f73d1c27a4385ac20a98be26a372a40a3a4334e081f467f40950df95bbf0a77b2802b12e8ac672511230f07eb4b33d5dbf68e147389376aebb418170bf7b17071f65aa20b5ae6991e1a7fa98cbd367b329d8525ddc0df7c605ee1bc1b14f77cfaf64a7f638a0c984d989ee3a84f9334f7c1a7ac53b3e609c321916d0fe608aef5e2105951b43e4bd583d1b091c90df4d4a6008d3ed694774dd4a1312ff342eaa18ae828676047701fe5a774fb26dd764dde52354caad07b0b0d6cb399d0c88133e200c707a36f3e2a7c628ccb385c612eac64b13a6d54fe6b4043b817b801d8687bb2cb0f" + "ring_proof": "937901743eac82015891e51a04c61f7286f495429df41f8f62e033410129264bc1592a1735c611f6e02edcd7076079d98885c963d5b8ee302ff675426f452b1fd3b1b463c814332956070952f4436c8746347a78824db3139f6704a0ee3daf4594378835bafb73c645fd2ba65ca67eea6128f79bb1ef99d235dfa73e1f22ad86203e4a6035f6fe85df93ec013a839a2f861e8b2960b313960745f717fa1acd6dffa29e025f2012b457ecfa5a714eec48d7ca4f11e0293112f3b247c5738c60100fd87dea2349928e4dfd4fa1fdbc766ecb2a4affe3e79571783dfbd763e516372d6c6fb2de220d1e04623e11c012919d31bccf1e39035adbac1af162dcd3235c712c71f62eed49f372a71942aae8e1540d4459614473c4c8e2e3312d9892bf2864c18a85ce4ec4074c19c670950560a4761cf738652a6fad987323c9876aed4fd879cc30926251278fcf6b303c2eabaf8ac2ef88880fc5134e9a29b7950b7e39b80e7d68b3bf011c39c19915b8b9b849e71fe8c5d75a2d9b456f557f5f374a3bd6054c2e0fa474ca11f79ac78ae125ba97dbfee1c71e873e9004758867078f6598af2f148f724b0a3d0ce01cad32d4ef996607a8695089a09fea5fce3fcbcca7e5e783d5e4ce0d1f55ecd5e9321029fc620a578bb7f3b8217373cd28afa1318571b1b93d3fe7789e3ad7f67131cf743e8c3a67219555dc4c480e9c8777f5e1a49a021bf1bf095d7225ba12fe648c0dd452112eb707a253377604f5d396520696af3b84d40a2d0f76cf4894271ab1d0286a008aa85eb059a0a2d065c03d97201fdd10c61479afbc6fe019b007b849b49f" }, { "comment": "Bandersnatch_SW_SHA-512_TAI - vector-7", @@ -116,6 +116,6 @@ "proof_ok": "26c0818e2e3fdc5b7d70aa0c8c17c521423cf82e805fed9f760c253d2d55d64a80", "proof_s": "535def09f9b0c90b19968613a0510b6e927f19c7ebce065a6a9ce5e884031d07", "proof_sb": "544d6c05b7deac50e2950e4ea6ea6ae6e64dc618360ec60384c6d7c395264706", - "ring-proof": "b0098bf3a58c3b168cd9f72b8656f1518bd299811487e88ceb3d4549b441fa2892e324d74e4e5a66487f7785104b2d898cbb71dc2217eb25ee5a88d847cd93f94664a9aafc6fd9bdda4c622089d775b164b0b7cceb7fbb9b3887edfb8a8def7f8d757232554651451918f32d66985913389397e8100c295e50d9ef38394f8caca096ecf8c7672f62a5201ea55e55d33c9493ba1c744892589aea98b114612e4f526b6a1addfb1d6520b7f720e0dff37f049587c1a6962b71553e45462534507c48ff8a47f5f8f5057503ba0bb0d6f930b7390335cc2e7834a3aa372b20dcde0bf4919c00d0b1b6f6f5950ed4ed6010d722fe8c186ae09d4da5cd06aa5507d415b4883425293daf85ff2b6d652a3e89b10881ae3c82a3b5036a16dc39ac4da01270c2eddf1a4e6c7d6f91303a52c73b1cf095f043c9bd8bb2002bc34e86893a3829a23e88fd0ffb1d41d7d957434c6423e7abc9b4e9d2a15c0034c652cb5ffe5e389b89ede37d378ada6a13448b6d0a23a56db2a8295801752013c7cd83fc3560348fffdc6f68802664e50ab7f59d1f1cfd4be841f2b0ac86b9224a5e45058408aa8b0e6c8be7a3a00929afcaf6dcf63456a4dac829174f545dfc7fe2a6b6e10bb521ad50efef8b8f1d027fa094cfb0a2ccd4dc047002b27b58f816ed3caa504dbd4a737dba1cd7c6f54045d173e25455ad96350bf6da79cc512b6cfdd5c51d00cbe8dfb1f8eb850fef100c4654daaef3bcc22ea933c771dbc9aab243bc5cad5d87a4f01e771f7b2514586277300890ca6fc2e3fe634a1d4a48af04d6bb18d8be90c4bdfbefbf8134aa36a09628dff496" + "ring_proof": "a4def8772d5b859cb07c286c9d4246d95ea8164dc0f14ff8231a0e8578ca71f1f985a1933149dcbcc3dba84b90a7698a8885c963d5b8ee302ff675426f452b1fd3b1b463c814332956070952f4436c8746347a78824db3139f6704a0ee3daf45822d99c9c03be2e70a38863fe2bb2ea4f647f2c67441db9b8c2960e7f056a862982812e1890d2cbf2535820ec7a00226acce4d984d96feff1cfaed7a4fc1f69193b654a265b3dd11b7a793caecdb96d8e1d76a85cfb9785a8edd84c8806af1405d17ba38e060ff0e732f9eb179a89cf8713c8fd9667ec7f756b740ad48f43d6dcdeefc1dab34d4177a71e3453603343539ec352e5777234f1b8dee08f104a65de0b30b87c5b84f8db581743f8e7ab160e7f535aad0b1f5bd0952baeb4ac89237d86a9d3ee3d18ee1a9c36025be17af3eab7ffaa2bf7d0d61a22094707862210533a92e8b78eef633a6caa68bf4113f95f7cd25e7e7adc31385716afb9f0824395aa258e9d8603be886bf602d5724017704c06e61e11163f95e3ae88a96a63459ba2d56f4beda3eb3c9d04aa2b2454035c872c744e8c6d068192fea4c3d0e515eadbcdb570176690f2c4c36f17216725bf1c44d489efb6f47524c87059c2004197c229443b512bc20875c9ace7a1ba06a6c4c6030aa5c58a8bf5ad47468685dcbe109147951c09a3ec61f5b7f03ed6563913d31d5bdf4fc729c97b385a091a843becd0adeb7a610d285e6c901e8ac0388e3c469cc984c86f5490e2b3ed02b8aedb5f40bfb4e4d52c743b0036d184e081ae5f46e99b924b6c67d2d5ce9c3c7017f19fc7915d0c8f8f85849fd482a8007ff" } ] \ No newline at end of file diff --git a/data/zcash-srs-2-11-uncompressed.bin b/data/zcash-bls12-381-srs-2-11-uncompressed.bin similarity index 100% rename from data/zcash-srs-2-11-uncompressed.bin rename to data/zcash-bls12-381-srs-2-11-uncompressed.bin diff --git a/src/ring.rs b/src/ring.rs index eb20c08..4349ece 100644 --- a/src/ring.rs +++ b/src/ring.rs @@ -311,7 +311,7 @@ pub(crate) mod testing { use super::*; use crate::{pedersen, testing as common}; - const TEST_RING_SIZE: usize = 512; + pub const TEST_RING_SIZE: usize = 512; pub fn prove_verify() where @@ -373,6 +373,15 @@ pub(crate) mod testing { ($suite:ident, false) => {}; } + pub trait RingSuiteExt: RingSuite + where + BaseField: ark_ff::PrimeField, + CurveConfig: SWCurveConfig + Clone, + AffinePoint: SWMapping>, + { + fn ring_context() -> &'static RingContext; + } + pub struct TestVector where BaseField: ark_ff::PrimeField, @@ -392,11 +401,12 @@ pub(crate) mod testing { fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { f.debug_struct("TestVector") .field("pedersen", &self.pedersen) + .field("ring_proof", &"...") .finish() } } - impl common::TestVectorTrait for TestVector + impl common::TestVectorTrait for TestVector where BaseField: ark_ff::PrimeField, CurveConfig: SWCurveConfig + Clone, @@ -412,16 +422,11 @@ pub(crate) mod testing { let input = Input::::from(pedersen.base.h); let output = Output::from(pedersen.base.gamma); - // TODO: RingSuiteExt with a function to get a reference to the ring context ('static) - // ring_ctx = RingSuiteExt::context() - // The suite is then in charge of its construction - // TODO: also dump the verifier pks commitmet + let ring_ctx = ::ring_context(); + let ring_size = ring_ctx.max_ring_size(); use ark_std::rand::SeedableRng; let rng = &mut rand_chacha::ChaCha20Rng::from_seed([0x11; 32]); - let ring_ctx = RingContext::::from_rand(TEST_RING_SIZE, rng); - let ring_size = ring_ctx.max_ring_size(); - let prover_idx = 3; let mut pks = common::random_vec::>(ring_size, Some(rng)); pks[prover_idx] = public.0; @@ -438,6 +443,7 @@ pub(crate) mod testing { assert_eq!(p.0, p.1); } + // TODO: also dump the verifier pks commitmet Self { pedersen, ring: proof.ring_proof, @@ -446,7 +452,7 @@ pub(crate) mod testing { fn from_map(map: &common::TestVectorMap) -> Self { let pedersen = pedersen::testing::TestVector::from_map(map); - let ring_bytes = map.item_bytes("ring-proof"); + let ring_bytes = map.item_bytes("ring_proof"); let ring_proof = RingProof::::deserialize_compressed(&ring_bytes[..]).unwrap(); Self { pedersen, @@ -459,7 +465,7 @@ pub(crate) mod testing { let mut ring_proof_raw = Vec::new(); self.ring.serialize_compressed(&mut ring_proof_raw).unwrap(); let ring_proof_hex = hex::encode(ring_proof_raw); - map.0.insert("ring-proof".to_string(), ring_proof_hex); + map.0.insert("ring_proof".to_string(), ring_proof_hex); map } @@ -471,11 +477,11 @@ pub(crate) mod testing { let secret = Secret::from_scalar(self.pedersen.base.sk); let public = secret.public(); - use ark_std::rand::SeedableRng; - let rng = &mut rand_chacha::ChaCha20Rng::from_seed([0x11; 32]); - let ring_ctx = RingContext::::from_rand(TEST_RING_SIZE, rng); + let ring_ctx = ::ring_context(); let ring_size = ring_ctx.max_ring_size(); + use ark_std::rand::SeedableRng; + let rng = &mut rand_chacha::ChaCha20Rng::from_seed([0x11; 32]); let prover_idx = 3; let mut pks = common::random_vec::>(ring_size, Some(rng)); pks[prover_idx] = public.0; @@ -497,7 +503,7 @@ pub(crate) mod testing { } // TODO - // #[cfg(feature = "test-vectors")] + #[cfg(feature = "test-vectors")] { // Check if Ring proof matches let mut p = (Vec::new(), Vec::new()); diff --git a/src/suites/bandersnatch.rs b/src/suites/bandersnatch.rs index b95b728..239f82f 100644 --- a/src/suites/bandersnatch.rs +++ b/src/suites/bandersnatch.rs @@ -305,6 +305,23 @@ mod test_vectors_ring_ed { "/data/bandersnatch_ed_sha512_ell2_ring_vectors.json" ); + impl crate::ring::testing::RingSuiteExt for BandersnatchSha512Ell2 { + fn ring_context() -> &'static RingContext { + use ark_serialize::CanonicalDeserialize; + use std::sync::OnceLock; + static RING_CTX: OnceLock = OnceLock::new(); + RING_CTX.get_or_init(|| { + use std::{fs::File, io::Read}; + let mut file = File::open(crate::testing::PCS_SRS_FILE).unwrap(); + let mut buf = Vec::new(); + file.read_to_end(&mut buf).unwrap(); + let pcs_params = + PcsParams::deserialize_uncompressed_unchecked(&mut &buf[..]).unwrap(); + RingContext::from_srs(crate::ring::testing::TEST_RING_SIZE, pcs_params).unwrap() + }) + } + } + #[test] #[ignore = "test vectors generator"] fn generate() { @@ -377,6 +394,23 @@ mod test_vectors_ring_sw { "/data/bandersnatch_sw_sha512_tai_ring_vectors.json" ); + impl crate::ring::testing::RingSuiteExt for BandersnatchSha512Tai { + fn ring_context() -> &'static RingContext { + use ark_serialize::CanonicalDeserialize; + use std::sync::OnceLock; + static RING_CTX: OnceLock = OnceLock::new(); + RING_CTX.get_or_init(|| { + use std::{fs::File, io::Read}; + let mut file = File::open(crate::testing::PCS_SRS_FILE).unwrap(); + let mut buf = Vec::new(); + file.read_to_end(&mut buf).unwrap(); + let pcs_params = + PcsParams::deserialize_uncompressed_unchecked(&mut &buf[..]).unwrap(); + RingContext::from_srs(crate::ring::testing::TEST_RING_SIZE, pcs_params).unwrap() + }) + } + } + #[test] #[ignore = "test vectors generator"] fn generate() { diff --git a/src/testing.rs b/src/testing.rs index 664796e..7d13a80 100644 --- a/src/testing.rs +++ b/src/testing.rs @@ -8,9 +8,9 @@ use ark_std::{rand::RngCore, UniformRand}; pub const TEST_SEED: &[u8] = b"seed"; // Zcash SRS file derived from (https://zfnd.org/conclusion-of-the-powers-of-tau-ceremony). -const PCS_SRS_FILE: &str = concat!( +pub const PCS_SRS_FILE: &str = concat!( env!("CARGO_MANIFEST_DIR"), - "/data/zcash-srs-2-11-uncompressed.bin" + "/data/zcash-bls12-381-srs-2-11-uncompressed.bin" ); /// Generate a vector of random values.