vectors.inc.cxx 35 KB
Newer Older
Michael Hamburg's avatar
Michael Hamburg committed
1 2

/* X25519, X448 test vectors */
3
template<> const uint8_t Tests<Ristretto>::rfc7748_1[32] = {
Michael Hamburg's avatar
Michael Hamburg committed
4 5 6 7 8
    0x42,0x2c,0x8e,0x7a,0x62,0x27,0xd7,0xbc,
    0xa1,0x35,0x0b,0x3e,0x2b,0xb7,0x27,0x9f,
    0x78,0x97,0xb8,0x7b,0xb6,0x85,0x4b,0x78,
    0x3c,0x60,0xe8,0x03,0x11,0xae,0x30,0x79
};
9
template<> const uint8_t Tests<Ristretto>::rfc7748_1000[32] = {
Michael Hamburg's avatar
Michael Hamburg committed
10 11 12 13 14
    0x68,0x4c,0xf5,0x9b,0xa8,0x33,0x09,0x55,
    0x28,0x00,0xef,0x56,0x6f,0x2f,0x4d,0x3c,
    0x1c,0x38,0x87,0xc4,0x93,0x60,0xe3,0x87,
    0x5f,0x2e,0xb9,0x4d,0x99,0x53,0x2c,0x51
};
15
template<> const uint8_t Tests<Ristretto>::rfc7748_1000000[32] = {
Michael Hamburg's avatar
Michael Hamburg committed
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
    0x7c,0x39,0x11,0xe0,0xab,0x25,0x86,0xfd,
    0x86,0x44,0x97,0x29,0x7e,0x57,0x5e,0x6f,
    0x3b,0xc6,0x01,0xc0,0x88,0x3c,0x30,0xdf,
    0x5f,0x4d,0xd2,0xd2,0x4f,0x66,0x54,0x24
};
template<> const uint8_t Tests<Ed448Goldilocks>::rfc7748_1[56] = {
    0x3f,0x48,0x2c,0x8a,0x9f,0x19,0xb0,0x1e,
    0x6c,0x46,0xee,0x97,0x11,0xd9,0xdc,0x14,
    0xfd,0x4b,0xf6,0x7a,0xf3,0x07,0x65,0xc2,
    0xae,0x2b,0x84,0x6a,0x4d,0x23,0xa8,0xcd,
    0x0d,0xb8,0x97,0x08,0x62,0x39,0x49,0x2c,
    0xaf,0x35,0x0b,0x51,0xf8,0x33,0x86,0x8b,
    0x9b,0xc2,0xb3,0xbc,0xa9,0xcf,0x41,0x13
};
template<> const uint8_t Tests<Ed448Goldilocks>::rfc7748_1000[56] = {
    0xaa,0x3b,0x47,0x49,0xd5,0x5b,0x9d,0xaf,
    0x1e,0x5b,0x00,0x28,0x88,0x26,0xc4,0x67,
    0x27,0x4c,0xe3,0xeb,0xbd,0xd5,0xc1,0x7b,
    0x97,0x5e,0x09,0xd4,0xaf,0x6c,0x67,0xcf,
    0x10,0xd0,0x87,0x20,0x2d,0xb8,0x82,0x86,
    0xe2,0xb7,0x9f,0xce,0xea,0x3e,0xc3,0x53,
    0xef,0x54,0xfa,0xa2,0x6e,0x21,0x9f,0x38
};
template<> const uint8_t Tests<Ed448Goldilocks>::rfc7748_1000000[56] = {
    0x07,0x7f,0x45,0x36,0x81,0xca,0xca,0x36,
    0x93,0x19,0x84,0x20,0xbb,0xe5,0x15,0xca,
    0xe0,0x00,0x24,0x72,0x51,0x9b,0x3e,0x67,
    0x66,0x1a,0x7e,0x89,0xca,0xb9,0x46,0x95,
    0xc8,0xf4,0xbc,0xd6,0x6e,0x61,0xb9,0xb9,
    0xc9,0x46,0xda,0x8d,0x52,0x4d,0xe3,0xd6,
    0x9b,0xd9,0xd9,0xd6,0x6b,0x99,0x7e,0x37
};

template<> const Block Tests<Ed448Goldilocks>::sqrt_minus_one(NULL,0);
const uint8_t sm1_25519[32] = {
    0xb0,0xa0,0x0e,0x4a,0x27,0x1b,0xee,0xc4,
    0x78,0xe4,0x2f,0xad,0x06,0x18,0x43,0x2f,
    0xa7,0xd7,0xfb,0x3d,0x99,0x00,0x4d,0x2b,
    0x0b,0xdf,0xc1,0x4f,0x80,0x24,0x83,0x2b
};
56
template<> const Block Tests<Ristretto>::sqrt_minus_one(sm1_25519,32);
Michael Hamburg's avatar
Michael Hamburg committed
57 58 59 60 61 62 63 64

template<> const Block Tests<Ed448Goldilocks>::minus_sqrt_minus_one(NULL,0);
const uint8_t msm1_25519[32] = {
    0x3d,0x5f,0xf1,0xb5,0xd8,0xe4,0x11,0x3b,
    0x87,0x1b,0xd0,0x52,0xf9,0xe7,0xbc,0xd0,
    0x58,0x28,0x04,0xc2,0x66,0xff,0xb2,0xd4,
    0xf4,0x20,0x3e,0xb0,0x7f,0xdb,0x7c,0x54
};
65
template<> const Block Tests<Ristretto>::minus_sqrt_minus_one(msm1_25519,32);
Michael Hamburg's avatar
Michael Hamburg committed
66 67 68 69 70 71 72 73 74 75 76

const uint8_t elli_patho_448[56] = {
    0x14,0xf0,0x70,0x58,0x41,0xc7,0xf9,0xa5,
    0xfa,0x2c,0x7d,0x87,0x07,0x89,0xe8,0x61,
    0x63,0xe8,0xc8,0xdc,0x06,0x2d,0x39,0x8f,
    0x18,0x83,0x1e,0xc6,0x8c,0x6d,0x73,0x24,
    0xd4,0xb3,0xd3,0xe1,0xf3,0x51,0x8c,0xee,
    0x65,0x79,0x88,0xc1,0x0b,0xcf,0x8e,0xa5,
    0x86,0xa9,0x2e,0xc9,0x17,0x68,0x9b,0x20
};
template<> const Block Tests<Ed448Goldilocks>::elli_patho(elli_patho_448,56);
77
template<> const Block Tests<Ristretto>::elli_patho(NULL,0);
Michael Hamburg's avatar
Michael Hamburg committed
78

