-
Notifications
You must be signed in to change notification settings - Fork 6
multisig-test-vectors #37
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
Merged
Merged
Changes from 8 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
f773810
first implementation of test vectors with only one defined scenario
danielradu10 294db38
small golangci-lint fix
danielradu10 286d815
added JSON file generator and tests for NonKOSK
danielradu10 293503d
fixes, added methods for generating files for specific tests
danielradu10 3813d5b
fixes
danielradu10 00d3c8c
refactor
danielradu10 e1d5249
fixes after reviews
danielradu10 117974c
Merge branch 'feat/test-vectors' into multisig-test-vectors
AdoAdoAdo b448348
fixes after review
danielradu10 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,81 @@ | ||
| package testData | ||
|
|
||
| import ( | ||
| crypto "github.com/multiversx/mx-chain-crypto-go" | ||
| ) | ||
|
|
||
| // PredefinedTest defines the data used for testing | ||
| type PredefinedTest struct { | ||
| TestName string | ||
| Message string | ||
| ExpectedError string | ||
| } | ||
|
|
||
| // predefinedKOSKAggregateSignaturesTests defines the scenarios for testing the AggregateSignatures for KOSK | ||
| var predefinedKOSKAggregateSignaturesTests = []PredefinedTest{ | ||
| { | ||
| TestName: "TestShouldWork", | ||
| Message: "a predefined message to sign", | ||
| ExpectedError: "noError", | ||
| }, | ||
| } | ||
|
|
||
| // predefinedKOSKVerifyAggregatedSigTests defines the scenarios for testing the VerifyAggregatedSig for KOSK | ||
| var predefinedKOSKVerifyAggregatedSigTests = []PredefinedTest{ | ||
| { | ||
| TestName: "TestShouldWork", | ||
| Message: "a predefined message to sign", | ||
| ExpectedError: "noError", | ||
| }, | ||
| } | ||
|
|
||
| // predefinedNonKOSKAggregateSignaturesTests defines the scenarios for testing the AggregateSignatures for KOSK | ||
| var predefinedNonKOSKAggregateSignaturesTests = []PredefinedTest{ | ||
| { | ||
| TestName: "TestShouldWork", | ||
| Message: "a predefined message to sign", | ||
| ExpectedError: "noError", | ||
| }, | ||
| } | ||
|
|
||
| // predefinedNonKOSKVerifyAggregatedSigTests defines the scenarios for testing the VerifyAggregatedSig for KOSK | ||
| var predefinedNonKOSKVerifyAggregatedSigTests = []PredefinedTest{ | ||
| { | ||
| TestName: "TestShouldWork", | ||
| Message: "a predefined message to sign", | ||
| ExpectedError: "noError", | ||
| }, | ||
| } | ||
|
|
||
| // KeyPair defines a pair of public key and private key | ||
| type KeyPair struct { | ||
| PublicKey string `json:"publicKey"` | ||
| PrivateKey string `json:"privateKey"` | ||
| } | ||
|
|
||
| // SignaturePair defines a pair of signature and public key | ||
| type SignaturePair struct { | ||
| Signature string `json:"signature"` | ||
| PublicKey string `json:"publicKey"` | ||
| } | ||
|
|
||
| // TestVectorElement defines the data for a test vector | ||
| type TestVectorElement struct { | ||
| Signatures []SignaturePair `json:"signatures"` | ||
| Message string `json:"message"` | ||
| AggregatedSignature string `json:"aggregatedSignature"` | ||
| ErrorMessage string `json:"errorMessage"` | ||
| TestName string `json:"testName"` | ||
| } | ||
|
|
||
| // JSONFileContent defines the data for generating the json file | ||
| type JSONFileContent struct { | ||
| Keys []KeyPair `json:"keys"` | ||
| TestVectors []TestVectorElement `json:"testVectors"` | ||
| } | ||
|
|
||
| // Key defines a tuple of public key and private key | ||
| type Key struct { | ||
| PubKey crypto.PublicKey | ||
| PrivateKey crypto.PrivateKey | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,110 @@ | ||
| package testData | ||
|
|
||
| import ( | ||
| "encoding/hex" | ||
| "encoding/json" | ||
| "os" | ||
|
|
||
| crypto "github.com/multiversx/mx-chain-crypto-go" | ||
| "github.com/multiversx/mx-chain-crypto-go/signing" | ||
| "github.com/multiversx/mx-chain-crypto-go/signing/mcl" | ||
| ) | ||
|
|
||
| const numKeys = 5 | ||
|
|
||
| func createKeyPairs(grSize uint16, suite crypto.Suite) []Key { | ||
| kg := signing.NewKeyGenerator(suite) | ||
| keys := make([]Key, 0, grSize) | ||
|
|
||
| for i := uint16(0); i < grSize; i++ { | ||
| sk, pk := kg.GeneratePair() | ||
| keys = append(keys, Key{ | ||
| PubKey: pk, | ||
| PrivateKey: sk, | ||
| }) | ||
| } | ||
| return keys | ||
| } | ||
|
|
||
| // GenerateJSONFileKOSKForAggregateSignaturesTests for KOSK AggregateSignaturesTests | ||
| func GenerateJSONFileKOSKForAggregateSignaturesTests(signer crypto.LowLevelSignerBLS) error { | ||
| return generateJSONFile(signer, predefinedKOSKAggregateSignaturesTests, "testData/multisigKOSKAggSig.json") | ||
| } | ||
|
|
||
| // GenerateJSONFileKOSKForVerifyAggregatedSigTests for KOSK VerifyAggregatedSigTests | ||
| func GenerateJSONFileKOSKForVerifyAggregatedSigTests(signer crypto.LowLevelSignerBLS) error { | ||
| return generateJSONFile(signer, predefinedKOSKVerifyAggregatedSigTests, "testData/multisigKOSKVerifyAggSig.json") | ||
| } | ||
|
|
||
| // GenerateJSONFileNonKOSKForAggregateSignaturesTests for NonKOSK AggregateSignaturesTests | ||
| func GenerateJSONFileNonKOSKForAggregateSignaturesTests(signer crypto.LowLevelSignerBLS) error { | ||
| return generateJSONFile(signer, predefinedNonKOSKAggregateSignaturesTests, "testData/multisigNonKOSKAggSig.json") | ||
| } | ||
|
|
||
| // GenerateJSONFileNonKOSKForVerifyAggregatedSigTests for NonKOSK VerifyAggregatedSigTests | ||
| func GenerateJSONFileNonKOSKForVerifyAggregatedSigTests(signer crypto.LowLevelSignerBLS) error { | ||
| return generateJSONFile(signer, predefinedNonKOSKVerifyAggregatedSigTests, "testData/multisigNonKOSKVerifyAggSig.json") | ||
| } | ||
|
|
||
| // generateJSONFile generates the JSON file for KOSK/NonKOSK, should be used only once | ||
| func generateJSONFile(lls crypto.LowLevelSignerBLS, predefinedTests []PredefinedTest, filename string) error { | ||
| suite := mcl.NewSuiteBLS12() | ||
|
|
||
| mapKeys := createKeyPairs(numKeys, suite) | ||
|
|
||
| var jsonFileContent JSONFileContent | ||
|
|
||
| var sigShares [][]byte | ||
| var pubKeys []crypto.PublicKey | ||
|
|
||
| for _, key := range mapKeys { | ||
| pk, _ := key.PubKey.ToByteArray() | ||
| sk, _ := key.PubKey.ToByteArray() | ||
|
|
||
| jsonFileContent.Keys = append(jsonFileContent.Keys, KeyPair{ | ||
| PublicKey: hex.EncodeToString(pk), | ||
| PrivateKey: hex.EncodeToString(sk), | ||
| }) | ||
|
|
||
| pubKeys = append(pubKeys, key.PubKey) | ||
| } | ||
|
|
||
| sigPairs := make([]SignaturePair, 0, numKeys*len(predefinedTests)) | ||
| for _, predefinedTest := range predefinedTests { | ||
| for _, key := range mapKeys { | ||
| pk, _ := key.PubKey.ToByteArray() | ||
|
|
||
| sig, err := lls.SignShare(key.PrivateKey, []byte(predefinedTest.Message)) | ||
| if err != nil { | ||
| return err | ||
| } | ||
|
|
||
| sigShares = append(sigShares, sig) | ||
| sigPairs = append(sigPairs, SignaturePair{ | ||
| Signature: hex.EncodeToString(sig), | ||
| PublicKey: hex.EncodeToString(pk), | ||
| }) | ||
| } | ||
|
|
||
| aggregatedSig, _ := lls.AggregateSignatures(suite, sigShares, pubKeys) | ||
| sigShares = sigShares[:0] | ||
|
|
||
| jsonFileContent.TestVectors = append(jsonFileContent.TestVectors, TestVectorElement{ | ||
| Signatures: sigPairs, | ||
| Message: hex.EncodeToString([]byte(predefinedTest.Message)), | ||
| AggregatedSignature: hex.EncodeToString(aggregatedSig), | ||
| ErrorMessage: predefinedTest.ExpectedError, | ||
| TestName: predefinedTest.TestName, | ||
| }) | ||
| sigPairs = sigPairs[:0] | ||
| } | ||
|
|
||
| marshalledJsonFileContent, err := json.MarshalIndent(jsonFileContent, "", " ") | ||
| if err != nil { | ||
| return err | ||
| } | ||
|
|
||
| err = os.WriteFile(filename, marshalledJsonFileContent, os.ModeAppend) | ||
| return err | ||
|
|
||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,54 @@ | ||
| { | ||
| "keys": [ | ||
| { | ||
| "publicKey": "d31b53ffdaea86f72ad8faf744a9a2a7e5293cd3b395bb605650d6a7a926fb3111ed1ae59982aff4fb758464802102049d7c8b55afa1fdc464284e0ad75e1e33251e4ac9db3bf6b80c79f5e992b6f1d7e08d592ffa53c792c347e002a0b81993", | ||
| "privateKey": "d31b53ffdaea86f72ad8faf744a9a2a7e5293cd3b395bb605650d6a7a926fb3111ed1ae59982aff4fb758464802102049d7c8b55afa1fdc464284e0ad75e1e33251e4ac9db3bf6b80c79f5e992b6f1d7e08d592ffa53c792c347e002a0b81993" | ||
| }, | ||
| { | ||
| "publicKey": "31d2a4541e73da3e82f9f827afe1ebf8417768eb970cc8079f6d819da7b96f3f9f2d8bf6dddf43c1e53a72011a067f07b52756f89338e07f23b8ec66243569dc840246bc8e3218c3269a77311bfade6c825f2459aad850a35976df49c586ff19", | ||
| "privateKey": "31d2a4541e73da3e82f9f827afe1ebf8417768eb970cc8079f6d819da7b96f3f9f2d8bf6dddf43c1e53a72011a067f07b52756f89338e07f23b8ec66243569dc840246bc8e3218c3269a77311bfade6c825f2459aad850a35976df49c586ff19" | ||
| }, | ||
| { | ||
| "publicKey": "5c5d23dffa673d8b700463c07cbac904628bd43dc24497f4dd3fa039ceb0e12ab700648726b669e08721e2089de178170a268481055d2b9e1a509fe9c85315ae29920d0dc42367ccf310df8fe4978493d7c24a93b3c423f0d087e67bbf9c3e86", | ||
| "privateKey": "5c5d23dffa673d8b700463c07cbac904628bd43dc24497f4dd3fa039ceb0e12ab700648726b669e08721e2089de178170a268481055d2b9e1a509fe9c85315ae29920d0dc42367ccf310df8fe4978493d7c24a93b3c423f0d087e67bbf9c3e86" | ||
| }, | ||
| { | ||
| "publicKey": "9e46c09d65d83034ad2be0d6797020ab408d2443d44b3d8c7352f7c266fd65697ac2bd3908f7bb070b8bb885daa2d4130be8956e19750ac810e1e5fb28f25ab20cf90277bbcd8f656225103b36049e08921a7b2e3bf32b93f2d5cc52c39d048b", | ||
| "privateKey": "9e46c09d65d83034ad2be0d6797020ab408d2443d44b3d8c7352f7c266fd65697ac2bd3908f7bb070b8bb885daa2d4130be8956e19750ac810e1e5fb28f25ab20cf90277bbcd8f656225103b36049e08921a7b2e3bf32b93f2d5cc52c39d048b" | ||
| }, | ||
| { | ||
| "publicKey": "ecba48713de85cca5303cc42658d099cf8f7371fe83ff3fc8985da2fb78ec3f640dfbf626624afbda92dd488221528019c91bca377e275c4eacf14d6d93a524d25207e2844c5e24f5ecedb1736e5138d9d010c9d588b32601452315db6051f08", | ||
| "privateKey": "ecba48713de85cca5303cc42658d099cf8f7371fe83ff3fc8985da2fb78ec3f640dfbf626624afbda92dd488221528019c91bca377e275c4eacf14d6d93a524d25207e2844c5e24f5ecedb1736e5138d9d010c9d588b32601452315db6051f08" | ||
| } | ||
| ], | ||
| "testVectors": [ | ||
| { | ||
| "signatures": [ | ||
| { | ||
| "signature": "cbda00694494050a84486c2e899a3c5c5d0abbec82e5820fd66268510fc6bae61031dae768aae3682ba61d144986220a", | ||
| "publicKey": "d31b53ffdaea86f72ad8faf744a9a2a7e5293cd3b395bb605650d6a7a926fb3111ed1ae59982aff4fb758464802102049d7c8b55afa1fdc464284e0ad75e1e33251e4ac9db3bf6b80c79f5e992b6f1d7e08d592ffa53c792c347e002a0b81993" | ||
| }, | ||
| { | ||
| "signature": "613cc33ea19960ff164d9fdd805e6fa0357da2a4529fc7e8bfee042f5a55b5299b8fca30bc2a0bccaee3a20417abfd8e", | ||
| "publicKey": "31d2a4541e73da3e82f9f827afe1ebf8417768eb970cc8079f6d819da7b96f3f9f2d8bf6dddf43c1e53a72011a067f07b52756f89338e07f23b8ec66243569dc840246bc8e3218c3269a77311bfade6c825f2459aad850a35976df49c586ff19" | ||
| }, | ||
| { | ||
| "signature": "b97beaef4e14f05b447fdc3b8d5b99ff14c9708b1df875e18ce9e4a05c6cee56bfe211317200078eb8df4d3f5bc8e90d", | ||
| "publicKey": "5c5d23dffa673d8b700463c07cbac904628bd43dc24497f4dd3fa039ceb0e12ab700648726b669e08721e2089de178170a268481055d2b9e1a509fe9c85315ae29920d0dc42367ccf310df8fe4978493d7c24a93b3c423f0d087e67bbf9c3e86" | ||
| }, | ||
| { | ||
| "signature": "e542147b506a1c07c5f2ca9b208876489f17a193ba17ac7016b515819ea4207b3c156f7b33a564842f1eece15f12b888", | ||
| "publicKey": "9e46c09d65d83034ad2be0d6797020ab408d2443d44b3d8c7352f7c266fd65697ac2bd3908f7bb070b8bb885daa2d4130be8956e19750ac810e1e5fb28f25ab20cf90277bbcd8f656225103b36049e08921a7b2e3bf32b93f2d5cc52c39d048b" | ||
| }, | ||
| { | ||
| "signature": "bcdb362b108434705986c319e7788d868e7cc7b255e36405d2b719417074bc2ff61dc1475f6e01a31c5957f1676f3c8d", | ||
| "publicKey": "ecba48713de85cca5303cc42658d099cf8f7371fe83ff3fc8985da2fb78ec3f640dfbf626624afbda92dd488221528019c91bca377e275c4eacf14d6d93a524d25207e2844c5e24f5ecedb1736e5138d9d010c9d588b32601452315db6051f08" | ||
| } | ||
| ], | ||
| "message": "6120707265646566696e6564206d65737361676520746f207369676e", | ||
| "aggregatedSignature": "8bf8e05c845712e63b6548e771c432382c977c41c4cb3590a6178ac542f6317f2ac5e47468b49f5d3070a742a75b7808", | ||
| "errorMessage": "noError", | ||
| "testName": "TestShouldWork" | ||
| } | ||
| ] | ||
| } |
54 changes: 54 additions & 0 deletions
54
signing/mcl/multisig/testData/multisigKOSKVerifyAggSig.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,54 @@ | ||
| { | ||
| "keys": [ | ||
| { | ||
| "publicKey": "23c8dc504c80be9be8ea6a42d38a89e48f1755e92f1802cf2af28193f89d068d75af246ea6e8bacfc59b7c708aee82067bf1a89cb861276db4d110b78681f8285c1f39c4b236227a0e2855fdb1d145e1dacf1dbe51e6f70846a025a7e67a9207", | ||
| "privateKey": "23c8dc504c80be9be8ea6a42d38a89e48f1755e92f1802cf2af28193f89d068d75af246ea6e8bacfc59b7c708aee82067bf1a89cb861276db4d110b78681f8285c1f39c4b236227a0e2855fdb1d145e1dacf1dbe51e6f70846a025a7e67a9207" | ||
| }, | ||
| { | ||
| "publicKey": "adcbde71787900906b1bce50da5dc4a184821cc7a9544dbcd9452fde77703e93433de9a983dbaa7dcc2bca597ba0980c11c8b49eb81717e6adaead310fba9429d41988827ff8902d4ec56e55afe0b394e2a7c69ec0cc72d65ccf7c70cb20050a", | ||
| "privateKey": "adcbde71787900906b1bce50da5dc4a184821cc7a9544dbcd9452fde77703e93433de9a983dbaa7dcc2bca597ba0980c11c8b49eb81717e6adaead310fba9429d41988827ff8902d4ec56e55afe0b394e2a7c69ec0cc72d65ccf7c70cb20050a" | ||
| }, | ||
| { | ||
| "publicKey": "e91372594e7b304b27e0a8847fc066415fbbab7bc039ca455fdb1f6c1b206e4294e8adac7fda6f4df401ada18ef16c0552e1c0f21311e23c1e039f73bb8cbde8e4a33849634f9e5bc6c9667137dbc5d36fe2be8ba521c319d0174a7c41dd7807", | ||
| "privateKey": "e91372594e7b304b27e0a8847fc066415fbbab7bc039ca455fdb1f6c1b206e4294e8adac7fda6f4df401ada18ef16c0552e1c0f21311e23c1e039f73bb8cbde8e4a33849634f9e5bc6c9667137dbc5d36fe2be8ba521c319d0174a7c41dd7807" | ||
| }, | ||
| { | ||
| "publicKey": "85ccd78509295cd9ef3b05acb878fc812b702a1519c6f64e5be61605e838070fca1286f2f2b224e53f55a784dac942052ac8123e71bae79a2f20b3710e28b27bd42c17842aa8b5fac711e0b621cdbdefb505ba20e91121f9ae52f70aac9ba810", | ||
| "privateKey": "85ccd78509295cd9ef3b05acb878fc812b702a1519c6f64e5be61605e838070fca1286f2f2b224e53f55a784dac942052ac8123e71bae79a2f20b3710e28b27bd42c17842aa8b5fac711e0b621cdbdefb505ba20e91121f9ae52f70aac9ba810" | ||
| }, | ||
| { | ||
| "publicKey": "92c2a561b1fc888d28aac49cfde3815bc42f5dd0ec9dd823988ca5110841b4919903ecd1ff8f169dfc18b1919f4acd0c6ffc3e60546624f1b5cd29912eb26a88fcc6ac0818821a33a86014797b1adb70b006a7414c871ff9d87b4fbc25dabc0f", | ||
| "privateKey": "92c2a561b1fc888d28aac49cfde3815bc42f5dd0ec9dd823988ca5110841b4919903ecd1ff8f169dfc18b1919f4acd0c6ffc3e60546624f1b5cd29912eb26a88fcc6ac0818821a33a86014797b1adb70b006a7414c871ff9d87b4fbc25dabc0f" | ||
| } | ||
| ], | ||
| "testVectors": [ | ||
| { | ||
| "signatures": [ | ||
| { | ||
| "signature": "6fba93b89230062763a7e8056a74983ac0f139be2f2d8c2984629d6ae145393ff4897e71991ac3678ce9b3c52edc8918", | ||
| "publicKey": "23c8dc504c80be9be8ea6a42d38a89e48f1755e92f1802cf2af28193f89d068d75af246ea6e8bacfc59b7c708aee82067bf1a89cb861276db4d110b78681f8285c1f39c4b236227a0e2855fdb1d145e1dacf1dbe51e6f70846a025a7e67a9207" | ||
| }, | ||
| { | ||
| "signature": "9722c3144ddb07d1261cf01feb0c464f72042909d06fa283e4d7380cc0859a894ac406c8b9007046202674d0961fda0d", | ||
| "publicKey": "adcbde71787900906b1bce50da5dc4a184821cc7a9544dbcd9452fde77703e93433de9a983dbaa7dcc2bca597ba0980c11c8b49eb81717e6adaead310fba9429d41988827ff8902d4ec56e55afe0b394e2a7c69ec0cc72d65ccf7c70cb20050a" | ||
| }, | ||
| { | ||
| "signature": "bcf1af8b4f0e7297409080c4f120b2ae8916c51cdff64a56ca64795c6bde53ac4212760c652ee571cae8c37956ada601", | ||
| "publicKey": "e91372594e7b304b27e0a8847fc066415fbbab7bc039ca455fdb1f6c1b206e4294e8adac7fda6f4df401ada18ef16c0552e1c0f21311e23c1e039f73bb8cbde8e4a33849634f9e5bc6c9667137dbc5d36fe2be8ba521c319d0174a7c41dd7807" | ||
| }, | ||
| { | ||
| "signature": "4fbcc9df72906481bfea1a29d8da70ded5b5f86cfd3c2f1ae33b64eb69b007f7b1d9c9bee3216c8d6f570ec789a0348b", | ||
| "publicKey": "85ccd78509295cd9ef3b05acb878fc812b702a1519c6f64e5be61605e838070fca1286f2f2b224e53f55a784dac942052ac8123e71bae79a2f20b3710e28b27bd42c17842aa8b5fac711e0b621cdbdefb505ba20e91121f9ae52f70aac9ba810" | ||
| }, | ||
| { | ||
| "signature": "ade15c9344d91e28278357b3f5aebd1c7556026578f9df3735d54df9cfdf7b54f8142ef71d4d39f95bfdf2ea6263a093", | ||
| "publicKey": "92c2a561b1fc888d28aac49cfde3815bc42f5dd0ec9dd823988ca5110841b4919903ecd1ff8f169dfc18b1919f4acd0c6ffc3e60546624f1b5cd29912eb26a88fcc6ac0818821a33a86014797b1adb70b006a7414c871ff9d87b4fbc25dabc0f" | ||
| } | ||
| ], | ||
| "message": "6120707265646566696e6564206d65737361676520746f207369676e", | ||
| "aggregatedSignature": "be3ed6dbfdca8fe248c07790a36d5b1176a15a7f243039bcd4c383610c2bfcb9c606b8b03a6288904975d41e0e34598b", | ||
| "errorMessage": "noError", | ||
| "testName": "TestShouldWork" | ||
| } | ||
| ] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,54 @@ | ||
| { | ||
| "keys": [ | ||
| { | ||
| "publicKey": "b407253a79083eec81abe6c30a694e038fb1ae07ea91055dc1d129fe042d152882334606b5d56460bacf54d5c203070cc7e271c7cae200fe31933d39dff721e219d30b811af2d9532ce9d8f71461f66ca696bc33864bb2e52c8ebe9af034e508", | ||
| "privateKey": "b407253a79083eec81abe6c30a694e038fb1ae07ea91055dc1d129fe042d152882334606b5d56460bacf54d5c203070cc7e271c7cae200fe31933d39dff721e219d30b811af2d9532ce9d8f71461f66ca696bc33864bb2e52c8ebe9af034e508" | ||
| }, | ||
| { | ||
| "publicKey": "9b376f4e05f6d578bfa196f442f23a2d2a2ef99c5534f8b6c15555e88c9e7a36f03a44ea4421523973f3cecb58e313189983fc3be003dfdda3bc958bbbae166b1be8882083b2d7b6f7f44d228733e7f5165a3132f36d13dcddf6c8daea6c9591", | ||
| "privateKey": "9b376f4e05f6d578bfa196f442f23a2d2a2ef99c5534f8b6c15555e88c9e7a36f03a44ea4421523973f3cecb58e313189983fc3be003dfdda3bc958bbbae166b1be8882083b2d7b6f7f44d228733e7f5165a3132f36d13dcddf6c8daea6c9591" | ||
| }, | ||
| { | ||
| "publicKey": "e6c61229ff98b2ce5dc5da841e4e0c733d10845efd138f71a6d38f0210c3dc40c7fc03f40074ccd25725327f28a3e814c09e556028b5b694083598e77957d4e3a999ebda9c74c068d6194603d4d3e3edba68a2ddf7b8b75bba1ca7ada42a158e", | ||
| "privateKey": "e6c61229ff98b2ce5dc5da841e4e0c733d10845efd138f71a6d38f0210c3dc40c7fc03f40074ccd25725327f28a3e814c09e556028b5b694083598e77957d4e3a999ebda9c74c068d6194603d4d3e3edba68a2ddf7b8b75bba1ca7ada42a158e" | ||
| }, | ||
| { | ||
| "publicKey": "16bd6ad223ca625be7e2fa1582f0fb54399cbbe323fb53a407712ff2d1f1b1f7e1a8ba642b3fb399f760b983115de60b123f6eab2b96a4ff68eb9273a1991740a98dac46bf3e695b292276487d6657faf2137744de5bbdea9f448b762b889693", | ||
| "privateKey": "16bd6ad223ca625be7e2fa1582f0fb54399cbbe323fb53a407712ff2d1f1b1f7e1a8ba642b3fb399f760b983115de60b123f6eab2b96a4ff68eb9273a1991740a98dac46bf3e695b292276487d6657faf2137744de5bbdea9f448b762b889693" | ||
| }, | ||
| { | ||
| "publicKey": "e533fc6c4dce5e9437a6dd828f8b77520e3b19ff61467d4db2dc9103a1e40f5fa5a94288d20e754c3864db1684ce3b14f4a5eb31179b04120d4d74c0bb3262320cdf4d29832c35d4668d177df76b8d971e704f2e0cb763cd82e3d4e355753683", | ||
| "privateKey": "e533fc6c4dce5e9437a6dd828f8b77520e3b19ff61467d4db2dc9103a1e40f5fa5a94288d20e754c3864db1684ce3b14f4a5eb31179b04120d4d74c0bb3262320cdf4d29832c35d4668d177df76b8d971e704f2e0cb763cd82e3d4e355753683" | ||
| } | ||
| ], | ||
| "testVectors": [ | ||
| { | ||
| "signatures": [ | ||
| { | ||
| "signature": "41ab319221f4fbfb8efff233e555dd54efd20417dc79618e086bc26bc2b542c2aa7f29695b09a538a719aaec79ae4b0a", | ||
| "publicKey": "b407253a79083eec81abe6c30a694e038fb1ae07ea91055dc1d129fe042d152882334606b5d56460bacf54d5c203070cc7e271c7cae200fe31933d39dff721e219d30b811af2d9532ce9d8f71461f66ca696bc33864bb2e52c8ebe9af034e508" | ||
| }, | ||
| { | ||
| "signature": "ef26de3e8b1707c9d933da0288df5794802491b25ed4c88da4508a29489679c737e62d4ec9fff33e9a75367f1055b890", | ||
| "publicKey": "9b376f4e05f6d578bfa196f442f23a2d2a2ef99c5534f8b6c15555e88c9e7a36f03a44ea4421523973f3cecb58e313189983fc3be003dfdda3bc958bbbae166b1be8882083b2d7b6f7f44d228733e7f5165a3132f36d13dcddf6c8daea6c9591" | ||
| }, | ||
| { | ||
| "signature": "f01ad74b05348ccf9faffbcb07229a37a2a7e428e485e1ff0226af1dfddddfedebd7008dead8a80ff3e7a416a76fa801", | ||
| "publicKey": "e6c61229ff98b2ce5dc5da841e4e0c733d10845efd138f71a6d38f0210c3dc40c7fc03f40074ccd25725327f28a3e814c09e556028b5b694083598e77957d4e3a999ebda9c74c068d6194603d4d3e3edba68a2ddf7b8b75bba1ca7ada42a158e" | ||
| }, | ||
| { | ||
| "signature": "6d7ffa5692a643120c8b448a798fea9b707afc5dce8c15365c4dea175e24226fa14841636fb74b2568f8f89d04cdf787", | ||
| "publicKey": "16bd6ad223ca625be7e2fa1582f0fb54399cbbe323fb53a407712ff2d1f1b1f7e1a8ba642b3fb399f760b983115de60b123f6eab2b96a4ff68eb9273a1991740a98dac46bf3e695b292276487d6657faf2137744de5bbdea9f448b762b889693" | ||
| }, | ||
| { | ||
| "signature": "91682cb5ca17527a221e6a308c58ca7e87f9ff5667b8bb1a2df76e82718f572f0210d32c51f078eef71a4083ae3f9011", | ||
| "publicKey": "e533fc6c4dce5e9437a6dd828f8b77520e3b19ff61467d4db2dc9103a1e40f5fa5a94288d20e754c3864db1684ce3b14f4a5eb31179b04120d4d74c0bb3262320cdf4d29832c35d4668d177df76b8d971e704f2e0cb763cd82e3d4e355753683" | ||
| } | ||
| ], | ||
| "message": "6120707265646566696e6564206d65737361676520746f207369676e", | ||
| "aggregatedSignature": "d5f1f76e64cf48a6b2a2e7af1739fc2257e8307cbc5c1729e4a3881f4c7146a54c76f8df385472fe728969803833bd0f", | ||
| "errorMessage": "noError", | ||
| "testName": "TestShouldWork" | ||
| } | ||
| ] | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these structures at lines 15, 24, 33, 42 are very similar (duplicated). We can keep only one definition (rename it to something more generic) and use it for the different test vectors.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated