-
Notifications
You must be signed in to change notification settings - Fork 0
/
testData.cpp
22 lines (20 loc) · 1.63 KB
/
testData.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include<vector>
// Signature pair cases taken from Ecdsa tests in Project Nayuki crypto lib.
struct SignCase {
bool matches;
const char *privateKey;
const char *msgHash; // Byte-reversed
const char *nonce; // Can be null
const char *expectedR;
const char *expectedS;
};
static const vector<SignCase> cases{
// Hand-crafted cases
{true, "0000000000000000000000000000000000000000000000000000000000000123", "8900000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000457", "28B7F3A019749CCE6FC677AFA8FAE72EC10E811ED4B04E1963143CEF87654B75", "04719F34FE9A47F2C9A22045485F3654DC3AC4A910A7B0B4C7A318F41DB65C9B"},
{true, "8B46893E711C8948B28E7637BFBED61666E0118ED4D361BED1F18058214C69B8", "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF", "D9063703D9F719739FF645C77BA2F9D1DD2B4254DC7B001F8FC77C3B05AEF5B1", "B4508AF745210F6702C687682FD5E8C8D99CD1C6A7AD450AB4640458E14474BA", "421ED1256C6056D50A481D76B77CF5AA74A692556682E584A4872E8D8BBBCEAC"},
{true, "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364140", "B8EF4E4640FBBD526166FF260EB65EC2B3B60064CCE2DA9747201BA201E90F7F", "E2EF043987542CD685482E71E57D01A93B701C2610FB03253871DC2958AD3D73", "38C2AB97F778D0E1E468B3A7EBEBD2FB1C45678B62DD01587CF54E298C71EC43", "7A6D055110F4296A85E8122B32F87AD32A58CF9BB73435088102638D7DECE1F2"},
};
// "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364140"
// "B8EF4E4640FBBD526166FF260EB65EC2B3B60064CCE2DA9747201BA201E90F7F"
// "38C2AB97F778D0E1E468B3A7EBEBD2FB1C45678B62DD01587CF54E298C71EC43"
// "7A6D055110F4296A85E8122B32F87AD32A58CF9BB73435088102638D7DECE1F2"