Michael Hamburg's avatar
Michael Hamburg committed
79
/* EdDSA test vectors */
Michael Hamburg's avatar
Michael Hamburg committed
80 81
/* EdDSA test vectors */
const uint8_t ed448_eddsa_sk[][57] = {{
Michael Hamburg's avatar
Michael Hamburg committed
82
    // RFC 8032 - test vector 1 - blank
Michael Hamburg's avatar
Michael Hamburg committed
83 84 85 86 87 88 89 90 91
    0x6c,0x82,0xa5,0x62,0xcb,0x80,0x8d,0x10,
    0xd6,0x32,0xbe,0x89,0xc8,0x51,0x3e,0xbf,
    0x6c,0x92,0x9f,0x34,0xdd,0xfa,0x8c,0x9f,
    0x63,0xc9,0x96,0x0e,0xf6,0xe3,0x48,0xa3,
    0x52,0x8c,0x8a,0x3f,0xcc,0x2f,0x04,0x4e,
    0x39,0xa3,0xfc,0x5b,0x94,0x49,0x2f,0x8f,
    0x03,0x2e,0x75,0x49,0xa2,0x00,0x98,0xf9,
    0x5b
}, {
Michael Hamburg's avatar
Michael Hamburg committed
92
    // RFC 8032 - test vector 2/3 - 1 octet
Michael Hamburg's avatar
Michael Hamburg committed
93 94 95 96 97 98 99
    0xc4,0xea,0xb0,0x5d,0x35,0x70,0x07,0xc6,
    0x32,0xf3,0xdb,0xb4,0x84,0x89,0x92,0x4d,
    0x55,0x2b,0x08,0xfe,0x0c,0x35,0x3a,0x0d,
    0x4a,0x1f,0x00,0xac,0xda,0x2c,0x46,0x3a,
    0xfb,0xea,0x67,0xc5,0xe8,0xd2,0x87,0x7c,
    0x5e,0x3b,0xc3,0x97,0xa6,0x59,0x94,0x9e,
    0xf8,0x02,0x1e,0x95,0x4e,0x0a,0x12,0x27,
Michael Hamburg's avatar
Michael Hamburg committed
100
    0x4e
Michael Hamburg's avatar
Michael Hamburg committed
101
}, {
Michael Hamburg's avatar
Michael Hamburg committed
102
    // RFC 8032 - test vector 4 - 11 octet
Michael Hamburg's avatar
Michael Hamburg committed
103 104 105 106 107 108 109 110 111
    0xcd,0x23,0xd2,0x4f,0x71,0x42,0x74,0xe7,
    0x44,0x34,0x32,0x37,0xb9,0x32,0x90,0xf5,
    0x11,0xf6,0x42,0x5f,0x98,0xe6,0x44,0x59,
    0xff,0x20,0x3e,0x89,0x85,0x08,0x3f,0xfd,
    0xf6,0x05,0x00,0x55,0x3a,0xbc,0x0e,0x05,
    0xcd,0x02,0x18,0x4b,0xdb,0x89,0xc4,0xcc,
    0xd6,0x7e,0x18,0x79,0x51,0x26,0x7e,0xb3,
    0x28
}, {
Michael Hamburg's avatar
Michael Hamburg committed
112
    // RFC 8032 - test vector 5 - 12 octet
Michael Hamburg's avatar
Michael Hamburg committed
113 114 115 116 117 118 119 120
    0x25,0x8c,0xdd,0x4a,0xda,0x32,0xed,0x9c,
    0x9f,0xf5,0x4e,0x63,0x75,0x6a,0xe5,0x82,
    0xfb,0x8f,0xab,0x2a,0xc7,0x21,0xf2,0xc8,
    0xe6,0x76,0xa7,0x27,0x68,0x51,0x3d,0x93,
    0x9f,0x63,0xdd,0xdb,0x55,0x60,0x91,0x33,
    0xf2,0x9a,0xdf,0x86,0xec,0x99,0x29,0xdc,
    0xcb,0x52,0xc1,0xc5,0xfd,0x2f,0xf7,0xe2,
    0x1b
121
}, {
Michael Hamburg's avatar
Michael Hamburg committed
122
    // RFC 8032 - test vector 1 - prehash - blank
123 124 125 126 127 128 129 130
    0x83,0x3f,0xe6,0x24,0x09,0x23,0x7b,0x9d,
    0x62,0xec,0x77,0x58,0x75,0x20,0x91,0x1e,
    0x9a,0x75,0x9c,0xec,0x1d,0x19,0x75,0x5b,
    0x7d,0xa9,0x01,0xb9,0x6d,0xca,0x3d,0x42,
    0xef,0x78,0x22,0xe0,0xd5,0x10,0x41,0x27,
    0xdc,0x05,0xd6,0xdb,0xef,0xde,0x69,0xe3,
    0xab,0x2c,0xec,0x7c,0x86,0x7c,0x6e,0x2c,
    0x49
Michael Hamburg's avatar
Michael Hamburg committed
131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170
}, {
    // RFC 8032 - test vector 6 - 13 octet
	0x7e,0xf4,0xe8,0x45,0x44,0x23,0x67,0x52,
	0xfb,0xb5,0x6b,0x8f,0x31,0xa2,0x3a,0x10,
	0xe4,0x28,0x14,0xf5,0xf5,0x5c,0xa0,0x37,
	0xcd,0xcc,0x11,0xc6,0x4c,0x9a,0x3b,0x29,
	0x49,0xc1,0xbb,0x60,0x70,0x03,0x14,0x61,
	0x17,0x32,0xa6,0xc2,0xfe,0xa9,0x8e,0xeb,
	0xc0,0x26,0x6a,0x11,0xa9,0x39,0x70,0x10,
	0x0e,
}, {
    // RFC 8032 - test vector 7 - 64 octet
	0xd6,0x5d,0xf3,0x41,0xad,0x13,0xe0,0x08,
	0x56,0x76,0x88,0xba,0xed,0xda,0x8e,0x9d,
	0xcd,0xc1,0x7d,0xc0,0x24,0x97,0x4e,0xa5,
	0xb4,0x22,0x7b,0x65,0x30,0xe3,0x39,0xbf,
	0xf2,0x1f,0x99,0xe6,0x8c,0xa6,0x96,0x8f,
	0x3c,0xca,0x6d,0xfe,0x0f,0xb9,0xf4,0xfa,
	0xb4,0xfa,0x13,0x5d,0x55,0x42,0xea,0x3f,
	0x01,
}, {
    // RFC 8032 - test vector 8 - 256 octet
	0x2e,0xc5,0xfe,0x3c,0x17,0x04,0x5a,0xbd,
	0xb1,0x36,0xa5,0xe6,0xa9,0x13,0xe3,0x2a,
	0xb7,0x5a,0xe6,0x8b,0x53,0xd2,0xfc,0x14,
	0x9b,0x77,0xe5,0x04,0x13,0x2d,0x37,0x56,
	0x9b,0x7e,0x76,0x6b,0xa7,0x4a,0x19,0xbd,
	0x61,0x62,0x34,0x3a,0x21,0xc8,0x59,0x0a,
	0xa9,0xce,0xbc,0xa9,0x01,0x4c,0x63,0x6d,
	0xf5,
}, {
    // RFC 8032 - test vector 9 - 1023 octet
	0x87,0x2d,0x09,0x37,0x80,0xf5,0xd3,0x73,
	0x0d,0xf7,0xc2,0x12,0x66,0x4b,0x37,0xb8,
	0xa0,0xf2,0x4f,0x56,0x81,0x0d,0xaa,0x83,
	0x82,0xcd,0x4f,0xa3,0xf7,0x76,0x34,0xec,
	0x44,0xdc,0x54,0xf1,0xc2,0xed,0x9b,0xea,
	0x86,0xfa,0xfb,0x76,0x32,0xd8,0xbe,0x19,
	0x9e,0xa1,0x65,0xf5,0xad,0x55,0xdd,0x9c,
	0xe8,
Michael Hamburg's avatar
Michael Hamburg committed
171 172
}};
const uint8_t ed448_eddsa_pk[][57] = {{
Michael Hamburg's avatar
Michael Hamburg committed
173
    // RFC 8032 - test vector 1 - blank
Michael Hamburg's avatar
Michael Hamburg committed
174 175 176 177 178 179 180 181 182
    0x5f,0xd7,0x44,0x9b,0x59,0xb4,0x61,0xfd,
    0x2c,0xe7,0x87,0xec,0x61,0x6a,0xd4,0x6a,
    0x1d,0xa1,0x34,0x24,0x85,0xa7,0x0e,0x1f,
    0x8a,0x0e,0xa7,0x5d,0x80,0xe9,0x67,0x78,
    0xed,0xf1,0x24,0x76,0x9b,0x46,0xc7,0x06,
    0x1b,0xd6,0x78,0x3d,0xf1,0xe5,0x0f,0x6c,
    0xd1,0xfa,0x1a,0xbe,0xaf,0xe8,0x25,0x61,
    0x80
}, {
Michael Hamburg's avatar
Michael Hamburg committed
183
    // RFC 8032 - test vector 2/3 - 1 octet
Michael Hamburg's avatar
Michael Hamburg committed
184 185 186 187 188 189 190 191 192
    0x43,0xba,0x28,0xf4,0x30,0xcd,0xff,0x45,
    0x6a,0xe5,0x31,0x54,0x5f,0x7e,0xcd,0x0a,
    0xc8,0x34,0xa5,0x5d,0x93,0x58,0xc0,0x37,
    0x2b,0xfa,0x0c,0x6c,0x67,0x98,0xc0,0x86,
    0x6a,0xea,0x01,0xeb,0x00,0x74,0x28,0x02,
    0xb8,0x43,0x8e,0xa4,0xcb,0x82,0x16,0x9c,
    0x23,0x51,0x60,0x62,0x7b,0x4c,0x3a,0x94,
    0x80
}, {
Michael Hamburg's avatar
Michael Hamburg committed
193
    // RFC 8032 - test vector 4 - 11 octet
Michael Hamburg's avatar
Michael Hamburg committed
194 195 196 197 198 199 200 201 202
    0xdc,0xea,0x9e,0x78,0xf3,0x5a,0x1b,0xf3,
    0x49,0x9a,0x83,0x1b,0x10,0xb8,0x6c,0x90,
    0xaa,0xc0,0x1c,0xd8,0x4b,0x67,0xa0,0x10,
    0x9b,0x55,0xa3,0x6e,0x93,0x28,0xb1,0xe3,
    0x65,0xfc,0xe1,0x61,0xd7,0x1c,0xe7,0x13,
    0x1a,0x54,0x3e,0xa4,0xcb,0x5f,0x7e,0x9f,
    0x1d,0x8b,0x00,0x69,0x64,0x47,0x00,0x14,
    0x00
}, {
Michael Hamburg's avatar
Michael Hamburg committed
203
    // RFC 8032 - test vector 5 - 12 octet
Michael Hamburg's avatar
Michael Hamburg committed
204 205 206 207 208 209 210 211
    0x3b,0xa1,0x6d,0xa0,0xc6,0xf2,0xcc,0x1f,
    0x30,0x18,0x77,0x40,0x75,0x6f,0x5e,0x79,
    0x8d,0x6b,0xc5,0xfc,0x01,0x5d,0x7c,0x63,
    0xcc,0x95,0x10,0xee,0x3f,0xd4,0x4a,0xdc,
    0x24,0xd8,0xe9,0x68,0xb6,0xe4,0x6e,0x6f,
    0x94,0xd1,0x9b,0x94,0x53,0x61,0x72,0x6b,
    0xd7,0x5e,0x14,0x9e,0xf0,0x98,0x17,0xf5,
    0x80
212
}, {
Michael Hamburg's avatar
Michael Hamburg committed
213
    // RFC 8032 - test vector 1 - prehash - abc
214 215 216 217 218 219 220 221
    0x25,0x9b,0x71,0xc1,0x9f,0x83,0xef,0x77,
    0xa7,0xab,0xd2,0x65,0x24,0xcb,0xdb,0x31,
    0x61,0xb5,0x90,0xa4,0x8f,0x7d,0x17,0xde,
    0x3e,0xe0,0xba,0x9c,0x52,0xbe,0xb7,0x43,
    0xc0,0x94,0x28,0xa1,0x31,0xd6,0xb1,0xb5,
    0x73,0x03,0xd9,0x0d,0x81,0x32,0xc2,0x76,
    0xd5,0xed,0x3d,0x5d,0x01,0xc0,0xf5,0x38,
    0x80
Michael Hamburg's avatar
Michael Hamburg committed
222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261
}, {
    // RFC 8032 - test vector 6 - 13 octet
	0xb3,0xda,0x07,0x9b,0x0a,0xa4,0x93,0xa5,
	0x77,0x20,0x29,0xf0,0x46,0x7b,0xae,0xbe,
	0xe5,0xa8,0x11,0x2d,0x9d,0x3a,0x22,0x53,
	0x23,0x61,0xda,0x29,0x4f,0x7b,0xb3,0x81,
	0x5c,0x5d,0xc5,0x9e,0x17,0x6b,0x4d,0x9f,
	0x38,0x1c,0xa0,0x93,0x8e,0x13,0xc6,0xc0,
	0x7b,0x17,0x4b,0xe6,0x5d,0xfa,0x57,0x8e,
	0x80
}, {
    // RFC 8032 - test vector 7 - 64 octet
	0xdf,0x97,0x05,0xf5,0x8e,0xdb,0xab,0x80,
	0x2c,0x7f,0x83,0x63,0xcf,0xe5,0x56,0x0a,
	0xb1,0xc6,0x13,0x2c,0x20,0xa9,0xf1,0xdd,
	0x16,0x34,0x83,0xa2,0x6f,0x8a,0xc5,0x3a,
	0x39,0xd6,0x80,0x8b,0xf4,0xa1,0xdf,0xbd,
	0x26,0x1b,0x09,0x9b,0xb0,0x3b,0x3f,0xb5,
	0x09,0x06,0xcb,0x28,0xbd,0x8a,0x08,0x1f,
	0x00
}, {
    // RFC 8032 - test vector 8 - 256 octet
	0x79,0x75,0x6f,0x01,0x4d,0xcf,0xe2,0x07,
	0x9f,0x5d,0xd9,0xe7,0x18,0xbe,0x41,0x71,
	0xe2,0xef,0x24,0x86,0xa0,0x8f,0x25,0x18,
	0x6f,0x6b,0xff,0x43,0xa9,0x93,0x6b,0x9b,
	0xfe,0x12,0x40,0x2b,0x08,0xae,0x65,0x79,
	0x8a,0x3d,0x81,0xe2,0x2e,0x9e,0xc8,0x0e,
	0x76,0x90,0x86,0x2e,0xf3,0xd4,0xed,0x3a,
	0x00
}, {
    // RFC 8032 - test vector 9 - 1023 octet
	0xa8,0x1b,0x2e,0x8a,0x70,0xa5,0xac,0x94,
	0xff,0xdb,0xcc,0x9b,0xad,0xfc,0x3f,0xeb,
	0x08,0x01,0xf2,0x58,0x57,0x8b,0xb1,0x14,
	0xad,0x44,0xec,0xe1,0xec,0x0e,0x79,0x9d,
	0xa0,0x8e,0xff,0xb8,0x1c,0x5d,0x68,0x5c,
	0x0c,0x56,0xf6,0x4e,0xec,0xae,0xf8,0xcd,
	0xf1,0x1c,0xc3,0x87,0x37,0x83,0x8c,0xf4,
	0x00
Michael Hamburg's avatar
Michael Hamburg committed
262
}};
Michael Hamburg's avatar
Michael Hamburg committed
263 264
const uint8_t ed448_eddsa_message[][1023] = {{
    // RFC 8032 - test vector 1 - blank
Michael Hamburg's avatar
Michael Hamburg committed
265 266
    0
}, {
Michael Hamburg's avatar
Michael Hamburg committed
267
    // RFC 8032 - test vector 2/3 - 1 octet
Michael Hamburg's avatar
Michael Hamburg committed
268 269
    0x03
}, {
Michael Hamburg's avatar
Michael Hamburg committed
270
    // RFC 8032 - test vector 4 - 11 octet
Michael Hamburg's avatar
Michael Hamburg committed
271 272 273
    0x0c,0x3e,0x54,0x40,0x74,0xec,0x63,0xb0,
    0x26,0x5e,0x0c
}, {
Michael Hamburg's avatar
Michael Hamburg committed
274
    // RFC 8032 - test vector 5 - 12 octet
Michael Hamburg's avatar
Michael Hamburg committed
275 276
    0x64,0xa6,0x5f,0x3c,0xde,0xdc,0xdd,0x66,
    0x81,0x1e,0x29,0x15
277
}, {
Michael Hamburg's avatar
Michael Hamburg committed
278
    // RFC 8032 - test vector 1/2 - prehash - abc
279
    0x61,0x62,0x63
Michael Hamburg's avatar
Michael Hamburg committed
280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457
}, {
    // RFC 8032 - test vector 6 - 13 octet
	0x64,0xa6,0x5f,0x3c,0xde,0xdc,0xdd,0x66,
	0x81,0x1e,0x29,0x15,0xe7
}, {
    // RFC 8032 - test vector 7 - 64 octet
	0xbd,0x0f,0x6a,0x37,0x47,0xcd,0x56,0x1b,
	0xdd,0xdf,0x46,0x40,0xa3,0x32,0x46,0x1a,
	0x4a,0x30,0xa1,0x2a,0x43,0x4c,0xd0,0xbf,
	0x40,0xd7,0x66,0xd9,0xc6,0xd4,0x58,0xe5,
	0x51,0x22,0x04,0xa3,0x0c,0x17,0xd1,0xf5,
	0x0b,0x50,0x79,0x63,0x1f,0x64,0xeb,0x31,
	0x12,0x18,0x2d,0xa3,0x00,0x58,0x35,0x46,
	0x11,0x13,0x71,0x8d,0x1a,0x5e,0xf9,0x44
}, {
    // RFC 8032 - test vector 8 - 256 octet
	0x15,0x77,0x75,0x32,0xb0,0xbd,0xd0,0xd1,
	0x38,0x9f,0x63,0x6c,0x5f,0x6b,0x9b,0xa7,
	0x34,0xc9,0x0a,0xf5,0x72,0x87,0x7e,0x2d,
	0x27,0x2d,0xd0,0x78,0xaa,0x1e,0x56,0x7c,
	0xfa,0x80,0xe1,0x29,0x28,0xbb,0x54,0x23,
	0x30,0xe8,0x40,0x9f,0x31,0x74,0x50,0x41,
	0x07,0xec,0xd5,0xef,0xac,0x61,0xae,0x75,
	0x04,0xda,0xbe,0x2a,0x60,0x2e,0xde,0x89,
	0xe5,0xcc,0xa6,0x25,0x7a,0x7c,0x77,0xe2,
	0x7a,0x70,0x2b,0x3a,0xe3,0x9f,0xc7,0x69,
	0xfc,0x54,0xf2,0x39,0x5a,0xe6,0xa1,0x17,
	0x8c,0xab,0x47,0x38,0xe5,0x43,0x07,0x2f,
	0xc1,0xc1,0x77,0xfe,0x71,0xe9,0x2e,0x25,
	0xbf,0x03,0xe4,0xec,0xb7,0x2f,0x47,0xb6,
	0x4d,0x04,0x65,0xaa,0xea,0x4c,0x7f,0xad,
	0x37,0x25,0x36,0xc8,0xba,0x51,0x6a,0x60,
	0x39,0xc3,0xc2,0xa3,0x9f,0x0e,0x4d,0x83,
	0x2b,0xe4,0x32,0xdf,0xa9,0xa7,0x06,0xa6,
	0xe5,0xc7,0xe1,0x9f,0x39,0x79,0x64,0xca,
	0x42,0x58,0x00,0x2f,0x7c,0x05,0x41,0xb5,
	0x90,0x31,0x6d,0xbc,0x56,0x22,0xb6,0xb2,
	0xa6,0xfe,0x7a,0x4a,0xbf,0xfd,0x96,0x10,
	0x5e,0xca,0x76,0xea,0x7b,0x98,0x81,0x6a,
	0xf0,0x74,0x8c,0x10,0xdf,0x04,0x8c,0xe0,
	0x12,0xd9,0x01,0x01,0x5a,0x51,0xf1,0x89,
	0xf3,0x88,0x81,0x45,0xc0,0x36,0x50,0xaa,
	0x23,0xce,0x89,0x4c,0x3b,0xd8,0x89,0xe0,
	0x30,0xd5,0x65,0x07,0x1c,0x59,0xf4,0x09,
	0xa9,0x98,0x1b,0x51,0x87,0x8f,0xd6,0xfc,
	0x11,0x06,0x24,0xdc,0xbc,0xde,0x0b,0xf7,
	0xa6,0x9c,0xcc,0xe3,0x8f,0xab,0xdf,0x86,
	0xf3,0xbe,0xf6,0x04,0x48,0x19,0xde,0x11
}, {
    // RFC 8032 - test vector 9 - 1023 octet
	0x6d,0xdf,0x80,0x2e,0x1a,0xae,0x49,0x86,
	0x93,0x5f,0x7f,0x98,0x1b,0xa3,0xf0,0x35,
	0x1d,0x62,0x73,0xc0,0xa0,0xc2,0x2c,0x9c,
	0x0e,0x83,0x39,0x16,0x8e,0x67,0x54,0x12,
	0xa3,0xde,0xbf,0xaf,0x43,0x5e,0xd6,0x51,
	0x55,0x80,0x07,0xdb,0x43,0x84,0xb6,0x50,
	0xfc,0xc0,0x7e,0x3b,0x58,0x6a,0x27,0xa4,
	0xf7,0xa0,0x0a,0xc8,0xa6,0xfe,0xc2,0xcd,
	0x86,0xae,0x4b,0xf1,0x57,0x0c,0x41,0xe6,
	0xa4,0x0c,0x93,0x1d,0xb2,0x7b,0x2f,0xaa,
	0x15,0xa8,0xce,0xdd,0x52,0xcf,0xf7,0x36,
	0x2c,0x4e,0x6e,0x23,0xda,0xec,0x0f,0xbc,
	0x3a,0x79,0xb6,0x80,0x6e,0x31,0x6e,0xfc,
	0xc7,0xb6,0x81,0x19,0xbf,0x46,0xbc,0x76,
	0xa2,0x60,0x67,0xa5,0x3f,0x29,0x6d,0xaf,
	0xdb,0xdc,0x11,0xc7,0x7f,0x77,0x77,0xe9,
	0x72,0x66,0x0c,0xf4,0xb6,0xa9,0xb3,0x69,
	0xa6,0x66,0x5f,0x02,0xe0,0xcc,0x9b,0x6e,
	0xdf,0xad,0x13,0x6b,0x4f,0xab,0xe7,0x23,
	0xd2,0x81,0x3d,0xb3,0x13,0x6c,0xfd,0xe9,
	0xb6,0xd0,0x44,0x32,0x2f,0xee,0x29,0x47,
	0x95,0x2e,0x03,0x1b,0x73,0xab,0x5c,0x60,
	0x33,0x49,0xb3,0x07,0xbd,0xc2,0x7b,0xc6,
	0xcb,0x8b,0x8b,0xbd,0x7b,0xd3,0x23,0x21,
	0x9b,0x80,0x33,0xa5,0x81,0xb5,0x9e,0xad,
	0xeb,0xb0,0x9b,0x3c,0x4f,0x3d,0x22,0x77,
	0xd4,0xf0,0x34,0x36,0x24,0xac,0xc8,0x17,
	0x80,0x47,0x28,0xb2,0x5a,0xb7,0x97,0x17,
	0x2b,0x4c,0x5c,0x21,0xa2,0x2f,0x9c,0x78,
	0x39,0xd6,0x43,0x00,0x23,0x2e,0xb6,0x6e,
	0x53,0xf3,0x1c,0x72,0x3f,0xa3,0x7f,0xe3,
	0x87,0xc7,0xd3,0xe5,0x0b,0xdf,0x98,0x13,
	0xa3,0x0e,0x5b,0xb1,0x2c,0xf4,0xcd,0x93,
	0x0c,0x40,0xcf,0xb4,0xe1,0xfc,0x62,0x25,
	0x92,0xa4,0x95,0x88,0x79,0x44,0x94,0xd5,
	0x6d,0x24,0xea,0x4b,0x40,0xc8,0x9f,0xc0,
	0x59,0x6c,0xc9,0xeb,0xb9,0x61,0xc8,0xcb,
	0x10,0xad,0xde,0x97,0x6a,0x5d,0x60,0x2b,
	0x1c,0x3f,0x85,0xb9,0xb9,0xa0,0x01,0xed,
	0x3c,0x6a,0x4d,0x3b,0x14,0x37,0xf5,0x20,
	0x96,0xcd,0x19,0x56,0xd0,0x42,0xa5,0x97,
	0xd5,0x61,0xa5,0x96,0xec,0xd3,0xd1,0x73,
	0x5a,0x8d,0x57,0x0e,0xa0,0xec,0x27,0x22,
	0x5a,0x2c,0x4a,0xaf,0xf2,0x63,0x06,0xd1,
	0x52,0x6c,0x1a,0xf3,0xca,0x6d,0x9c,0xf5,
	0xa2,0xc9,0x8f,0x47,0xe1,0xc4,0x6d,0xb9,
	0xa3,0x32,0x34,0xcf,0xd4,0xd8,0x1f,0x2c,
	0x98,0x53,0x8a,0x09,0xeb,0xe7,0x69,0x98,
	0xd0,0xd8,0xfd,0x25,0x99,0x7c,0x7d,0x25,
	0x5c,0x6d,0x66,0xec,0xe6,0xfa,0x56,0xf1,
	0x11,0x44,0x95,0x0f,0x02,0x77,0x95,0xe6,
	0x53,0x00,0x8f,0x4b,0xd7,0xca,0x2d,0xee,
	0x85,0xd8,0xe9,0x0f,0x3d,0xc3,0x15,0x13,
	0x0c,0xe2,0xa0,0x03,0x75,0xa3,0x18,0xc7,
	0xc3,0xd9,0x7b,0xe2,0xc8,0xce,0x5b,0x6d,
	0xb4,0x1a,0x62,0x54,0xff,0x26,0x4f,0xa6,
	0x15,0x5b,0xae,0xe3,0xb0,0x77,0x3c,0x0f,
	0x49,0x7c,0x57,0x3f,0x19,0xbb,0x4f,0x42,
	0x40,0x28,0x1f,0x0b,0x1f,0x4f,0x7b,0xe8,
	0x57,0xa4,0xe5,0x9d,0x41,0x6c,0x06,0xb4,
	0xc5,0x0f,0xa0,0x9e,0x18,0x10,0xdd,0xc6,
	0xb1,0x46,0x7b,0xae,0xac,0x5a,0x36,0x68,
	0xd1,0x1b,0x6e,0xca,0xa9,0x01,0x44,0x00,
	0x16,0xf3,0x89,0xf8,0x0a,0xcc,0x4d,0xb9,
	0x77,0x02,0x5e,0x7f,0x59,0x24,0x38,0x8c,
	0x7e,0x34,0x0a,0x73,0x2e,0x55,0x44,0x40,
	0xe7,0x65,0x70,0xf8,0xdd,0x71,0xb7,0xd6,
	0x40,0xb3,0x45,0x0d,0x1f,0xd5,0xf0,0x41,
	0x0a,0x18,0xf9,0xa3,0x49,0x4f,0x70,0x7c,
	0x71,0x7b,0x79,0xb4,0xbf,0x75,0xc9,0x84,
	0x00,0xb0,0x96,0xb2,0x16,0x53,0xb5,0xd2,
	0x17,0xcf,0x35,0x65,0xc9,0x59,0x74,0x56,
	0xf7,0x07,0x03,0x49,0x7a,0x07,0x87,0x63,
	0x82,0x9b,0xc0,0x1b,0xb1,0xcb,0xc8,0xfa,
	0x04,0xea,0xdc,0x9a,0x6e,0x3f,0x66,0x99,
	0x58,0x7a,0x9e,0x75,0xc9,0x4e,0x5b,0xab,
	0x00,0x36,0xe0,0xb2,0xe7,0x11,0x39,0x2c,
	0xff,0x00,0x47,0xd0,0xd6,0xb0,0x5b,0xd2,
	0xa5,0x88,0xbc,0x10,0x97,0x18,0x95,0x42,
	0x59,0xf1,0xd8,0x66,0x78,0xa5,0x79,0xa3,
	0x12,0x0f,0x19,0xcf,0xb2,0x96,0x3f,0x17,
	0x7a,0xeb,0x70,0xf2,0xd4,0x84,0x48,0x26,
	0x26,0x2e,0x51,0xb8,0x02,0x71,0x27,0x20,
	0x68,0xef,0x5b,0x38,0x56,0xfa,0x85,0x35,
	0xaa,0x2a,0x88,0xb2,0xd4,0x1f,0x2a,0x0e,
	0x2f,0xda,0x76,0x24,0xc2,0x85,0x02,0x72,
	0xac,0x4a,0x2f,0x56,0x1f,0x8f,0x2f,0x7a,
	0x31,0x8b,0xfd,0x5c,0xaf,0x96,0x96,0x14,
	0x9e,0x4a,0xc8,0x24,0xad,0x34,0x60,0x53,
	0x8f,0xdc,0x25,0x42,0x1b,0xee,0xc2,0xcc,
	0x68,0x18,0x16,0x2d,0x06,0xbb,0xed,0x0c,
	0x40,0xa3,0x87,0x19,0x23,0x49,0xdb,0x67,
	0xa1,0x18,0xba,0xda,0x6c,0xd5,0xab,0x01,
	0x40,0xee,0x27,0x32,0x04,0xf6,0x28,0xaa,
	0xd1,0xc1,0x35,0xf7,0x70,0x27,0x9a,0x65,
	0x1e,0x24,0xd8,0xc1,0x4d,0x75,0xa6,0x05,
	0x9d,0x76,0xb9,0x6a,0x6f,0xd8,0x57,0xde,
	0xf5,0xe0,0xb3,0x54,0xb2,0x7a,0xb9,0x37,
	0xa5,0x81,0x5d,0x16,0xb5,0xfa,0xe4,0x07,
	0xff,0x18,0x22,0x2c,0x6d,0x1e,0xd2,0x63,
	0xbe,0x68,0xc9,0x5f,0x32,0xd9,0x08,0xbd,
	0x89,0x5c,0xd7,0x62,0x07,0xae,0x72,0x64,
	0x87,0x56,0x7f,0x9a,0x67,0xda,0xd7,0x9a,
	0xbe,0xc3,0x16,0xf6,0x83,0xb1,0x7f,0x2d,
	0x02,0xbf,0x07,0xe0,0xac,0x8b,0x5b,0xc6,
	0x16,0x2c,0xf9,0x46,0x97,0xb3,0xc2,0x7c,
	0xd1,0xfe,0xa4,0x9b,0x27,0xf2,0x3b,0xa2,
	0x90,0x18,0x71,0x96,0x25,0x06,0x52,0x0c,
	0x39,0x2d,0xa8,0xb6,0xad,0x0d,0x99,0xf7,
	0x01,0x3f,0xbc,0x06,0xc2,0xc1,0x7a,0x56,
	0x95,0x00,0xc8,0xa7,0x69,0x64,0x81,0xc1,
	0xcd,0x33,0xe9,0xb1,0x4e,0x40,0xb8,0x2e,
	0x79,0xa5,0xf5,0xdb,0x82,0x57,0x1b,0xa9,
	0x7b,0xae,0x3a,0xd3,0xe0,0x47,0x95,0x15,
	0xbb,0x0e,0x2b,0x0f,0x3b,0xfc,0xd1,0xfd,
	0x33,0x03,0x4e,0xfc,0x62,0x45,0xed,0xdd,
	0x7e,0xe2,0x08,0x6d,0xda,0xe2,0x60,0x0d,
	0x8c,0xa7,0x3e,0x21,0x4e,0x8c,0x2b,0x0b,
	0xdb,0x2b,0x04,0x7c,0x6a,0x46,0x4a,0x56,
	0x2e,0xd7,0x7b,0x73,0xd2,0xd8,0x41,0xc4,
	0xb3,0x49,0x73,0x55,0x12,0x57,0x71,0x3b,
	0x75,0x36,0x32,0xef,0xba,0x34,0x81,0x69,
	0xab,0xc9,0x0a,0x68,0xf4,0x26,0x11,0xa4,
	0x01,0x26,0xd7,0xcb,0x21,0xb5,0x86,0x95,
	0x56,0x81,0x86,0xf7,0xe5,0x69,0xd2,0xff,
	0x0f,0x9e,0x74,0x5d,0x04,0x87,0xdd,0x2e,
	0xb9,0x97,0xca,0xfc,0x5a,0xbf,0x9d,0xd1,
	0x02,0xe6,0x2f,0xf6,0x6c,0xba,0x87
Michael Hamburg's avatar
Michael Hamburg committed
458
}};
459 460 461 462 463 464

