1
0
mirror of https://github.com/bitcoin/bips.git synced 2024-11-19 09:50:06 +01:00
bitcoin-bips/bip-0324/xswiftec_inv_test_vectors.csv
Pieter Wuille cc177ab7bc BIP324 updates
Includes:
* Simpler (but equivalent) ElligatorSwift encoding function & spec
* Improved test vectors
* Test vector generation code
* Code for converting test vectors for libsecp256k1 code.
* Code for running test vectors against SwiftEC paper authors' code.
* Miscellaneous reference code improvements (style, comments).
2023-01-11 17:39:56 -05:00

16 KiB

1uxcase0_tcase1_tcase2_tcase3_tcase4_tcase5_tcase6_tcase7_tcomment
205ff6bdad900fc3261bc7fe34e2fb0f569f06e091ae437d3a52e9da0cbfb959080cdf63774ec7022c89a5a8558e373a279170285e0ab27412dbce510bdfe23fc45654798ece071ba79286d04f7f3eb1c3f1d17dd883610f2ad2efd82a287466b0aeaa886f6b76c7158452418cbf5033adc5747e9e9b5d3b2303db96936528557ba9ab867131f8e4586d792fb080c14e3c0e2e82277c9ef0d52d1027c5d78b5c4f51557790948938ea7badbe7340afcc523a8b816164a2c4dcfc24695c9ad76d8case0:bad[valid_x(-x-u)];case1:bad[valid_x(-x-u)];case2:info[v=0]&ok;case3:ok;case4:bad[valid_x(-x-u)];case5:bad[valid_x(-x-u)];case6:info[v=0]&ok;case7:ok
31737a85f4c8d146cec96e3ffdca76d9903dcf3bd53061868d478c78c63c2aa9e39e48dd150d2f429be088dfd5b61882e7e8407483702ae9a5ab35927b15f85ea1be8cc0b04be0c681d0c6a68f733f82c6c896e0c8a262fcd392918e303a7abf4605b5814bf9b8cb066667c9e5480d22dc5b6c92f14b4af3ee0a9eb83b03685e3e41733f4fb41f397e2f3959708cc07d3937691f375d9d032c6d6e71bfc58503b9fa4a7eb4064734f99998361ab7f2dd23a4936d0eb4b50c11f56147b4fc9764ccase0:ok;case1:ok;case2:info[v=0]&bad[non_square(s)];case3:bad[non_square(s)];case4:ok;case5:ok;case6:info[v=0]&bad[non_square(s)];case7:bad[non_square(s)]
41aaa1ccebf9c724191033df366b36f691c4d902c228033ff4516d122b2564f68c75541259d3ba98f207eaa30c69634d187d0b6da594e719e420f4898638fc5b0case0:bad[valid_x(-x-u)];case1:bad[valid_x(-x-u)];case2:bad[non_square(q)];case3:bad[non_square(q)];case4:bad[valid_x(-x-u)];case5:bad[valid_x(-x-u)];case6:bad[non_square(q)];case7:bad[non_square(q)]
52323a1d079b0fd72fc8bb62ec34230a815cb0596c2bfac998bd6b84260f5dc26239342dfb675500a34a196310b8d87d54f49dcac9da50c1743ceab41a7b249fff63580b8aa49c4846de56e39e1b3e73f171e881eba8c66f614e67e5c975dfc07b6307b332e699f1cf77841d90af25365404deb7fed5edb3090db49e642a156b609ca7f4755b63b7b921a91c61e4c18c0e8e177e145739909eb1981a268a2002849cf84ccd19660e30887be26f50dac9abfb2148012a124cf6f24b618bd5ea579case0:ok;case1:ok;case2:bad[non_square(q)];case3:bad[non_square(q)];case4:ok;case5:ok;case6:bad[non_square(q)];case7:bad[non_square(q)]
62dc90e640cb646ae9164c0b5a9ef0169febe34dc4437d6e46acb0e27e219d1e8d236f19bf349b9516e9b3f4a5610fe960141cb23bbc8291b9534f1d71de62a47e69df7d9c026c36600ebdf588072675847c0c431c8eb730682533e964b6252c94f18bbdf7c2d6c5f818c18802fa35cd069eaa79fff74e4fc837c80d93fece2f8196208263fd93c99ff1420a77f8d98a7b83f3bce37148cf97dacc168b49da966b0e7442083d293a07e73e77fd05ca32f96155860008b1b037c837f25c0131937case0:ok;case1:info[v=0]&ok;case2:bad[non_square(q)];case3:bad[non_square(q)];case4:ok;case5:info[v=0]&ok;case6:bad[non_square(q)];case7:bad[non_square(q)]
73edd7b3980e2f2f34d1409a207069f881fda5f96f08027ac4465b63dc278d672053a98de4a27b1961155822b3a3121f03b2a14458bd80eb4a560c4c7a85c149cb3dae4b7dcf858e4c6968057cef2b156465431526538199cf52dc1b2d62fda304aa77dd55d6b6d3cfa10cc9d0fe42f79232e4575661049ae36779c1d0c666d884c251b482307a71b39697fa8310d4ea9b9abcead9ac7e6630ad23e4c29d021ffb558822aa29492c305ef3362f01bd086dcd1ba8a99efb651c98863e1f3998ea7case0:bad[valid_x(-x-u)];case1:bad[valid_x(-x-u)];case2:ok;case3:ok;case4:bad[valid_x(-x-u)];case5:bad[valid_x(-x-u)];case6:ok;case7:ok
84295737efcb1da6fb1d96b9ca7dcd1e320024b37a736c4948b62598173069f70fa7ffe4f25f88362831c087afe2e8a9b0713e2cac1ddca6a383205a266f14307case0:bad[non_square(s)];case1:bad[non_square(s)];case2:bad[non_square(s)];case3:bad[non_square(s)];case4:bad[non_square(s)];case5:bad[non_square(s)];case6:bad[non_square(s)];case7:bad[non_square(s)]
9587c1a0cee91939e7f784d23b963004a3bf44f5d4e32a0081995ba20b0fca59e2ea988530715e8d10363907ff25124524d471ba2454d5ce3be3f04194dfd3a3ccfd5a094aa0b9b8891b76c6ab9438f66aa1c095a65f9f70135e8171292245e74a89057d7c6563f0d6efa19ae84412b8a7b47e791a191ecdfdf2af84fd97bc339475d0ae9ef46920df07b34117be5a0817de1023e3cc32689e9be145b406b0aefa0759178ad80232454f827ef05ea3e72ad8d75418e6d4cc1cd4f5306c5e7c453302a5f6b55f464776e48939546bc709955e3f6a59a0608feca17e8ec6ddb9dbb576fa82839a9c0f29105e6517bbed47584b8186e5e6e132020d507af268438f6b8a2f51610b96df20f84cbee841a5f7e821efdc1c33cd9761641eba3bf94f1405f8a6e87527fdcdbab07d810fa15c18d52728abe7192b33e32b0acf83a1837dccase0:ok;case1:ok;case2:ok;case3:ok;case4:ok;case5:ok;case6:ok;case7:ok
105fa88b3365a635cbbcee003cce9ef51dd1a310de277e441abccdb7be1e4ba24979461ff62bfcbcac4249ba84dd040f2cec3c63f725204dc7f464c16bf0ff31706bb700e1f4d7e236e8d193ff4a76c1b3bcd4e2b25acac3d51c8dac653fe909a0f4c73410633da7f63a4f1d55aec6dd32c4c6d89ee74075edb5515ed90da9e6839448ff1e0b281dc9172e6c00b5893e4c432b1d4da5353c2ae3725399c016f28f0b38cbef9cc25809c5b0e2aa513922cd3b39276118bf8a124aaea125f25615accase0:bad[non_square(s)];case1:bad[non_square(s)];case2:ok;case3:info[v=0]&ok;case4:bad[non_square(s)];case5:bad[non_square(s)];case6:ok;case7:info[v=0]&ok
116fb31c7531f03130b42b155b952779efbb46087dd9807d241a48eac63c3d96d656f81be753e8d4ae4940ea6f46f6ec9fda66a6f96cc95f506cb2b57490e9426059059774795bdb7a837fbe1140a5fa59984f48af8df95d57dd6d1c05437dcec122a644db79376ad4e7b3a009e58b3f13137c54fdf911122cc93667c47077d784a6fa688b86a424857c8041eebf5a05a667b0b7507206a2a82292e3f9bc822d6edd59bb2486c8952b184c5ff61a74c0ecec83ab0206eeedd336c9983a8f8824abcase0:bad[valid_x(-x-u)];case1:bad[valid_x(-x-u)];case2:ok;case3:info[v=0]&ok;case4:bad[valid_x(-x-u)];case5:bad[valid_x(-x-u)];case6:ok;case7:info[v=0]&ok
12704cd226e71cb6826a590e80dac90f2d2f5830f0fdf135a3eae3965bff25ff12138e0afa68936ee670bd2b8db53aedbb7bea2a8597388b24d0518edd22ad66eccase0:bad[non_square(s)];case1:bad[non_square(s)];case2:bad[non_square(q)];case3:bad[non_square(q)];case4:bad[non_square(s)];case5:bad[non_square(s)];case6:bad[non_square(q)];case7:bad[non_square(q)]
13725e914792cb8c8949e7e1168b7cdd8a8094c91c6ec2202ccd53a6a18771edeb8da16eb86d347376b6181ee9748322757f6b36e3913ddfd332ac595d788e0e44dd357786b9f6873330391aa5625809654e43116e82a5a5d82ffd1d6624101fc4a0b7efca01814594c59c9aae8e49700186ca5d95e88bcc80399044d9c2d8613d22ca8879460978cccfc6e55a9da7f69ab1bcee917d5a5a27d002e298dbefdc6b5f481035fe7eba6b3a63655171b68ffe7935a26a1774337fc66fbb253d279af2case0:ok;case1:info[v=0]&ok;case2:bad[non_square(s)];case3:bad[non_square(s)];case4:ok;case5:info[v=0]&ok;case6:bad[non_square(s)];case7:bad[non_square(s)]
1478fe6b717f2ea4a32708d79c151bf503a5312a18c0963437e865cc6ed3f6ae978701948e80d15b5cd8f72863eae40afc5aced5e73f69cbc8179a33902c094d98case0:bad[non_square(s)];case1:info[v=0]&bad[non_square(s)];case2:bad[non_square(q)];case3:bad[non_square(q)];case4:bad[non_square(s)];case5:info[v=0]&bad[non_square(s)];case6:bad[non_square(q)];case7:bad[non_square(q)]
157c37bb9c5061dc07413f11acd5a34006e64c5c457fdb9a438f217255a961f50d5c1a76b44568eb59d6789a7442d9ed7cdc6226b7752b4ff8eaf8e1a95736e507b94d30cd7dbff60b64620c17ca0fafaa40b3d1f52d077a60a2e0cafd145086c246b2cf32824009f49b9df3e835f05055bf4c2e0ad2f8859f5d1f3501ebaf756dcase0:bad[non_square(s)];case1:bad[non_square(s)];case2:info[q=0]&info[X=0]&ok;case3:info[q=0]&bad[r=0];case4:bad[non_square(s)];case5:bad[non_square(s)];case6:info[q=0]&info[X=0]&ok;case7:info[q=0]&bad[r=0]
1682388888967f82a6b444438a7d44838e13c0d478b9ca060da95a41fb94303de629e9654170628fec8b4972898b113cf98807f4609274f4f3140d0674157c90a0case0:bad[non_square(s)];case1:bad[non_square(s)];case2:bad[non_square(s)];case3:info[v=0]&bad[non_square(s)];case4:bad[non_square(s)];case5:bad[non_square(s)];case6:bad[non_square(s)];case7:info[v=0]&bad[non_square(s)]
1791298f5770af7a27f0a47188d24c3b7bf98ab2990d84b0b898507e3c561d6472144f4ccbd9a74698a88cbf6fd00ad886d339d29ea19448f2c572cac0a07d5562e6a0ffa3807f09dadbe71e0f4be4725f2832e76cad8dc1d943ce839375eff248837b8e68d4917544764ad0903cb11f8615d2823cefbb06d89049dbabc69befda195f005c7f80f6252418e1f0b41b8da0d7cd189352723e26bc317c6b8a1009e77c8471972b6e8abb89b52f6fc34ee079ea2d7dc31044f9276fb6245339640c55case0:ok;case1:ok;case2:bad[non_square(s)];case3:info[v=0]&bad[non_square(s)];case4:ok;case5:ok;case6:bad[non_square(s)];case7:info[v=0]&bad[non_square(s)]
18b682f3d03bbb5dee4f54b5ebfba931b4f52f6a191e5c2f483c73c66e9ace97e1904717bf0bc0cb7873fcdc38aa97f19e3a62630972acff92b24cc6dda197cb96case0:bad[valid_x(-x-u)];case1:bad[valid_x(-x-u)];case2:bad[non_square(s)];case3:bad[non_square(s)];case4:bad[valid_x(-x-u)];case5:bad[valid_x(-x-u)];case6:bad[non_square(s)];case7:bad[non_square(s)]
19c17ec69e665f0fb0dbab48d9c2f94d12ec8a9d7eacb58084833091801eb0b80b147756e66d96e31c426d3cc85ed0c4cfbef6341dd8b285585aa574ea0204b55e6f4aea431a0043bdd03134d6d9159119ce034b88c32e50e8e36c4ee45eac7ae9fd5be16d4ffa2690126c67c3ef7cb9d29b74d397c78b06b3605fda34dc9696a65e9c60792a2f000e45c6250f296f875e174efc0e9703e628706103a9dd2d82c790b515bce5ffbc422fcecb2926ea6ee631fcb4773cd1af171c93b11aa153814602a41e92b005d96fed93983c1083462d648b2c683874f94c9fa025ca23696589a1639f86d5d0fff1ba39daf0d69078a1e8b103f168fc19d78f9efc5522d27968case0:ok;case1:ok;case2:info[q=0]&info[X=0]&ok;case3:info[q=0]&bad[r=0];case4:ok;case5:ok;case6:info[q=0]&info[X=0]&ok;case7:info[q=0]&bad[r=0]
20c25172fc3f29b6fc4a1155b8575233155486b27464b74b8b260b499a3f53cb141ea9cbdb35cf6e0329aa31b0bb0a702a65123ed008655a93b7dcd5280e52e1ab7422edc7843136af0053bb8854448a8299994f9ddcefd3a9a92d45462c59298a78c7774a266f8b97ea23d05d064f033c77319f923f6b78bce4e20bf05fa5398d8bdd12387bcec950ffac4477abbb757d6666b06223102c5656d2bab8d3a6d2a5873888b5d990746815dc2fa2f9b0fcc388ce606dc09487431b1df40ea05ac2a2case0:bad[non_square(s)];case1:bad[non_square(s)];case2:ok;case3:ok;case4:bad[non_square(s)];case5:bad[non_square(s)];case6:ok;case7:ok
21cab6626f832a4b1280ba7add2fc5322ff011caededf7ff4db6735d5026dc03672b2bef0852c6f7c95d72ac99a23802b875029cd573b248d1f1b3fc8033788eb6case0:bad[non_square(s)];case1:bad[non_square(s)];case2:info[v=0]&bad[non_square(s)];case3:bad[non_square(s)];case4:bad[non_square(s)];case5:bad[non_square(s)];case6:info[v=0]&bad[non_square(s)];case7:bad[non_square(s)]
22d8621b4ffc85b9ed56e99d8dd1dd24aedcecb14763b861a17112dc771a104fd2812cabe972a22aa67c7da0c94d8a936296eb9949d70c37cb2b2487574cb3ce58fbc5febc6fdbc9ae3eb88a93b982196e8b6275a6d5a73c17387e000c711bd0e38724c96bd4e5527f2dd195a51c468d2d211ba2fac7cbe0b4b3434253409fb42d043a014390243651c147756c467de691749d8a592a58c3e8c781fff28ee42b4c78db36942b1aad80d22e6a5ae3b972d2dee45d0538341f4b4cbcbdabbf604802case0:ok;case1:ok;case2:bad[non_square(s)];case3:bad[non_square(s)];case4:ok;case5:ok;case6:bad[non_square(s)];case7:bad[non_square(s)]
23da463164c6f4bf7129ee5f0ec00f65a675a8adf1bd931b39b64806afdcda9a2225b9ce9b390b408ed611a0f13ff09a598a57520e426ce4c649b7f94f2325620dcase0:bad[non_square(s)];case1:info[v=0]&bad[non_square(s)];case2:bad[non_square(s)];case3:bad[non_square(s)];case4:bad[non_square(s)];case5:info[v=0]&bad[non_square(s)];case6:bad[non_square(s)];case7:bad[non_square(s)]
24dafc971e4a3a7b6dcfb42a08d9692d82ad9e7838523fcbda1d4827e14481ae2d250368e1b5c58492304bd5f72696d27d526187c7adc03425e2b7d81dbb7e4e02370c28f1be665efacde6aa436bf86fe21e6e314c1e53dd040e6c73a46b4c8c49cd8acee98ffe56531a84d7eb3e48fa4034206ce825ace907d0edf0eaeb5e9ca2c8f3d70e4199a105321955bc9407901de191ceb3e1ac22fbf1938c5a94b36fe6327531167001a9ace57b2814c1b705bfcbdf9317da5316f82f120f1414a15f8dcase0:bad[non_square(s)];case1:info[v=0]&bad[non_square(s)];case2:ok;case3:ok;case4:bad[non_square(s)];case5:info[v=0]&bad[non_square(s)];case6:ok;case7:ok
25e0294c8bc1a36b4166ee92bfa70a5c34976fa9829405efea8f9cd54dcb29b99eae9690d13b8d20a0fbbf37bed8474f67a04e142f56efd78770a76b359165d8a1dcd45d935613916af167b029058ba3a700d37150b9df34728cb05412c16d4182232ba26ca9ec6e950e984fd6fa745c58ff2c8eaf4620cb8d734fabec3e92baadcase0:bad[valid_x(-x-u)];case1:bad[valid_x(-x-u)];case2:info[q=0]&info[X=0]&ok;case3:info[q=0]&bad[r=0];case4:bad[valid_x(-x-u)];case5:bad[valid_x(-x-u)];case6:info[q=0]&info[X=0]&ok;case7:info[q=0]&bad[r=0]
26e148441cd7b92b8b0e4fa3bd68712cfd0d709ad198cace611493c10e97f5394e164a639794d74c53afc4d3294e79cdb3cd25f99f6df45c000f758aba54d699c0case0:bad[valid_x(-x-u)];case1:bad[valid_x(-x-u)];case2:bad[non_square(s)];case3:info[v=0]&bad[non_square(s)];case4:bad[valid_x(-x-u)];case5:bad[valid_x(-x-u)];case6:bad[non_square(s)];case7:info[v=0]&bad[non_square(s)]
27e4b00ec97aadcca97644d3b0c8a931b14ce7bcf7bc8779546d6e35aa5937381c94e9588d41647b3fcc772dc8d83c67ce3be003538517c834103d2cd49d62ef4dc88d25f41407376bb2c03a7fffeb3ec7811cc43491a0c3aac0378cdc78357bee51c02636ce00c2345ecd89adb6089fe4d5e18ac924e3145e6669501cd37a00d4205b3512db40521cb200952e67b46f67e09e7839e0de44004138329ebd9138c558aab390ab6fb55c1d1b80897a207ce94a78fa5b4aa61a33398bcae9adb20d3e3772da0bebf8c8944d3fc5800014c1387ee33bcb6e5f3c553fc8732287ca8041ae3fd9c931ff3dcba132765249f7601b2a1e7536db1ceba19996afe22c85fb5bdfa4caed24bfade34dff6ad1984b90981f6187c61f21bbffbec7cd60426ec36aa7554c6f54904aa3e2e47f7685df8316b58705a4b559e5ccc6743515524deef1case0:ok;case1:ok;case2:ok;case3:info[v=0]&ok;case4:ok;case5:ok;case6:ok;case7:info[v=0]&ok
28e5bbb9ef360d0a501618f0067d36dceb75f5be9a620232aa9fd5139d0863fde5e5bbb9ef360d0a501618f0067d36dceb75f5be9a620232aa9fd5139d0863fde5case0:bad[valid_x(-x-u)];case1:bad[valid_x(-x-u)];case2:bad[s=0];case3:bad[s=0];case4:bad[valid_x(-x-u)];case5:bad[valid_x(-x-u)];case6:bad[s=0];case7:bad[s=0]
29e6bcb5c3d63467d490bfa54fbbc6092a7248c25e11b248dc2964a6e15edb145719434a3c29cb982b6f405ab04439f6d58db73da1ee4db723d69b591da124e7d867119877832ab8f459a821656d8261f544a553b89ae4f25c52a97134b70f3426ffee02f5e649c07f0560eff1867ec7b32d0e595e9b1c0ea6e2a4fc70c97cd71fb5e0c189eb5b4bacd025b7444d74178be8d5246cfa4a9a207964a057ee9699925746e4591bf7f4c3044609ea372e908603975d279fdef8349f0b08d32f07619d98ee67887cd5470ba657de9a927d9e0abb5aac47651b0da3ad568eca48f0c8090011fd0a19b63f80fa9f100e7981384cd2f1a6a164e3f1591d5b038e368325104a1f3e7614a4b4532fda48bbb28be874172adb9305b565df869b5fa71169629da8b91ba6e4080b3cfbb9f615c8d16f79fc68a2d8602107cb60f4f72bd0f89a92case0:ok;case1:info[v=0]&ok;case2:ok;case3:ok;case4:ok;case5:info[v=0]&ok;case6:ok;case7:ok
30f28fba64af766845eb2f4302456e2b9f8d80affe57e7aae42738d7cddb1c2ce6f28fba64af766845eb2f4302456e2b9f8d80affe57e7aae42738d7cddb1c2ce64f867ad8bb3d840409d26b67307e62100153273f72fa4b7484becfa14ebe74085bbc4f59e452cc5f22a99144b10ce8989a89a995ec3cea1c91ae10e8f721bb5db079852744c27bfbf62d9498cf819deffeacd8c08d05b48b7b41305db1418827a443b0a61bad33a0dd566ebb4ef317676576566a13c315e36e51ef1608de40d2case0:ok;case1:ok;case2:bad[s=0];case3:bad[s=0];case4:ok;case5:ok;case6:bad[s=0];case7:bad[s=0]
31f455605bc85bf48e3a908c31023faf98381504c6c6d3aeb9ede55f8dd528924dd31fbcd5cdb798f6c00db6692f8fe8967fa9c79dd10958f4a194f01374905e990c00c5715b56fe632d814ad8a77f8e66628ea47a6116834f8c1218f3a03cbd50df88e44fac84fa52df4d59f48819f18f6a8cd4151d162afaf773166f57c7ff46f3ff3a8ea4a9019cd27eb527588071999d715b859ee97cb073ede70b5fc33edf20771bb0537b05ad20b2a60b77e60e7095732beae2e9d505088ce98fa837fce9case0:bad[non_square(s)];case1:bad[non_square(s)];case2:info[v=0]&ok;case3:ok;case4:bad[non_square(s)];case5:bad[non_square(s)];case6:info[v=0]&ok;case7:ok
32f58cd4d9830bad322699035e8246007d4be27e19b6f53621317b4f309b3daa9d78ec2b3dc0948de560148bbc7c6dc9633ad5df70a5a5750cbed721804f082a3b6c4c580b76c7594043569f9dae16dc2801c16a1fbe12860881b75f8ef929bce594231355e7385c5f25ca436aa64191471aea4393d6e86ab7a35fe2afacaefd0ddff2a1951ada6db574df834048149da3397a75b829abf58c7e69db1b41ac0989a52b66d3c907035548028bf804711bf422aba95f1a666fc86f4648e05f29caae93b3a7f48938a6bfbca9606251e923d7fe3e95e041ed79f77e48a07006d63f4a6bdcecaa18c7a3a0da35bc9559be6eb8e515bc6c291795485ca01d4f5350ff22200d5e6ae525924a8b207cbfb7eb625cc6858a47d6540a73819624e3be53f2a65ad4992c36f8fcaab7fd7407fb8ee40bdd5456a0e599903790b9b71ea0d63181case0:ok;case1:ok;case2:info[v=0]&ok;case3:ok;case4:ok;case5:ok;case6:info[v=0]&ok;case7:ok
33fd7d912a40f182a3588800d69ebfb5048766da206fd7ebc8d2436c81cbef64218d37c862054debe731694536ff46b273ec122b35a9bf1445ac3c4ff9f262c952case0:bad[valid_x(-x-u)];case1:bad[valid_x(-x-u)];case2:info[v=0]&bad[non_square(s)];case3:bad[non_square(s)];case4:bad[valid_x(-x-u)];case5:bad[valid_x(-x-u)];case6:info[v=0]&bad[non_square(s)];case7:bad[non_square(s)]