Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deterministic Pedersen secret blinding factor generation #24

Merged
merged 11 commits into from
Jul 26, 2024
Merged
5 changes: 4 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,12 @@ indexmap = { version = "2.2.6", features = ["serde"] }
default = [ "std" ]
std = [
"ark-std/std",
"ark-std/getrandom",
"ark-ec/std",
"ring-proof?/std",
"getrandom"
]
getrandom = [
"ark-std/getrandom",
]
secp256r1 = [
"ark-secp256r1",
Expand Down
60 changes: 30 additions & 30 deletions data/bandersnatch_ed_sha512_ell2_pedersen_vectors.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
"h": "bb21b9e639f2f712abdacd1d7d3b85e9d02674e768268a0f99fd78231f23adbe",
"gamma": "9d1326a5c7bc71cb746a961ffc0a83ccb2da6be3fd13081fdb4515c91e54c9d0",
"beta": "be2af0216454b40a366b8216d78a7b7a065eb90c8e30027bac51f6bb88fd04800afc968223ef2c5e7fc3a042b24515cac54177186661af9e3b87bd215454e4a8",
"blinding": "da15f919c93a5ed24add36ab4dc014fe195280b7ebc851526069a9acf599b006",
"proof_pkb": "a040683d30fed4a5e6b01e0d89c05aa8c774f5b22c6ab09904d236272e6d7c28",
"proof_r": "741e85156557d156fc2bb4ff69bb16c68403bb2285a26563953ee824c0cabf05",
"blinding": "849cfd29b6d7895e74dd880b5a4830f2d7bfee3635952248222352128c95c11a",
"proof_pk_com": "fd548179ad9785279c2e4bef57691d44cbd5e5f987c0a557b50a886b5f626b16",
"proof_r": "b955eb287c976142bf2ef749547b5e00a96ede71adf1594e68056efc23682fd6",
"proof_ok": "bd35d97a9ac7943fcb8821c98f3fae58c6ae318fe67f9dfa9006882d5d4852c6",
"proof_s": "8b071af2cd0efa87c03ed998999d9b922c36eb809b302ad7e2f14661c1a9fa11",
"proof_sb": "1ec307f961297ae2745a645f40972df05dd63155b25fcfdb6eb467b2211d7606"
"proof_s": "4ed3f75b934efa196432d519e003c8d8eb4352c200f98ba33d0a7955d7843809",
"proof_sb": "30522ca67a2c3c830b8bd7007d3040c8be56ad8f42445a5519b5890ec0a1fd10"
},
{
"comment": "Bandersnatch_SHA-512_ELL2 - vector-2",
Expand All @@ -24,12 +24,12 @@
"h": "fb460da0b0d91803ba7157a3f4fba7377c5fdcbc107be32de2d3ba1b27bbdadb",
"gamma": "b38bd5cda1732f3e838c6d2cadbe741cffe6e7ee804f7186378a664f138b4509",
"beta": "50302f0b81a922f8d590c622863f434d79913379573aebcf4c7d637b6cf78450c57dbdbf011222a429b104b49ace7ddf7a98ca782100ff8b12c9d2aa36947e4b",
"blinding": "e1f3eed508b1bc3aa31526ad3faf39e41a85554e1a453f6522e1de2da1128813",
"proof_pkb": "6543166e9a5e62847ea649663690ee9a15b89a63eb08f65b686ad2e8aa06a2cd",
"proof_r": "81b4c295dd708bda8cdeee35967564f02bbb7d6fdb30e886a782681c93cd683f",
"blinding": "ebcef140bec6896c5a9e51e3f699253bf9c05210eba1e26ee5d8a89dd693ea01",
"proof_pk_com": "9fa964a4ab811002fc8fb6dc528ab8e0b30018f5504650950a390241a24462d1",
"proof_r": "0cf2d07e25bd61205b28d1b7047f5521b7b94f4ea2b93d10e5312e1d32924d8a",
"proof_ok": "eef78a380b9ace0eebd1c301b393264984e989c43ff99958e51f80b636067940",
"proof_s": "95cef876901db79643cc106b994815a92eca7703a9075b145bf244ede078f70e",
"proof_sb": "43f301b8061a9acc6154c89488fb6022a6795b02821a3e31e230528c97c8af09"
"proof_s": "ebd057092f42b2bcd5e5eaa3e0a6e08edcabc903e234f5b3b2195cafcc60eb08",
"proof_sb": "3a548fd781010a6a1f9e3490a6b0ab786bd5d5cccfd40d73606552d14cfbc700"
},
{
"comment": "Bandersnatch_SHA-512_ELL2 - vector-3",
Expand All @@ -40,12 +40,12 @@
"h": "54169525e90bf569c974bd8f68d462d4f0c245523ec082097cabcb9ca05f12e5",
"gamma": "14020183589d3848899ed56dd3a303db8238d675fd81f01918d1eec3c6ea6125",
"beta": "1e5d230c898b3710e0b5ccbde76900fb40be458724bbab61c74e30346c8ae0100a663395bbb73f5b3f8d63d674a3729b170b5ff00fac8a2b391c78586209e76e",
"blinding": "5225ce7829a87dd522d7ae5ee5c1f3dd19fabd39e218daebe9b402c6e7547b0c",
"proof_pkb": "9cc2cb53c955e0c1aa899a7306324db985d8f529eb50186ba85abe39cfbfe514",
"proof_r": "606be1adf7a19601a4c96a29437a2fa7d97e75fcfc645c2e10cde258c8579b88",
"blinding": "362be635848aa4217c81c816ffc1d18676c9fb90a85d4ac6f962a9fbe2749216",
"proof_pk_com": "42a7074f74c7df8f2ae964fc949a859b23be0c511bd3dc3be4cd14b7fc68d170",
"proof_r": "d393ad1a8c0f8ffc3961031fe88eba466e1d1c64bc97618bcfc551c9d4a4eb67",
"proof_ok": "6461caebd9f4b292e394268293abb114212188b727b6bcec98e6b02091d6540f",
"proof_s": "56a8e25de20d42ea530f4dc45c5c7771fc9d58a66c6d0572d9a9e9c1f540980d",
"proof_sb": "b265c404c661858a98a5f5404e957d71345b442f1f310b21401e64666908d51b"
"proof_s": "f20f82c89e5526b666668b2d7233ae7ef01ff60b3b9b42105e68021aa4db6202",
"proof_sb": "1b4bf3ede07a83922cac9efecc491f738a6d96cbca92f6720bd2c3a5ecec0f0a"
},
{
"comment": "Bandersnatch_SHA-512_ELL2 - vector-4",
Expand All @@ -56,12 +56,12 @@
"h": "889e4fef46be12a90de3a85fd228cbd401854cb6de9a53cd8e256c6fe98a1cb4",
"gamma": "1197b2dbc086a11938ca9b58230bba6c6d07396059abe1cb75c7498a981d8d3a",
"beta": "d3b2e4531f23f99677fafa456694121744f8ca7eb0733d54753b5bf3db5559b0fa3194fc6cbc06c63635fb222e3eca0c7e9d6fe8996dded951b469e256d159f5",
"blinding": "ce543e15dabb94ce66e64e683b42b6c95cd07b8c7fcbd16d2abd69f25c6a2114",
"proof_pkb": "ffc50e5462566fb623226d83c44835f1fc8e91f4eac0c2ef1d62d2eb3ebba970",
"proof_r": "7777a8ad0eda6f6bf44960424c34a4c865576fa7f383f7a21153833d6ffcf003",
"blinding": "b005ac39f9b07a7bca2740128331281e603e0a5cc53932b219ed53497d09760a",
"proof_pk_com": "ccdbe52f5316d98a54e081009781ecb40578a9c228bf03677727e48520838b4c",
"proof_r": "eb6a6d43dbed8bac9cb3b9134b11598870b63927f4e42c4665963a0fc30be6b7",
"proof_ok": "5c2e454a4dc8af49d832f68df9da1db322a59182cf6efa9aa74bb63639a90503",
"proof_s": "0d4f0d76d7d1bab7d7eee569097948511c82ea6e84183801c8d3e2b5a6894d18",
"proof_sb": "077129e3ee33436e641bdc1fd29eb87e8203a602955fe6bebd74bdba95b62214"
"proof_s": "63f6de93a95a6e7ce1d5691b6273211ffd804668b8acec275b138cf8082ecd14",
"proof_sb": "2d9a8e2f2b7f8875bcbe7dba4bff57b97ea7c65f09431a296c8f81b704b08214"
},
{
"comment": "Bandersnatch_SHA-512_ELL2 - vector-5",
Expand All @@ -72,12 +72,12 @@
"h": "45750b9ebdbe9d2d74a1d81e52b8ce882c2621aeb54f37521a1928ef6b242b34",
"gamma": "46c5db953de82d9035ce367b270b2666b29e56d255dfe4cb54d8c0816698c599",
"beta": "ac30d1fbd6e7c2f689b970eb46174de8dd5c3de3b0f7ca989d07ad453ff8a4221b888a140b37afed48823355b715f6e6320c9594238f400d8a5e8046c19f4014",
"blinding": "8b46d6bfb4f436c49d4c356eba768247607de1251ad87f10b119d67aa11cd507",
"proof_pkb": "68e0c96492e4d658a21bbb01fa2b76fa50331451932ac4957c57e96159be881f",
"proof_r": "4c0618af2c9b7c4814d0f3b16017861a7cc8dd1349918712cb4997d1c194564b",
"blinding": "4f3a7a6a7fef2b498abf9bcf9f5de740b48a08d595de9a4ed7531fe6011e0d14",
"proof_pk_com": "7aac13a049c570eaa5162c71ebac264f711a6d7e825f6b28fa1f8be17d0376bb",
"proof_r": "62a7f3ac432b3ed8893d022dd47c5cf68f6fd0f34186598636181dfad4b83091",
"proof_ok": "59f2cf5c9501e5a819680e4b0b2815b4e9228c1a5afa36c3eaba65d31f5611e9",
"proof_s": "2a909ff6546d8bab7ed13d8678577315251887847e299ab6abaec1a1bc8c2715",
"proof_sb": "0b3a3f06ea5f488a3273e93f16373e80a0c2cf8c7b542789c3d145ca6d69f400"
"proof_s": "b4e4f14aca98214eb642ce88ce2a48f892bcbf0ac816a20f4796be49aa8b5b1c",
"proof_sb": "89b3fe44a94e13f5170c02c06db5f2a4aded841a10ab129997f6e359414f2e0c"
},
{
"comment": "Bandersnatch_SHA-512_ELL2 - vector-6",
Expand All @@ -88,11 +88,11 @@
"h": "8af6936567d457e80f6715f403e20597c2ca58219974c3996a4e4414c3361635",
"gamma": "022abfa7670d5051a6a0e212467666abb955faafe7fe63446f50eb710383444c",
"beta": "126296afb914aa1225dfdddfe3bfd185b488801810e18034330b1c07409ccdc4f8deccfc30be219cb5186f80a523ae41720031ae39a78f18d3b14df8bb6d8e8a",
"blinding": "7529c9acdfb82d17361fd5cf0a7e8cea7da0fe88b21aa9f5bfb56c28dd8c4608",
"proof_pkb": "0cb8975799638c0f0dc14bf0752a5eaf6c66a8ca4f72c4da8c862da465da9c16",
"proof_r": "4dea915576f35148914e86e069cc75578a0e7a1e470f09de90ce14b950269bab",
"blinding": "d896feff98f1398b548f8c49500d41237c90a34876d82bd34553ab3ed5623110",
"proof_pk_com": "7ecf70faea2c4d82f6a7cef226d60d2d16cfccdf81a360fa15a7c8665299f89f",
"proof_r": "bc6d88b3b07be4880b772ad74f1e023bbe2e4f5a91b3c1f3a84ba190c8982ebb",
"proof_ok": "3639790d6414b474aa1d53de4e7a896b4e6458c078867acd22200f00f20f280a",
"proof_s": "f5f1e64505335f495e3b20e508cb075c0365420648ad612a02697d7d589b4704",
"proof_sb": "73b2c1137f7685652bc2d759f3fed7f6914976d49b71009478171d2defcea909"
"proof_s": "883c3324f6dc6f19047122be50db678e37c96fcc1d035c0d001cb5ee6a964216",
"proof_sb": "651e1b4fcf34ca04a4ed1f5fa46b6631849a59b07da392d081d63531682e6506"
}
]
60 changes: 30 additions & 30 deletions data/bandersnatch_sw_sha512_tai_pedersen_vectors.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
"h": "4b47d0c639c8c7b00ed5409caf2f1fc946c4e554537ea5775e86de30dd05170480",
"gamma": "5f3c9b5f8a80679b1bd335c46cfd35686750291704811d581f9e9a4904f8401b00",
"beta": "5f66fe722cb411ce93c415a8f5bf6ae9e8c95acd90762e11ebddba2727c3fa41813005dc6ce72078e0e9d0f4702b5fe0a7debfaf1e64c638c8a098b384ac4b69",
"blinding": "6af2737ccfffced39a0817fd50f83f0271277d7f937581711d7e2ebf26af8e17",
"proof_pkb": "abfbcc8c7492627b84febbaa663c6ee1b7578edd733790e4b8df2c9573cb163980",
"proof_r": "f324bde3e09c6eaa77d75bd056a0928e367bace280d6c9ed7b9e9920c318396600",
"blinding": "73d348cb42acf5e892f3fc2f94daa3def961cc0f14514b675587992f34414c18",
"proof_pk_com": "285df785693eb2e43bb3b2d05ec90f0788cb126ed5e4f2af88a7084dd199161700",
"proof_r": "0cda24b7cee0b04f89259222c2129b2e4fcc28699cf26c3da090516b016c466100",
"proof_ok": "bf337e250d9bc9d82763daadc4de97ae507bc5e7ffeaddb64c5c33c451cff76500",
"proof_s": "aa204fd08e125b7c344cbb0a962a2a60e62dd6ff0a84ecf146fc67fc803b670b",
"proof_sb": "70d1b5e3883d3d3e7c410c72e5a6acc503e437176c959cbac26b24488352b717"
"proof_s": "8c4860450e1cddb04acfb6bfd4d2463b4464c9daf94c76e76ee215fd2b411710",
"proof_sb": "8198b2ac3630fe48ce32f00a24418f6cf462919537e35d6c9a26cab9aeb87c0c"
},
{
"comment": "Bandersnatch_SHA-512_TAI - vector-2",
Expand All @@ -24,12 +24,12 @@
"h": "4bbd395c9760dd34c8a430b5f1949168218bd4004a79de863f1d1c8e80df630780",
"gamma": "60031e90dc2998241e5ae73e0237d08fe1aaca59431adb7c5e54fcf64e3e7c0080",
"beta": "333ce15eec798c112a1cee57484d66877e1001ba20537dd2bf6153e122d0851728a7c26e0201cbae348d9205a71d8846c4cd3e148b7ff50c484e1f1894e289e1",
"blinding": "2510f009befd8f06bf437a6e3e808b6386c533789efd10839af7bd5be140b112",
"proof_pkb": "0bb8e1d1173e0ce077f5ddcad51b2aa5b44b076b26764e7d582a83d090e1c45380",
"proof_r": "858b06d57afcd4d9bdc4f57b704964f7a921772a194683f58f9eccfc64b0e03f00",
"blinding": "2a5d700eb06ad15f691fb6f66a1ea5322a414b2fa7e5ad6fa3461358843f290a",
"proof_pk_com": "8fb0e107051a2dc07cc163afe16558bd05eb53e746d898f54b361e735b6af26480",
"proof_r": "d4f6373f4ce00fdf39bce0431051c0bae2127ec92631ecf56c9872a81793d25e80",
"proof_ok": "b47cf555af1472f1dda5cd581bbc85a6b5d0c7253f09ef95ed6f402fa6cdc66100",
"proof_s": "9839d0c3ebcacde50a8c1fb7254bb936e5777aa56dbc5920f1a81f2c7bfea012",
"proof_sb": "6c71e58e7ad4638aafe6606bb43c677b3cdca68527472b3237011dd30ed7f718"
"proof_s": "93f2dc496858993f2a1b560d98805ccacc788ad0b48b74e1ecbd6675f58a8119",
"proof_sb": "7b6cd688ee2442d5bc55a8c6894287f1e99f1105caad6b3abc3b71eefeef2706"
},
{
"comment": "Bandersnatch_SHA-512_TAI - vector-3",
Expand All @@ -40,12 +40,12 @@
"h": "1c7ee438bdc9a0fa33d7466cecb2b34b3584453567de9c14aa85c7de7948e84480",
"gamma": "718f7ea6e99c70dd9a54f6493ece5d27cfcdeb13d5629d10568ceb3096d6a93100",
"beta": "664617a664c598dc8b3513338d9fdcfee2b04f8bc77bb7225fd49258e2098f220d9ad054c74fa2cdd6e9f762ecaee89a08ab0957d21dfc8873fe1c39ffc300e5",
"blinding": "95a6f613cd7aeea954fa54dd49df153dc3ac65e774474311aed1daf43d36f015",
"proof_pkb": "594293c2b6bc7175dd7002f649e3057d41522cbde20842e17a5c38038d898b6f80",
"proof_r": "0d025552f31081e5b2dcaca15c1df8794b75ae6a179aeb23f6aee48435d4cc1700",
"blinding": "71f2a79e2dcd1d74e8144dc321e6c9578493b56c1f13eee3d2b8983dfe3e160f",
"proof_pk_com": "f565e1fe7ced5762032d3cdf30924be3da278a5b80ce9dfce8c567740a91362a00",
"proof_r": "dde1b6c4036e2fdad5481acd76c8f97299cf246efff4ee11425f2fecc9b05b4e80",
"proof_ok": "f67cc695f923c225f1cb5e84a6890519f288728e40dd952172acf552ef65d52080",
"proof_s": "32298b6accd300d34a7c5f43e9d2109440d9eba87f29c4c94bd28a9e591a4f07",
"proof_sb": "125f37f77711c23fe3ead959f9ea722c013fea9968583eae94eb7294decc0917"
"proof_s": "0c33830b49e1948e03df500a00d6c1aeebd378b57763666778c3a7e2be997412",
"proof_sb": "377ff70b369920598e4773afcc11b3cefa9764c541f8954dbf3b16a13bbffb11"
},
{
"comment": "Bandersnatch_SHA-512_TAI - vector-4",
Expand All @@ -56,12 +56,12 @@
"h": "9e689f17e75a53527cba47be2c005e1866635ea6b4df50d66d71fd15ca78310780",
"gamma": "f9522a47aaf42c87bb3981ab51be6be878c6212a13e788f5b5716ed630221c2b80",
"beta": "25178372616cc2632cac6c79d2af0dec6998ee6bba60aa7138fdb225590e68da81d2681e3c9d0e38b2ee7cd50ef7acf87b8a572b616edfbb3fe159301df5555b",
"blinding": "06f9e1d426e48dac4834dc780e199f9375ad551dc9e08d9aed8580ab2c820100",
"proof_pkb": "8643280135c000952c886c5a83a9ca3f47f4f68e830814b5bc800b2701b4936c80",
"proof_r": "fa80a01035ea1e466548703e48c16729dc1760fa59b5af873fb3b0fdd1d2293400",
"blinding": "562471c8de7e703466bc020d46936d22e687fdba6846ff04acc80f1a3a5e3d02",
"proof_pk_com": "6f727f76cedbfe0a9774375b75ed385d1494fbafc4d8524650b6d27b49e41b7000",
"proof_r": "1c27b8be50260c457980de3e7dd14d1c8ac3d85eb3a142a2fcd22c7fbb03fc3c00",
"proof_ok": "90e2f7da267cba03dea05c04b568c680814818853213e7811f94234c2a5c200e00",
"proof_s": "0f8cc5180c97a6f8a90f1fde2a0db1703fb54e55ee076e8eeaa30f4643e23718",
"proof_sb": "ba909724d4298f098ac95ba3ea834d7d874e7dec08333e5eff85a90bfa665017"
"proof_s": "b1d6cbc0f69859a4da72bd7222865957b1a2afa7ebebb20a4262c5ff0d82ac08",
"proof_sb": "5923611c047c76b6cb62eb69a5cb577153bb5f33b0638184ba656f27259dbd00"
},
{
"comment": "Bandersnatch_SHA-512_TAI - vector-5",
Expand All @@ -72,12 +72,12 @@
"h": "771e6bc0f01e01f4fbd38ab93ec61c35ada53c426dcf55bed039f7ada10aed6500",
"gamma": "47aa1025c292656b2ca74854033b8c92a48b02ad72271b642998a4384752af6080",
"beta": "f08a4e95ca4e9351a3f83f9921aabfa0771983cb6194fdfb22cf85128645ee0e3df03f7ec7e3b47e06dc602cce8d282672b4fcde522b69fc85e04f1300288bf8",
"blinding": "da04cc5ea6d07e29f13ee94425b710ebd9b0850dd9aaa90faf7494d5a291fa00",
"proof_pkb": "2edf2504d0ff19adf2bcef8386a90e4beb8d329fbd10e5f6e526a4eb8039524280",
"proof_r": "35300be08e65f990eda7a1c35bd1416b5e467e2b0af5de88ff362aa8f72ee93f80",
"blinding": "afeefd7a40d4f9e77a19ff7ab35c463dd7d1a0f3c1421ebe9628e8386791a901",
"proof_pk_com": "fc6ed039a22c52f3404a0acf2a717fb3b78fcde2a29f8a13ef72b7e0e6f0ab0080",
"proof_r": "82215958755d14ec0ece79163d22a28815b819ca6b4c1a539c5631715086850300",
"proof_ok": "8bd1ff755d7999ca047e08d1275e01c212312132077c7707fd33487e6d5ed16080",
"proof_s": "742b91632f8eced2527c53e9adcf0ab792058d53fddace5831e29c88049e4d0c",
"proof_sb": "88228eb0f4ca45ee6b6ff782056377246bc538f8eded8f11d0e10f9c934e0305"
"proof_s": "a036dc77f3868662224d9fde7070a65a730cd1794f87dd5540e1a2bd77d98f0b",
"proof_sb": "d3ce9d62de85c3e475dba77f52421e35a83147e9a7c177825cb1ed4ca62ae60e"
},
{
"comment": "Bandersnatch_SHA-512_TAI - vector-6",
Expand All @@ -88,11 +88,11 @@
"h": "dc4276ab164a69cc584b2b8fd3da54531649e075ca2e26688eece1ca9fdc230680",
"gamma": "aacbf066133024064dd8923da69ae3fc52b2fb8b2b1a2508621472392e99e00b80",
"beta": "a67a122a8423aabb806342b4b3f8f652de250acf964339d8975f07052015ca993b97a96cfc07ed2f07bc8b596eb88f561724d376f25846337af88edf5c86f602",
"blinding": "b766898d6807991cbe02f8a361982ebcac3b9fe0ad2425112f4b4a4ad2fa3815",
"proof_pkb": "65237094d61d005e460e42f9f37175d80b0a4e09011dc018df85c3f16442045b00",
"proof_r": "215e7f942793b28e8dfff6ec2673dcfd9032335ce9c6f727d495c4ced4b8704f00",
"blinding": "49f8755ac727dc7ce3c53a1799885340af4e0b891d01d6f513ab09204c46250c",
"proof_pk_com": "ee4f719c0ce5dc7f95ba176c4beabe5055832c1597ecc3e3f418a648cf9a6b5980",
"proof_r": "668055643cb3263af4e68dfd460bba683d729a6d79a454f156c3c0203362180f00",
"proof_ok": "6d63a2b05cc3a230a6a02b89c63c2a4daa13cccbd73e82960813d65a2d0d5b0580",
"proof_s": "609700a01bfae439d1b5de6548b8023b5371c4ab8514a99336332d29ecc14314",
"proof_sb": "7c27442a5165b3254defbf8583e9a797762030c87cba40684f74938ebcbd3713"
"proof_s": "8abc5e2e409e408c4e735cf6ef635c0f6066b68534152c4de5f8558ef6879f0c",
"proof_sb": "135f1f2d6a5b5e2eedc965aecb9ca51170c1a1ed9c0412f75074e65f03628e1b"
}
]
Loading
Loading