template<> const bool Tests<Ed448Goldilocks>::eddsa_prehashed[] = {
    false,
    false,
    false,
    false,
465
    false,
466
    true,
Michael Hamburg's avatar
Michael Hamburg committed
467 468 469 470 471
    true,
    false,
    false,
    false,
    false
472 473
};

Michael Hamburg's avatar
Michael Hamburg committed
474 475 476
const uint8_t ed448_eddsa_context[][3] = {{
    0x66,0x6f,0x6f
}};
Michael Hamburg's avatar
Michael Hamburg committed
477

Michael Hamburg's avatar
Michael Hamburg committed
478
const uint8_t ed448_eddsa_sig[][114] = {{
Michael Hamburg's avatar
Michael Hamburg committed
479
    // RFC 8032 - test vector 1 - blank
Michael Hamburg's avatar
Michael Hamburg committed
480 481 482 483 484 485
    0x53,0x3a,0x37,0xf6,0xbb,0xe4,0x57,0x25,
    0x1f,0x02,0x3c,0x0d,0x88,0xf9,0x76,0xae,
    0x2d,0xfb,0x50,0x4a,0x84,0x3e,0x34,0xd2,
    0x07,0x4f,0xd8,0x23,0xd4,0x1a,0x59,0x1f,
    0x2b,0x23,0x3f,0x03,0x4f,0x62,0x82,0x81,
    0xf2,0xfd,0x7a,0x22,0xdd,0xd4,0x7d,0x78,
Michael Hamburg's avatar
Michael Hamburg committed
486
    0x28,0xc5,0x9b,0xd0,0xa2,0x1b,0xfd,0x39,
Michael Hamburg's avatar
Michael Hamburg committed
487 488 489 490 491 492 493 494 495
    0x80,0xff,0x0d,0x20,0x28,0xd4,0xb1,0x8a,
    0x9d,0xf6,0x3e,0x00,0x6c,0x5d,0x1c,0x2d,
    0x34,0x5b,0x92,0x5d,0x8d,0xc0,0x0b,0x41,
    0x04,0x85,0x2d,0xb9,0x9a,0xc5,0xc7,0xcd,
    0xda,0x85,0x30,0xa1,0x13,0xa0,0xf4,0xdb,
    0xb6,0x11,0x49,0xf0,0x5a,0x73,0x63,0x26,
    0x8c,0x71,0xd9,0x58,0x08,0xff,0x2e,0x65,
    0x26,0x00
}, {
Michael Hamburg's avatar
Michael Hamburg committed
496
    // RFC 8032 - test vector 2 - 1 octet
Michael Hamburg's avatar
Michael Hamburg committed
497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512
    0x26,0xb8,0xf9,0x17,0x27,0xbd,0x62,0x89,
    0x7a,0xf1,0x5e,0x41,0xeb,0x43,0xc3,0x77,
    0xef,0xb9,0xc6,0x10,0xd4,0x8f,0x23,0x35,
    0xcb,0x0b,0xd0,0x08,0x78,0x10,0xf4,0x35,
    0x25,0x41,0xb1,0x43,0xc4,0xb9,0x81,0xb7,
    0xe1,0x8f,0x62,0xde,0x8c,0xcd,0xf6,0x33,
    0xfc,0x1b,0xf0,0x37,0xab,0x7c,0xd7,0x79,
    0x80,0x5e,0x0d,0xbc,0xc0,0xaa,0xe1,0xcb,
    0xce,0xe1,0xaf,0xb2,0xe0,0x27,0xdf,0x36,
    0xbc,0x04,0xdc,0xec,0xbf,0x15,0x43,0x36,
    0xc1,0x9f,0x0a,0xf7,0xe0,0xa6,0x47,0x29,
    0x05,0xe7,0x99,0xf1,0x95,0x3d,0x2a,0x0f,
    0xf3,0x34,0x8a,0xb2,0x1a,0xa4,0xad,0xaf,
    0xd1,0xd2,0x34,0x44,0x1c,0xf8,0x07,0xc0,
    0x3a,0x00
}, {
Michael Hamburg's avatar
Michael Hamburg committed
513
    // RFC 8032 - test vector 4 - 11 octet
Michael Hamburg's avatar
Michael Hamburg committed
514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529
    0x1f,0x0a,0x88,0x88,0xce,0x25,0xe8,0xd4,
    0x58,0xa2,0x11,0x30,0x87,0x9b,0x84,0x0a,
    0x90,0x89,0xd9,0x99,0xaa,0xba,0x03,0x9e,
    0xaf,0x3e,0x3a,0xfa,0x09,0x0a,0x09,0xd3,
    0x89,0xdb,0xa8,0x2c,0x4f,0xf2,0xae,0x8a,
    0xc5,0xcd,0xfb,0x7c,0x55,0xe9,0x4d,0x5d,
    0x96,0x1a,0x29,0xfe,0x01,0x09,0x94,0x1e,
    0x00,0xb8,0xdb,0xde,0xea,0x6d,0x3b,0x05,
    0x10,0x68,0xdf,0x72,0x54,0xc0,0xcd,0xc1,
    0x29,0xcb,0xe6,0x2d,0xb2,0xdc,0x95,0x7d,
    0xbb,0x47,0xb5,0x1f,0xd3,0xf2,0x13,0xfb,
    0x86,0x98,0xf0,0x64,0x77,0x42,0x50,0xa5,
    0x02,0x89,0x61,0xc9,0xbf,0x8f,0xfd,0x97,
    0x3f,0xe5,0xd5,0xc2,0x06,0x49,0x2b,0x14,
    0x0e,0x00
}, {
Michael Hamburg's avatar
Michael Hamburg committed
530
    // RFC 8032 - test vector 5 - 12 octet
Michael Hamburg's avatar
Michael Hamburg committed
531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546
    0x7e,0xee,0xab,0x7c,0x4e,0x50,0xfb,0x79,
    0x9b,0x41,0x8e,0xe5,0xe3,0x19,0x7f,0xf6,
    0xbf,0x15,0xd4,0x3a,0x14,0xc3,0x43,0x89,
    0xb5,0x9d,0xd1,0xa7,0xb1,0xb8,0x5b,0x4a,
    0xe9,0x04,0x38,0xac,0xa6,0x34,0xbe,0xa4,
    0x5e,0x3a,0x26,0x95,0xf1,0x27,0x0f,0x07,
    0xfd,0xcd,0xf7,0xc6,0x2b,0x8e,0xfe,0xaf,
    0x00,0xb4,0x5c,0x2c,0x96,0xba,0x45,0x7e,
    0xb1,0xa8,0xbf,0x07,0x5a,0x3d,0xb2,0x8e,
    0x5c,0x24,0xf6,0xb9,0x23,0xed,0x4a,0xd7,
    0x47,0xc3,0xc9,0xe0,0x3c,0x70,0x79,0xef,
    0xb8,0x7c,0xb1,0x10,0xd3,0xa9,0x98,0x61,
    0xe7,0x20,0x03,0xcb,0xae,0x6d,0x6b,0x8b,
    0x82,0x7e,0x4e,0x6c,0x14,0x30,0x64,0xff,
    0x3c,0x00
}, {
Michael Hamburg's avatar
Michael Hamburg committed
547
    // RFC 8032 - test vector 3 - 1 octet - context
Michael Hamburg's avatar
Michael Hamburg committed
548 549 550 551 552 553 554 555 556 557 558 559 560 561 562
    0xd4,0xf8,0xf6,0x13,0x17,0x70,0xdd,0x46,
    0xf4,0x08,0x67,0xd6,0xfd,0x5d,0x50,0x55,
    0xde,0x43,0x54,0x1f,0x8c,0x5e,0x35,0xab,
    0xbc,0xd0,0x01,0xb3,0x2a,0x89,0xf7,0xd2,
    0x15,0x1f,0x76,0x47,0xf1,0x1d,0x8c,0xa2,
    0xae,0x27,0x9f,0xb8,0x42,0xd6,0x07,0x21,
    0x7f,0xce,0x6e,0x04,0x2f,0x68,0x15,0xea,
    0x00,0x0c,0x85,0x74,0x1d,0xe5,0xc8,0xda,
    0x11,0x44,0xa6,0xa1,0xab,0xa7,0xf9,0x6d,
    0xe4,0x25,0x05,0xd7,0xa7,0x29,0x85,0x24,
    0xfd,0xa5,0x38,0xfc,0xcb,0xbb,0x75,0x4f,
    0x57,0x8c,0x1c,0xad,0x10,0xd5,0x4d,0x0d,
    0x54,0x28,0x40,0x7e,0x85,0xdc,0xbc,0x98,
    0xa4,0x91,0x55,0xc1,0x37,0x64,0xe6,0x6c,
    0x3c,0x00
563
}, {
Michael Hamburg's avatar
Michael Hamburg committed
564
    // RFC 8032 - test vector 1 - prehash - abc
565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580
    0x82,0x2f,0x69,0x01,0xf7,0x48,0x0f,0x3d,
    0x5f,0x56,0x2c,0x59,0x29,0x94,0xd9,0x69,
    0x36,0x02,0x87,0x56,0x14,0x48,0x32,0x56,
    0x50,0x56,0x00,0xbb,0xc2,0x81,0xae,0x38,
    0x1f,0x54,0xd6,0xbc,0xe2,0xea,0x91,0x15,
    0x74,0x93,0x2f,0x52,0xa4,0xe6,0xca,0xdd,
    0x78,0x76,0x93,0x75,0xec,0x3f,0xfd,0x1b,
    0x80,0x1a,0x0d,0x9b,0x3f,0x40,0x30,0xcd,
    0x43,0x39,0x64,0xb6,0x45,0x7e,0xa3,0x94,
    0x76,0x51,0x12,0x14,0xf9,0x74,0x69,0xb5,
    0x7d,0xd3,0x2d,0xbc,0x56,0x0a,0x9a,0x94,
    0xd0,0x0b,0xff,0x07,0x62,0x04,0x64,0xa3,
    0xad,0x20,0x3d,0xf7,0xdc,0x7c,0xe3,0x60,
    0xc3,0xcd,0x36,0x96,0xd9,0xd9,0xfa,0xb9,
    0x0f,0x00
}, {
Michael Hamburg's avatar
Michael Hamburg committed
581
    // RFC 8032 - test vector 2 - prehash - abc - context
582 583 584 585 586 587 588 589 590 591 592 593 594 595 596
    0xc3,0x22,0x99,0xd4,0x6e,0xc8,0xff,0x02,
    0xb5,0x45,0x40,0x98,0x28,0x14,0xdc,0xe9,
    0xa0,0x58,0x12,0xf8,0x19,0x62,0xb6,0x49,
    0xd5,0x28,0x09,0x59,0x16,0xa2,0xaa,0x48,
    0x10,0x65,0xb1,0x58,0x04,0x23,0xef,0x92,
    0x7e,0xcf,0x0a,0xf5,0x88,0x8f,0x90,0xda,
    0x0f,0x6a,0x9a,0x85,0xad,0x5d,0xc3,0xf2,
    0x80,0xd9,0x12,0x24,0xba,0x99,0x11,0xa3,
    0x65,0x3d,0x00,0xe4,0x84,0xe2,0xce,0x23,
    0x25,0x21,0x48,0x1c,0x86,0x58,0xdf,0x30,
    0x4b,0xb7,0x74,0x5a,0x73,0x51,0x4c,0xdb,
    0x9b,0xf3,0xe1,0x57,0x84,0xab,0x71,0x28,
    0x4f,0x8d,0x07,0x04,0xa6,0x08,0xc5,0x4a,
    0x6b,0x62,0xd9,0x7b,0xeb,0x51,0x1d,0x13,
    0x21,0x00
Michael Hamburg's avatar
Michael Hamburg committed
597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664
}, {
    // RFC 8032 - test vector 6 - 13 octet
	0x6a,0x12,0x06,0x6f,0x55,0x33,0x1b,0x6c,
	0x22,0xac,0xd5,0xd5,0xbf,0xc5,0xd7,0x12,
	0x28,0xfb,0xda,0x80,0xae,0x8d,0xec,0x26,
	0xbd,0xd3,0x06,0x74,0x3c,0x50,0x27,0xcb,
	0x48,0x90,0x81,0x0c,0x16,0x2c,0x02,0x74,
	0x68,0x67,0x5e,0xcf,0x64,0x5a,0x83,0x17,
	0x6c,0x0d,0x73,0x23,0xa2,0xcc,0xde,0x2d,
	0x80,0xef,0xe5,0xa1,0x26,0x8e,0x8a,0xca,
	0x1d,0x6f,0xbc,0x19,0x4d,0x3f,0x77,0xc4,
	0x49,0x86,0xeb,0x4a,0xb4,0x17,0x79,0x19,
	0xad,0x8b,0xec,0x33,0xeb,0x47,0xbb,0xb5,
	0xfc,0x6e,0x28,0x19,0x6f,0xd1,0xca,0xf5,
	0x6b,0x4e,0x7e,0x0b,0xa5,0x51,0x92,0x34,
	0xd0,0x47,0x15,0x5a,0xc7,0x27,0xa1,0x05,
	0x31,0x00
}, {
    // RFC 8032 - test vector 7 - 64 octet
	0x55,0x4b,0xc2,0x48,0x08,0x60,0xb4,0x9e,
	0xab,0x85,0x32,0xd2,0xa5,0x33,0xb7,0xd5,
	0x78,0xef,0x47,0x3e,0xeb,0x58,0xc9,0x8b,
	0xb2,0xd0,0xe1,0xce,0x48,0x8a,0x98,0xb1,
	0x8d,0xfd,0xe9,0xb9,0xb9,0x07,0x75,0xe6,
	0x7f,0x47,0xd4,0xa1,0xc3,0x48,0x20,0x58,
	0xef,0xc9,0xf4,0x0d,0x2c,0xa0,0x33,0xa0,
	0x80,0x1b,0x63,0xd4,0x5b,0x3b,0x72,0x2e,
	0xf5,0x52,0xba,0xd3,0xb4,0xcc,0xb6,0x67,
	0xda,0x35,0x01,0x92,0xb6,0x1c,0x50,0x8c,
	0xf7,0xb6,0xb5,0xad,0xad,0xc2,0xc8,0xd9,
	0xa4,0x46,0xef,0x00,0x3f,0xb0,0x5c,0xba,
	0x5f,0x30,0xe8,0x8e,0x36,0xec,0x27,0x03,
	0xb3,0x49,0xca,0x22,0x9c,0x26,0x70,0x83,
	0x39,0x00
}, {
    // RFC 8032 - test vector 8 - 256 octet
	0xc6,0x50,0xdd,0xbb,0x06,0x01,0xc1,0x9c,
	0xa1,0x14,0x39,0xe1,0x64,0x0d,0xd9,0x31,
	0xf4,0x3c,0x51,0x8e,0xa5,0xbe,0xa7,0x0d,
	0x3d,0xcd,0xe5,0xf4,0x19,0x1f,0xe5,0x3f,
	0x00,0xcf,0x96,0x65,0x46,0xb7,0x2b,0xcc,
	0x7d,0x58,0xbe,0x2b,0x9b,0xad,0xef,0x28,
	0x74,0x39,0x54,0xe3,0xa4,0x4a,0x23,0xf8,
	0x80,0xe8,0xd4,0xf1,0xcf,0xce,0x2d,0x7a,
	0x61,0x45,0x2d,0x26,0xda,0x05,0x89,0x6f,
	0x0a,0x50,0xda,0x66,0xa2,0x39,0xa8,0xa1,
	0x88,0xb6,0xd8,0x25,0xb3,0x30,0x5a,0xd7,
	0x7b,0x73,0xfb,0xac,0x08,0x36,0xec,0xc6,
	0x09,0x87,0xfd,0x08,0x52,0x7c,0x1a,0x8e,
	0x80,0xd5,0x82,0x3e,0x65,0xca,0xfe,0x2a,
	0x3d,0x00
}, {
    // RFC 8032 - test vector 9 - 1023 octet
	0xe3,0x01,0x34,0x5a,0x41,0xa3,0x9a,0x4d,
	0x72,0xff,0xf8,0xdf,0x69,0xc9,0x80,0x75,
	0xa0,0xcc,0x08,0x2b,0x80,0x2f,0xc9,0xb2,
	0xb6,0xbc,0x50,0x3f,0x92,0x6b,0x65,0xbd,
	0xdf,0x7f,0x4c,0x8f,0x1c,0xb4,0x9f,0x63,
	0x96,0xaf,0xc8,0xa7,0x0a,0xbe,0x6d,0x8a,
	0xef,0x0d,0xb4,0x78,0xd4,0xc6,0xb2,0x97,
	0x00,0x76,0xc6,0xa0,0x48,0x4f,0xe7,0x6d,
	0x76,0xb3,0xa9,0x76,0x25,0xd7,0x9f,0x1c,
	0xe2,0x40,0xe7,0xc5,0x76,0x75,0x0d,0x29,
	0x55,0x28,0x28,0x6f,0x71,0x9b,0x41,0x3d,
	0xe9,0xad,0xa3,0xe8,0xeb,0x78,0xed,0x57,
	0x36,0x03,0xce,0x30,0xd8,0xbb,0x76,0x17,
	0x85,0xdc,0x30,0xdb,0xc3,0x20,0x86,0x9e,
	0x1a,0x00
Michael Hamburg's avatar
Michael Hamburg committed
665 666
}};
template<> const Block Tests<Ed448Goldilocks>::eddsa_sk[] = {
Michael Hamburg's avatar
Michael Hamburg committed
667
    // RFC 8032 - test vector 1 - blank
Michael Hamburg's avatar
Michael Hamburg committed
668
    Block(ed448_eddsa_sk[0],57),
Michael Hamburg's avatar
Michael Hamburg committed
669
    // RFC 8032 - test vector 2/3 - 1 octet
Michael Hamburg's avatar
Michael Hamburg committed
670
    Block(ed448_eddsa_sk[1],57),
Michael Hamburg's avatar
Michael Hamburg committed
671
    // RFC 8032 - test vector 2/3 - 1 octet
Michael Hamburg's avatar
Michael Hamburg committed
672
    Block(ed448_eddsa_sk[1],57),
Michael Hamburg's avatar
Michael Hamburg committed
673
    // RFC 8032 - test vector 4 - 11 octet
Michael Hamburg's avatar
Michael Hamburg committed
674
    Block(ed448_eddsa_sk[2],57),
Michael Hamburg's avatar
Michael Hamburg committed
675
    // RFC 8032 - test vector 5 - 12 octet
Michael Hamburg's avatar
Michael Hamburg committed
676
    Block(ed448_eddsa_sk[3],57),
Michael Hamburg's avatar
Michael Hamburg committed
677
    // RFC 8032 - test vector 1 - prehash - blank
678
    Block(ed448_eddsa_sk[4],57),
Michael Hamburg's avatar
Michael Hamburg committed
679
    // RFC 8032 - test vector 1 - prehash - blank
680
    Block(ed448_eddsa_sk[4],57),
Michael Hamburg's avatar
Michael Hamburg committed
681 682 683 684 685 686 687 688
    // RFC 8032 - test vector 6 - 13 octet
    Block(ed448_eddsa_sk[5],57),
    // RFC 8032 - test vector 7 - 64 octet
    Block(ed448_eddsa_sk[6],57),
    // RFC 8032 - test vector 8 - 256 octet
    Block(ed448_eddsa_sk[7],57),
    // RFC 8032 - test vector 9 - 1023 octet
    Block(ed448_eddsa_sk[8],57),
Michael Hamburg's avatar
Michael Hamburg committed
689 690 691
    Block(NULL,0)
};
template<> const Block Tests<Ed448Goldilocks>::eddsa_pk[] = {
Michael Hamburg's avatar
Michael Hamburg committed
692
    // RFC 8032 - test vector 1 - blank
Michael Hamburg's avatar
Michael Hamburg committed
693
    Block(ed448_eddsa_pk[0],57),
Michael Hamburg's avatar
Michael Hamburg committed
694
    // RFC 8032 - test vector 2/3 - 1 octet
Michael Hamburg's avatar
Michael Hamburg committed
695
    Block(ed448_eddsa_pk[1],57),
Michael Hamburg's avatar
Michael Hamburg committed
696
    // RFC 8032 - test vector 2/3 - 1 octet
Michael Hamburg's avatar
Michael Hamburg committed
697
    Block(ed448_eddsa_pk[1],57),
Michael Hamburg's avatar
Michael Hamburg committed
698
    // RFC 8032 - test vector 4 - 11 octet
Michael Hamburg's avatar
Michael Hamburg committed
699
    Block(ed448_eddsa_pk[2],57),
Michael Hamburg's avatar
Michael Hamburg committed
700
    // RFC 8032 - test vector 5 - 12 octet
701
    Block(ed448_eddsa_pk[3],57),
Michael Hamburg's avatar
Michael Hamburg committed
702 703 704
    // RFC 8032 - test vector 1 - prehash - abc
    Block(ed448_eddsa_pk[4],57),
    // RFC 8032 - test vector 1 - prehash - abc
705
    Block(ed448_eddsa_pk[4],57),
Michael Hamburg's avatar
Michael Hamburg committed
706 707 708 709 710 711 712 713
    // RFC 8032 - test vector 6 - 13 octet
    Block(ed448_eddsa_pk[5],57),
    // RFC 8032 - test vector 7 - 64 octet
    Block(ed448_eddsa_pk[6],57),
    // RFC 8032 - test vector 8 - 256 octet
    Block(ed448_eddsa_pk[7],57),
    // RFC 8032 - test vector 9 - 1023 octet
    Block(ed448_eddsa_pk[8],57)
Michael Hamburg's avatar
Michael Hamburg committed
714 715
};
template<> const Block Tests<Ed448Goldilocks>::eddsa_message[] = {
Michael Hamburg's avatar
Michael Hamburg committed
716
    // RFC 8032 - test vector 1 - blank
Michael Hamburg's avatar
Michael Hamburg committed
717
    Block(ed448_eddsa_message[0],0),
Michael Hamburg's avatar
Michael Hamburg committed
718
    // RFC 8032 - test vector 2/3 - 1 octet
Michael Hamburg's avatar
Michael Hamburg committed
719
    Block(ed448_eddsa_message[1],1),
Michael Hamburg's avatar
Michael Hamburg committed
720
    // RFC 8032 - test vector 2/3 - 1 octet
Michael Hamburg's avatar
Michael Hamburg committed
721
    Block(ed448_eddsa_message[1],1),
Michael Hamburg's avatar
Michael Hamburg committed
722
    // RFC 8032 - test vector 4 - 11 octet
Michael Hamburg's avatar
Michael Hamburg committed
723
    Block(ed448_eddsa_message[2],11),
Michael Hamburg's avatar
Michael Hamburg committed
724
    // RFC 8032 - test vector 5 - 12 octet
725
    Block(ed448_eddsa_message[3],12),
Michael Hamburg's avatar
Michael Hamburg committed
726
    // RFC 8032 - test vector 1/2 - prehash - abc
727
    Block(ed448_eddsa_message[4],3),
Michael Hamburg's avatar
Michael Hamburg committed
728 729 730 731 732 733 734 735 736 737
    // RFC 8032 - test vector 1/2 - prehash - abc
    Block(ed448_eddsa_message[4],3),
    // RFC 8032 - test vector 6 - 13 octet
    Block(ed448_eddsa_message[5],13),
    // RFC 8032 - test vector 7 - 64 octet
    Block(ed448_eddsa_message[6],64),
    // RFC 8032 - test vector 8 - 256 octet
    Block(ed448_eddsa_message[7],256),
    // RFC 8032 - test vector 9 - 1023 octet
    Block(ed448_eddsa_message[8],1023)
Michael Hamburg's avatar
Michael Hamburg committed
738 739
};
template<> const Block Tests<Ed448Goldilocks>::eddsa_context[] = {
Michael Hamburg's avatar
Michael Hamburg committed
740
    // RFC 8032 - test vector 1 - blank
Michael Hamburg's avatar
Michael Hamburg committed
741
    Block(NULL,0),
Michael Hamburg's avatar
Michael Hamburg committed
742
    // RFC 8032 - test vector 2 - 1 octet
Michael Hamburg's avatar
Michael Hamburg committed
743
    Block(NULL,0),
Michael Hamburg's avatar
Michael Hamburg committed
744
    // RFC 8032 - test vector 3 - 1 octet
Michael Hamburg's avatar
Michael Hamburg committed
745
    Block(ed448_eddsa_context[0],3),
Michael Hamburg's avatar
Michael Hamburg committed
746 747 748
    // RFC 8032 - test vector 4 - 11 octet
    Block(NULL,0),
    // RFC 8032 - test vector 5 - 12 octet
Michael Hamburg's avatar
Michael Hamburg committed
749
    Block(NULL,0),
Michael Hamburg's avatar
Michael Hamburg committed
750 751 752 753 754
    // RFC 8032 - test vector 1 - prehash - abc
    Block(NULL,0),
    // RFC 8032 - test vector 2 - prehash - abc - context
    Block(ed448_eddsa_context[0],3),
    // RFC 8032 - test vector 6 - 13 octet
755
    Block(NULL,0),
Michael Hamburg's avatar
Michael Hamburg committed
756
    // RFC 8032 - test vector 7 - 64 octet
757
    Block(NULL,0),
Michael Hamburg's avatar
Michael Hamburg committed
758 759 760 761 762
    // RFC 8032 - test vector 8 - 256 octet
    Block(NULL,0),
    // RFC 8032 - test vector 9 - 1023 octet
    Block(NULL,0)

Michael Hamburg's avatar
Michael Hamburg committed
763 764
};
template<> const Block Tests<Ed448Goldilocks>::eddsa_sig[] = {
Michael Hamburg's avatar
Michael Hamburg committed
765
    // RFC 8032 - test vector 1 - blank
Michael Hamburg's avatar
Michael Hamburg committed
766
    Block(ed448_eddsa_sig[0],114),
Michael Hamburg's avatar
Michael Hamburg committed
767
    // RFC 8032 - test vector 2 - 1 octet
Michael Hamburg's avatar
Michael Hamburg committed
768
    Block(ed448_eddsa_sig[1],114),
Michael Hamburg's avatar
Michael Hamburg committed
769
    // RFC 8032 - test vector 3 - 1 octet - context
Michael Hamburg's avatar
Michael Hamburg committed
770
    Block(ed448_eddsa_sig[4],114),
Michael Hamburg's avatar
Michael Hamburg committed
771
    // RFC 8032 - test vector 4 - 11 octet
Michael Hamburg's avatar
Michael Hamburg committed
772
    Block(ed448_eddsa_sig[2],114),
Michael Hamburg's avatar
Michael Hamburg committed
773
    // RFC 8032 - test vector 5 - 12 octet
774
    Block(ed448_eddsa_sig[3],114),
Michael Hamburg's avatar
Michael Hamburg committed
775
    // RFC 8032 - test vector 1 - prehash - abc
776
    Block(ed448_eddsa_sig[5],114),
Michael Hamburg's avatar
Michael Hamburg committed
777 778 779 780 781 782 783 784 785 786
    // RFC 8032 - test vector 2 - prehash - abc - context
    Block(ed448_eddsa_sig[6],114),
    // RFC 8032 - test vector 6 - 13 octet
    Block(ed448_eddsa_sig[7],114),
    // RFC 8032 - test vector 7 - 64 octet
    Block(ed448_eddsa_sig[8],114),
    // RFC 8032 - test vector 8 - 256 octet
    Block(ed448_eddsa_sig[9],114),
    // RFC 8032 - test vector 9 - 1023 octet
    Block(ed448_eddsa_sig[10],114)
Michael Hamburg's avatar
Michael Hamburg committed
787 788
};

