Skip to content

Commit

Permalink
TAI hash to curve now uses Suite::Codec for decoding point (#25)
Browse files Browse the repository at this point in the history
  • Loading branch information
davxy authored Jul 10, 2024
1 parent c30e810 commit 5be98cc
Show file tree
Hide file tree
Showing 18 changed files with 73 additions and 138 deletions.
6 changes: 0 additions & 6 deletions data/bandersnatch_ed_sha512_ell2_ietf_vectors.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
[
{
"comment": "Bandersnatch_SHA-512_ELL2 - vector-1",
"flags": "00",
"sk": "2bd8776e6ca6a43d51987f756be88b643ab4431b523132f675c8f0004f5d5a17",
"pk": "76adde367eebc8b21f7ef37e327243a77e34e30f9a211fda05409b49f16f3473",
"alpha": "",
Expand All @@ -14,7 +13,6 @@
},
{
"comment": "Bandersnatch_SHA-512_ELL2 - vector-2",
"flags": "00",
"sk": "3d6406500d4009fdf2604546093665911e753f2213570a29521fd88bc30ede18",
"pk": "a1b1da71cc4682e159b7da23050d8b6261eb11a3247c89b07ef56ccd002fd38b",
"alpha": "0a",
Expand All @@ -27,7 +25,6 @@
},
{
"comment": "Bandersnatch_SHA-512_ELL2 - vector-3",
"flags": "00",
"sk": "8b9063872331dda4c3c282f7d813fb3c13e7339b7dc9635fdc764e32cc57cb15",
"pk": "5ebfe047f421e1a3e1d9bbb163839812657bbb3e4ffe9856a725b2b405844cf3",
"alpha": "",
Expand All @@ -40,7 +37,6 @@
},
{
"comment": "Bandersnatch_SHA-512_ELL2 - vector-4",
"flags": "00",
"sk": "6db187202f69e627e432296ae1d0f166ae6ac3c1222585b6ceae80ea07670b14",
"pk": "9d97151298a5339866ddd3539d16696e19e6b68ac731562c807fe63a1ca49506",
"alpha": "73616d706c65",
Expand All @@ -53,7 +49,6 @@
},
{
"comment": "Bandersnatch_SHA-512_ELL2 - vector-5",
"flags": "00",
"sk": "b56cc204f1b6c2323709012cb16c72f3021035ce935fbe69b600a88d842c7407",
"pk": "dc2de7312c2850a9f6c103289c64fbd76e2ebd2fa8b5734708eb2c76c0fb2d99",
"alpha": "42616e646572736e6174636820766563746f72",
Expand All @@ -66,7 +61,6 @@
},
{
"comment": "Bandersnatch_SHA-512_ELL2 - vector-6",
"flags": "00",
"sk": "da36359bf1bfd1694d3ed359e7340bd02a6a5e54827d94db1384df29f5bdd302",
"pk": "decb0151cbeb49f76f10419ab6a96242bdc87baac8a474e5161123de4304ac29",
"alpha": "42616e646572736e6174636820766563746f72",
Expand Down
6 changes: 0 additions & 6 deletions data/bandersnatch_ed_sha512_ell2_pedersen_vectors.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
[
{
"comment": "Bandersnatch_SHA-512_ELL2 - vector-1",
"flags": "00",
"sk": "2bd8776e6ca6a43d51987f756be88b643ab4431b523132f675c8f0004f5d5a17",
"pk": "76adde367eebc8b21f7ef37e327243a77e34e30f9a211fda05409b49f16f3473",
"alpha": "",
Expand All @@ -18,7 +17,6 @@
},
{
"comment": "Bandersnatch_SHA-512_ELL2 - vector-2",
"flags": "00",
"sk": "3d6406500d4009fdf2604546093665911e753f2213570a29521fd88bc30ede18",
"pk": "a1b1da71cc4682e159b7da23050d8b6261eb11a3247c89b07ef56ccd002fd38b",
"alpha": "0a",
Expand All @@ -35,7 +33,6 @@
},
{
"comment": "Bandersnatch_SHA-512_ELL2 - vector-3",
"flags": "00",
"sk": "8b9063872331dda4c3c282f7d813fb3c13e7339b7dc9635fdc764e32cc57cb15",
"pk": "5ebfe047f421e1a3e1d9bbb163839812657bbb3e4ffe9856a725b2b405844cf3",
"alpha": "",
Expand All @@ -52,7 +49,6 @@
},
{
"comment": "Bandersnatch_SHA-512_ELL2 - vector-4",
"flags": "00",
"sk": "6db187202f69e627e432296ae1d0f166ae6ac3c1222585b6ceae80ea07670b14",
"pk": "9d97151298a5339866ddd3539d16696e19e6b68ac731562c807fe63a1ca49506",
"alpha": "73616d706c65",
Expand All @@ -69,7 +65,6 @@
},
{
"comment": "Bandersnatch_SHA-512_ELL2 - vector-5",
"flags": "00",
"sk": "b56cc204f1b6c2323709012cb16c72f3021035ce935fbe69b600a88d842c7407",
"pk": "dc2de7312c2850a9f6c103289c64fbd76e2ebd2fa8b5734708eb2c76c0fb2d99",
"alpha": "42616e646572736e6174636820766563746f72",
Expand All @@ -86,7 +81,6 @@
},
{
"comment": "Bandersnatch_SHA-512_ELL2 - vector-6",
"flags": "00",
"sk": "da36359bf1bfd1694d3ed359e7340bd02a6a5e54827d94db1384df29f5bdd302",
"pk": "decb0151cbeb49f76f10419ab6a96242bdc87baac8a474e5161123de4304ac29",
"alpha": "42616e646572736e6174636820766563746f72",
Expand Down
6 changes: 0 additions & 6 deletions data/bandersnatch_sw_sha512_tai_ietf_vectors.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
[
{
"comment": "Bandersnatch_SW_SHA-512_TAI - vector-1",
"flags": "00",
"sk": "2bd8776e6ca6a43d51987f756be88b643ab4431b523132f675c8f0004f5d5a17",
"pk": "f55a48e6befa22dc42007ec6d5bf83620d8f794901f42b18c10a4f7a6176985280",
"alpha": "",
Expand All @@ -14,7 +13,6 @@
},
{
"comment": "Bandersnatch_SW_SHA-512_TAI - vector-2",
"flags": "00",
"sk": "3d6406500d4009fdf2604546093665911e753f2213570a29521fd88bc30ede18",
"pk": "fd72a90d1eeba6733824e76bb31991b8108d6562756b85f244333e3c7205225200",
"alpha": "0a",
Expand All @@ -27,7 +25,6 @@
},
{
"comment": "Bandersnatch_SW_SHA-512_TAI - vector-3",
"flags": "00",
"sk": "8b9063872331dda4c3c282f7d813fb3c13e7339b7dc9635fdc764e32cc57cb15",
"pk": "e30eae606d21dff460cdaecfc9bfcd2e319628ccc0242f3ca21f2d5c940ba41680",
"alpha": "",
Expand All @@ -40,7 +37,6 @@
},
{
"comment": "Bandersnatch_SW_SHA-512_TAI - vector-4",
"flags": "00",
"sk": "6db187202f69e627e432296ae1d0f166ae6ac3c1222585b6ceae80ea07670b14",
"pk": "2a00e5a32e2f097858a1a4a73cf5c2fb4e6d375a4ea4cc3ae3e91660eade850c80",
"alpha": "73616d706c65",
Expand All @@ -53,7 +49,6 @@
},
{
"comment": "Bandersnatch_SW_SHA-512_TAI - vector-5",
"flags": "00",
"sk": "b56cc204f1b6c2323709012cb16c72f3021035ce935fbe69b600a88d842c7407",
"pk": "4f29d79a27b9545d7223431eb6a63776949454b16e2ac0b7a959304ce3e52b6a00",
"alpha": "42616e646572736e6174636820766563746f72",
Expand All @@ -66,7 +61,6 @@
},
{
"comment": "Bandersnatch_SW_SHA-512_TAI - vector-6",
"flags": "00",
"sk": "da36359bf1bfd1694d3ed359e7340bd02a6a5e54827d94db1384df29f5bdd302",
"pk": "e58e8ba2e99035fb7ae11fa14e2a609d6d13679278dac63ebee64ca8612ffa1480",
"alpha": "42616e646572736e6174636820766563746f72",
Expand Down
6 changes: 0 additions & 6 deletions data/bandersnatch_sw_sha512_tai_pedersen_vectors.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
[
{
"comment": "Bandersnatch_SHA-512_TAI - vector-1",
"flags": "00",
"sk": "2bd8776e6ca6a43d51987f756be88b643ab4431b523132f675c8f0004f5d5a17",
"pk": "f55a48e6befa22dc42007ec6d5bf83620d8f794901f42b18c10a4f7a6176985280",
"alpha": "",
Expand All @@ -18,7 +17,6 @@
},
{
"comment": "Bandersnatch_SHA-512_TAI - vector-2",
"flags": "00",
"sk": "3d6406500d4009fdf2604546093665911e753f2213570a29521fd88bc30ede18",
"pk": "fd72a90d1eeba6733824e76bb31991b8108d6562756b85f244333e3c7205225200",
"alpha": "0a",
Expand All @@ -35,7 +33,6 @@
},
{
"comment": "Bandersnatch_SHA-512_TAI - vector-3",
"flags": "00",
"sk": "8b9063872331dda4c3c282f7d813fb3c13e7339b7dc9635fdc764e32cc57cb15",
"pk": "e30eae606d21dff460cdaecfc9bfcd2e319628ccc0242f3ca21f2d5c940ba41680",
"alpha": "",
Expand All @@ -52,7 +49,6 @@
},
{
"comment": "Bandersnatch_SHA-512_TAI - vector-4",
"flags": "00",
"sk": "6db187202f69e627e432296ae1d0f166ae6ac3c1222585b6ceae80ea07670b14",
"pk": "2a00e5a32e2f097858a1a4a73cf5c2fb4e6d375a4ea4cc3ae3e91660eade850c80",
"alpha": "73616d706c65",
Expand All @@ -69,7 +65,6 @@
},
{
"comment": "Bandersnatch_SHA-512_TAI - vector-5",
"flags": "00",
"sk": "b56cc204f1b6c2323709012cb16c72f3021035ce935fbe69b600a88d842c7407",
"pk": "4f29d79a27b9545d7223431eb6a63776949454b16e2ac0b7a959304ce3e52b6a00",
"alpha": "42616e646572736e6174636820766563746f72",
Expand All @@ -86,7 +81,6 @@
},
{
"comment": "Bandersnatch_SHA-512_TAI - vector-6",
"flags": "00",
"sk": "da36359bf1bfd1694d3ed359e7340bd02a6a5e54827d94db1384df29f5bdd302",
"pk": "e58e8ba2e99035fb7ae11fa14e2a609d6d13679278dac63ebee64ca8612ffa1480",
"alpha": "42616e646572736e6174636820766563746f72",
Expand Down
6 changes: 0 additions & 6 deletions data/ed25519_sha512_tai_ietf_vectors.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
[
{
"comment": "Ed25519_SHA-512_TAI - vector-1",
"flags": "00",
"sk": "b48e913135c9b4f3b1f827e9078b194cc22e2081e8658a515961ee7f5b4e8206",
"pk": "6df1619a1ef5fc4e53a03ddb1c26f568978415612eae3a3072370898bcd4ba21",
"alpha": "",
Expand All @@ -14,7 +13,6 @@
},
{
"comment": "Ed25519_SHA-512_TAI - vector-2",
"flags": "00",
"sk": "fc4722b3efeadcfa8b437f6e34f71c50a240bd2e66b958c5c17519cc9d936906",
"pk": "bf512469e7f9b766bf5c75e47e84fda3ec887bd24d79b9165c19e01a88fe5ff2",
"alpha": "0a",
Expand All @@ -27,7 +25,6 @@
},
{
"comment": "Ed25519_SHA-512_TAI - vector-3",
"flags": "00",
"sk": "3ed3f4d0fadb42cb77d42a7ea57def2bad464bd1ae0c896dd077c04358415c04",
"pk": "a9a4b61b52db164253147e0c5bd20852d7ab4763e996d0117febccbc7a1abbd6",
"alpha": "",
Expand All @@ -40,7 +37,6 @@
},
{
"comment": "Ed25519_SHA-512_TAI - vector-4",
"flags": "00",
"sk": "a665fa5af45ab71a60a6b667bc995423d5ee43197a5fd93b16f761cf0bdf0407",
"pk": "0b33325148327641856fde36d56aaf2cb1e4959824bb0916517160d402973bc5",
"alpha": "73616d706c65",
Expand All @@ -53,7 +49,6 @@
},
{
"comment": "Ed25519_SHA-512_TAI - vector-5",
"flags": "00",
"sk": "9a150e5caf622cc949d95af8980d458b551ab394d52ba49759433b4d04d9f703",
"pk": "cf2d35428c1e329dfbd5ce3a6aafd8cffe31c6a0685471f59f5cddec0725483a",
"alpha": "42616e646572736e6174636820766563746f72",
Expand All @@ -66,7 +61,6 @@
},
{
"comment": "Ed25519_SHA-512_TAI - vector-6",
"flags": "00",
"sk": "03cb98147455ef9db48d9f1ca758d8047f43ed4320909800d849522444b52502",
"pk": "465a022ab19f37d3586489ae08808b23d39844fd321735d6573c089b12202d1a",
"alpha": "42616e646572736e6174636820766563746f72",
Expand Down
6 changes: 0 additions & 6 deletions data/ed25519_sha512_tai_pedersen_vectors.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
[
{
"comment": "Ed25519_SHA-512_TAI - vector-1",
"flags": "00",
"sk": "b48e913135c9b4f3b1f827e9078b194cc22e2081e8658a515961ee7f5b4e8206",
"pk": "6df1619a1ef5fc4e53a03ddb1c26f568978415612eae3a3072370898bcd4ba21",
"alpha": "",
Expand All @@ -18,7 +17,6 @@
},
{
"comment": "Ed25519_SHA-512_TAI - vector-2",
"flags": "00",
"sk": "fc4722b3efeadcfa8b437f6e34f71c50a240bd2e66b958c5c17519cc9d936906",
"pk": "bf512469e7f9b766bf5c75e47e84fda3ec887bd24d79b9165c19e01a88fe5ff2",
"alpha": "0a",
Expand All @@ -35,7 +33,6 @@
},
{
"comment": "Ed25519_SHA-512_TAI - vector-3",
"flags": "00",
"sk": "3ed3f4d0fadb42cb77d42a7ea57def2bad464bd1ae0c896dd077c04358415c04",
"pk": "a9a4b61b52db164253147e0c5bd20852d7ab4763e996d0117febccbc7a1abbd6",
"alpha": "",
Expand All @@ -52,7 +49,6 @@
},
{
"comment": "Ed25519_SHA-512_TAI - vector-4",
"flags": "00",
"sk": "a665fa5af45ab71a60a6b667bc995423d5ee43197a5fd93b16f761cf0bdf0407",
"pk": "0b33325148327641856fde36d56aaf2cb1e4959824bb0916517160d402973bc5",
"alpha": "73616d706c65",
Expand All @@ -69,7 +65,6 @@
},
{
"comment": "Ed25519_SHA-512_TAI - vector-5",
"flags": "00",
"sk": "9a150e5caf622cc949d95af8980d458b551ab394d52ba49759433b4d04d9f703",
"pk": "cf2d35428c1e329dfbd5ce3a6aafd8cffe31c6a0685471f59f5cddec0725483a",
"alpha": "42616e646572736e6174636820766563746f72",
Expand All @@ -86,7 +81,6 @@
},
{
"comment": "Ed25519_SHA-512_TAI - vector-6",
"flags": "00",
"sk": "03cb98147455ef9db48d9f1ca758d8047f43ed4320909800d849522444b52502",
"pk": "465a022ab19f37d3586489ae08808b23d39844fd321735d6573c089b12202d1a",
"alpha": "42616e646572736e6174636820766563746f72",
Expand Down
26 changes: 10 additions & 16 deletions data/secp256_sha256_tai_ietf_vectors.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
[
{
"comment": "secp256r1_SHA-256_TAI - vector-1",
"flags": "00",
"sk": "1da0af1706a31185763837b33f1d90782c0a78bbe644a59c987ab3ff9c0b346e",
"pk": "0279c7e97a3a7fd19265b046236c4216c19cc9a9e0f16b890295cffb5a1cc990f1",
"alpha": "",
Expand All @@ -14,7 +13,6 @@
},
{
"comment": "secp256r1_SHA-256_TAI - vector-2",
"flags": "00",
"sk": "9a4585773ce2ccd7a585c331d60a60d1e3b7d28cbb2ede3bc55445342f12f54b",
"pk": "0218e11f9ef92fa3929aa8f078d2e73b58f0ac7d6f274e222b8515c7b0140138be",
"alpha": "0a",
Expand All @@ -27,20 +25,18 @@
},
{
"comment": "secp256r1_SHA-256_TAI - vector-3",
"flags": "00",
"sk": "86d9576498ea764b49243efeb05df625010438c6a55d5b578de4ff00c9b4c1db",
"pk": "03a47366bc18483e02261117304cdf77cc95f234c16d11a8356dc4514a7adaf120",
"alpha": "",
"ad": "0b8c",
"h": "03b90c05c10ddbfdafda6a964012946641737f888b90c930abdd2454c568f73d70",
"gamma": "03c572767b190538c104182dfac985cd58430074f0db24305f4006d896c93b96c7",
"beta": "d06d1139d2f0199b36d48b8d4980421e3d98504442e475c1760dcbbd19d27543",
"proof_c": "4b5b11f3b418095a5d02f835a283cc99",
"proof_s": "78bd588629d7dbfa7909384fc55590443f7d72996655ca933bf5979ccf342e14"
"h": "02b90c05c10ddbfdafda6a964012946641737f888b90c930abdd2454c568f73d70",
"gamma": "02c572767b190538c104182dfac985cd58430074f0db24305f4006d896c93b96c7",
"beta": "478e767539cb216ca6c8a545cc4749ee08d90d7bca54d4d92286c90ae31ef31e",
"proof_c": "e8c2ce765ffa672f0c83213c3dc3cf86",
"proof_s": "4edec2aebfda44486302eb57c29f1b3074266b82a5b66069aea8d06e7480075f"
},
{
"comment": "secp256r1_SHA-256_TAI - vector-4",
"flags": "00",
"sk": "c529ffad9a5ab61162b11d616b639e00586ba846746a197d4daf78b908ed4f08",
"pk": "02d984ff7d61ba3a11d8ade6cea6ba949fba3bbcf841506cf8c3a7b6e1bd67b926",
"alpha": "73616d706c65",
Expand All @@ -53,20 +49,18 @@
},
{
"comment": "secp256r1_SHA-256_TAI - vector-5",
"flags": "00",
"sk": "719ec881a39ca062f09262ff75fc8a06d6cb91ad078c4d344723508c509c2de5",
"pk": "02c8f77b17ec60330366b9e148dfa565a7c8d6a0768e5737786722e3c85a5ff054",
"alpha": "42616e646572736e6174636820766563746f72",
"ad": "",
"h": "039edace829d35ef117e135c8b81b5b00a0d3c9f24a349761fc07a7503bf048966",
"gamma": "02d7b9b206af6fae3a6225ef09701e965e5387a22eca8e1bc71c167cd53f66903a",
"beta": "0f4965be7ec48d075a0035d5d1874a05328cb9f1cbe6b4066813ebb38e46b101",
"proof_c": "ebc773f07f5a559bf176f57f83d5d80d",
"proof_s": "e0f386d45474ea6eb40ebf59e4c7e6695813b6bf4b7984db868e415d1d3432e9"
"h": "029edace829d35ef117e135c8b81b5b00a0d3c9f24a349761fc07a7503bf048966",
"gamma": "03d7b9b206af6fae3a6225ef09701e965e5387a22eca8e1bc71c167cd53f66903a",
"beta": "8ddb31c01a18db34fccd27e152d7691aab6fd377436e8d845448e00e031bf4c4",
"proof_c": "c75128a72db92539cb1a61d7c4468548",
"proof_s": "f98499f4b5e56a3e43cf6dff3c451426c419b01eb28bdeaa07a0f38d6a0db550"
},
{
"comment": "secp256r1_SHA-256_TAI - vector-6",
"flags": "00",
"sk": "db43b75a9c05eb89ae926b7b1d5081e79def64a210f5b6bd0d0be3e99a9a7be7",
"pk": "03c443ab7bbb42585044551b7efac1d9c3c8f007bdf0c325d35fde5417bbb8e11d",
"alpha": "42616e646572736e6174636820766563746f72",
Expand Down
12 changes: 6 additions & 6 deletions data/secp256_sha256_tai_ietf_vectors_rfc_9381.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
[
{
"comment": "secp256r1_sha256_tai - rfc-9381-vector-10 (Spec typos: gamma, h. Skip proof)",
"flags": "01",
"comment": "secp256r1_sha256_tai - rfc-9381-vector-10",
"flags": "00",
"sk": "c9afa9d845ba75166b5c215767b1d6934e50c3db36e89b127b8a622b120f6721",
"pk": "0360fed4ba255a9d31c961eb74c6356d68c049b8923b61fa6ce669622e60f29fb6",
"alpha": "73616D706C65",
"ad": "",
"h": "0372a877532e9ac193aff4401234266f59900a4a9e3fc3cfc6a4b7e467a15d06d4",
"gamma": "025b5c726e8c0e2c488a107c600578ee75cb702343c153cb1eb8dec77f4b5071b4",
"h": "0272a877532e9ac193aff4401234266f59900a4a9e3fc3cfc6a4b7e467a15d06d4",
"gamma": "035b5c726e8c0e2c488a107c600578ee75cb702343c153cb1eb8dec77f4b5071b4",
"beta": "a3ad7b0ef73d8fc6655053ea22f9bede8c743f08bbed3d38821f0e16474b505e",
"proof_c": "",
"proof_s": ""
"proof_c": "a53f0a46f018bc2c56e58d383f2305e0",
"proof_s": "975972c26feea0eb122fe7893c15af376b33edf7de17c6ea056d4d82de6bc02f"
},
{
"comment": "secp256r1_sha256_tai - rfc-9381-vector-11",
Expand Down
Loading

0 comments on commit 5be98cc

Please sign in to comment.