789
const uint8_t ed25519_eddsa_sk[][32] = {{
Michael Hamburg's avatar
Michael Hamburg committed
790 791 792 793 794 795 796 797 798 799 800 801 802 803
    0x9d,0x61,0xb1,0x9d,0xef,0xfd,0x5a,0x60,
    0xba,0x84,0x4a,0xf4,0x92,0xec,0x2c,0xc4,
    0x44,0x49,0xc5,0x69,0x7b,0x32,0x69,0x19,
    0x70,0x3b,0xac,0x03,0x1c,0xae,0x7f,0x60
}, {
    0x4c,0xcd,0x08,0x9b,0x28,0xff,0x96,0xda,
    0x9d,0xb6,0xc3,0x46,0xec,0x11,0x4e,0x0f,
    0x5b,0x8a,0x31,0x9f,0x35,0xab,0xa6,0x24,
    0xda,0x8c,0xf6,0xed,0x4f,0xb8,0xa6,0xfb
}, {
    0xc5,0xaa,0x8d,0xf4,0x3f,0x9f,0x83,0x7b,
    0xed,0xb7,0x44,0x2f,0x31,0xdc,0xb7,0xb1,
    0x66,0xd3,0x85,0x35,0x07,0x6f,0x09,0x4b,
    0x85,0xce,0x3a,0x2e,0x0b,0x44,0x58,0xf7
804 805 806 807 808
}, {
    0x83,0x3f,0xe6,0x24,0x09,0x23,0x7b,0x9d,
    0x62,0xec,0x77,0x58,0x75,0x20,0x91,0x1e,
    0x9a,0x75,0x9c,0xec,0x1d,0x19,0x75,0x5b,
    0x7d,0xa9,0x01,0xb9,0x6d,0xca,0x3d,0x42
809 810 811 812 813
}, {
    0x03,0x05,0x33,0x4e,0x38,0x1a,0xf7,0x8f,
    0x14,0x1c,0xb6,0x66,0xf6,0x19,0x9f,0x57,
    0xbc,0x34,0x95,0x33,0x5a,0x25,0x6a,0x95,
    0xbd,0x2a,0x55,0xbf,0x54,0x66,0x63,0xf6
Michael Hamburg's avatar
Michael Hamburg committed
814
}};
815
const uint8_t ed25519_eddsa_pk[][32] = {{
Michael Hamburg's avatar
Michael Hamburg committed
816 817 818 819 820 821 822 823 824 825 826 827 828 829
    0xd7,0x5a,0x98,0x01,0x82,0xb1,0x0a,0xb7,
    0xd5,0x4b,0xfe,0xd3,0xc9,0x64,0x07,0x3a,
    0x0e,0xe1,0x72,0xf3,0xda,0xa6,0x23,0x25,
    0xaf,0x02,0x1a,0x68,0xf7,0x07,0x51,0x1a
}, {
    0x3d,0x40,0x17,0xc3,0xe8,0x43,0x89,0x5a,
    0x92,0xb7,0x0a,0xa7,0x4d,0x1b,0x7e,0xbc,
    0x9c,0x98,0x2c,0xcf,0x2e,0xc4,0x96,0x8c,
    0xc0,0xcd,0x55,0xf1,0x2a,0xf4,0x66,0x0c
}, {
    0xfc,0x51,0xcd,0x8e,0x62,0x18,0xa1,0xa3,
    0x8d,0xa4,0x7e,0xd0,0x02,0x30,0xf0,0x58,
    0x08,0x16,0xed,0x13,0xba,0x33,0x03,0xac,
    0x5d,0xeb,0x91,0x15,0x48,0x90,0x80,0x25
830 831 832 833 834
}, {
    0xec,0x17,0x2b,0x93,0xad,0x5e,0x56,0x3b,
    0xf4,0x93,0x2c,0x70,0xe1,0x24,0x50,0x34,
    0xc3,0x54,0x67,0xef,0x2e,0xfd,0x4d,0x64,
    0xeb,0xf8,0x19,0x68,0x34,0x67,0xe2,0xbf
835 836 837 838 839
}, {
    0xdf,0xc9,0x42,0x5e,0x4f,0x96,0x8f,0x7f,
    0x0c,0x29,0xf0,0x25,0x9c,0xf5,0xf9,0xae,
    0xd6,0x85,0x1c,0x2b,0xb4,0xad,0x8b,0xfb,
    0x86,0x0c,0xfe,0xe0,0xab,0x24,0x82,0x92
Michael Hamburg's avatar
Michael Hamburg committed
840
}};
841
const uint8_t ed25519_eddsa_message[][16] = {{
Michael Hamburg's avatar
Michael Hamburg committed
842 843 844 845 846
    0
}, {
    0x72
}, {
    0xaf,0x82
847 848
}, {
    0x61,0x62,0x63
849 850 851 852 853 854 855 856
}, {
    0xf7,0x26,0x93,0x6d,0x19,0xc8,0x00,0x49,
    0x4e,0x3f,0xda,0xff,0x20,0xb2,0x76,0xa8
}};
const uint8_t ed25519_eddsa_context[][3] = {{
    0x66,0x6f,0x6f
}, {
    0x62,0x61,0x72
Michael Hamburg's avatar
Michael Hamburg committed
857
}};
858
const uint8_t ed25519_eddsa_sig[][64] = {{
Michael Hamburg's avatar
Michael Hamburg committed
859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884
    0xe5,0x56,0x43,0x00,0xc3,0x60,0xac,0x72,
    0x90,0x86,0xe2,0xcc,0x80,0x6e,0x82,0x8a,
    0x84,0x87,0x7f,0x1e,0xb8,0xe5,0xd9,0x74,
    0xd8,0x73,0xe0,0x65,0x22,0x49,0x01,0x55,
    0x5f,0xb8,0x82,0x15,0x90,0xa3,0x3b,0xac,
    0xc6,0x1e,0x39,0x70,0x1c,0xf9,0xb4,0x6b,
    0xd2,0x5b,0xf5,0xf0,0x59,0x5b,0xbe,0x24,
    0x65,0x51,0x41,0x43,0x8e,0x7a,0x10,0x0b
} , {
    0x92,0xa0,0x09,0xa9,0xf0,0xd4,0xca,0xb8,
    0x72,0x0e,0x82,0x0b,0x5f,0x64,0x25,0x40,
    0xa2,0xb2,0x7b,0x54,0x16,0x50,0x3f,0x8f,
    0xb3,0x76,0x22,0x23,0xeb,0xdb,0x69,0xda,
    0x08,0x5a,0xc1,0xe4,0x3e,0x15,0x99,0x6e,
    0x45,0x8f,0x36,0x13,0xd0,0xf1,0x1d,0x8c,
    0x38,0x7b,0x2e,0xae,0xb4,0x30,0x2a,0xee,
    0xb0,0x0d,0x29,0x16,0x12,0xbb,0x0c,0x00
}, {
    0x62,0x91,0xd6,0x57,0xde,0xec,0x24,0x02,
    0x48,0x27,0xe6,0x9c,0x3a,0xbe,0x01,0xa3,
    0x0c,0xe5,0x48,0xa2,0x84,0x74,0x3a,0x44,
    0x5e,0x36,0x80,0xd7,0xdb,0x5a,0xc3,0xac,
    0x18,0xff,0x9b,0x53,0x8d,0x16,0xf2,0x90,
    0xae,0x67,0xf7,0x60,0x98,0x4d,0xc6,0x59,
    0x4a,0x7c,0x15,0xe9,0x71,0x6e,0xd2,0x8d,
    0xc0,0x27,0xbe,0xce,0xea,0x1e,0xc4,0x0a
885
}, {
886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911
    0x98,0xa7,0x02,0x22,0xf0,0xb8,0x12,0x1a,
    0xa9,0xd3,0x0f,0x81,0x3d,0x68,0x3f,0x80,
    0x9e,0x46,0x2b,0x46,0x9c,0x7f,0xf8,0x76,
    0x39,0x49,0x9b,0xb9,0x4e,0x6d,0xae,0x41,
    0x31,0xf8,0x50,0x42,0x46,0x3c,0x2a,0x35,
    0x5a,0x20,0x03,0xd0,0x62,0xad,0xf5,0xaa,
    0xa1,0x0b,0x8c,0x61,0xe6,0x36,0x06,0x2a,
    0xaa,0xd1,0x1c,0x2a,0x26,0x08,0x34,0x06
}, {
    0x55,0xa4,0xcc,0x2f,0x70,0xa5,0x4e,0x04,
    0x28,0x8c,0x5f,0x4c,0xd1,0xe4,0x5a,0x7b,
    0xb5,0x20,0xb3,0x62,0x92,0x91,0x18,0x76,
    0xca,0xda,0x73,0x23,0x19,0x8d,0xd8,0x7a,
    0x8b,0x36,0x95,0x0b,0x95,0x13,0x00,0x22,
    0x90,0x7a,0x7f,0xb7,0xc4,0xe9,0xb2,0xd5,
    0xf6,0xcc,0xa6,0x85,0xa5,0x87,0xb4,0xb2,
    0x1f,0x4b,0x88,0x8e,0x4e,0x7e,0xdb,0x0d
}, {
    0xfc,0x60,0xd5,0x87,0x2f,0xc4,0x6b,0x3a,
    0xa6,0x9f,0x8b,0x5b,0x43,0x51,0xd5,0x80,
    0x8f,0x92,0xbc,0xc0,0x44,0x60,0x6d,0xb0,
    0x97,0xab,0xab,0x6d,0xbc,0xb1,0xae,0xe3,
    0x21,0x6c,0x48,0xe8,0xb3,0xb6,0x64,0x31,
    0xb5,0xb1,0x86,0xd1,0xd2,0x8f,0x8e,0xe1,
    0x5a,0x5c,0xa2,0xdf,0x66,0x68,0x34,0x62,
    0x91,0xc2,0x04,0x3d,0x4e,0xb3,0xe9,0x0d
Michael Hamburg's avatar
Michael Hamburg committed
912 913
}};

914
template<> const bool Tests<Ristretto>::eddsa_prehashed[] = {
915 916 917
    false,
    false,
    false,
918 919 920
    true,
    false,
    false
921
};
922
template<> const Block Tests<Ristretto>::eddsa_sk[] = {
Michael Hamburg's avatar
Michael Hamburg committed
923 924 925
    Block(ed25519_eddsa_sk[0],32),
    Block(ed25519_eddsa_sk[1],32),
    Block(ed25519_eddsa_sk[2],32),
926
    Block(ed25519_eddsa_sk[3],32),
927 928
    Block(ed25519_eddsa_sk[4],32),
    Block(ed25519_eddsa_sk[4],32),
Michael Hamburg's avatar
Michael Hamburg committed
929 930
    Block(NULL,0)
};
931
template<> const Block Tests<Ristretto>::eddsa_pk[] = {
Michael Hamburg's avatar
Michael Hamburg committed
932 933
    Block(ed25519_eddsa_pk[0],32),
    Block(ed25519_eddsa_pk[1],32),
934
    Block(ed25519_eddsa_pk[2],32),
935 936 937
    Block(ed25519_eddsa_pk[3],32),
    Block(ed25519_eddsa_pk[4],32),
    Block(ed25519_eddsa_pk[4],32)
Michael Hamburg's avatar
Michael Hamburg committed
938
};
939 940 941 942
template<> const Block Tests<Ristretto>::eddsa_context[] = {
    EdDSA<Ristretto>::NO_CONTEXT(),
    EdDSA<Ristretto>::NO_CONTEXT(),
    EdDSA<Ristretto>::NO_CONTEXT(),
943 944 945 946
    Block(NULL,0),
    Block(ed25519_eddsa_context[0],3),
    Block(ed25519_eddsa_context[1],3)
};
947
template<> const Block Tests<Ristretto>::eddsa_message[] = {
Michael Hamburg's avatar
Michael Hamburg committed
948 949
    Block(ed25519_eddsa_message[0],0),
    Block(ed25519_eddsa_message[1],1),
950
    Block(ed25519_eddsa_message[2],2),
951 952 953
    Block(ed25519_eddsa_message[3],3),
    Block(ed25519_eddsa_message[4],16),
    Block(ed25519_eddsa_message[4],16)
Michael Hamburg's avatar
Michael Hamburg committed
954
};
955
template<> const Block Tests<Ristretto>::eddsa_sig[] = {
Michael Hamburg's avatar
Michael Hamburg committed
956 957
    Block(ed25519_eddsa_sig[0],64),
    Block(ed25519_eddsa_sig[1],64),
958
    Block(ed25519_eddsa_sig[2],64),
959 960 961
    Block(ed25519_eddsa_sig[3],64),
    Block(ed25519_eddsa_sig[4],64),
    Block(ed25519_eddsa_sig[5],64)
Michael Hamburg's avatar
Michael Hamburg committed
962
};