7#ifndef SECP256K1_MODULE_SCHNORR_TESTS_H
8#define SECP256K1_MODULE_SCHNORR_TESTS_H
13 unsigned char privkey[32];
14 unsigned char message[32];
15 unsigned char schnorr_signature[64];
41 unsigned char msg32[32];
69 for (j = 0; j <
count; j++) {
84 static const unsigned char pkbuf[33] = {
86 0x79, 0xBE, 0x66, 0x7E, 0xF9, 0xDC, 0xBB, 0xAC,
87 0x55, 0xA0, 0x62, 0x95, 0xCE, 0x87, 0x0B, 0x07,
88 0x02, 0x9B, 0xFC, 0xDB, 0x2D, 0xCE, 0x28, 0xD9,
89 0x59, 0xF2, 0x81, 0x5B, 0x16, 0xF8, 0x17, 0x98,
92 static const unsigned char msg[32] = {
93 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
94 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
95 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
96 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
99 static const unsigned char sig[64] = {
100 0x78, 0x7A, 0x84, 0x8E, 0x71, 0x04, 0x3D, 0x28,
101 0x0C, 0x50, 0x47, 0x0E, 0x8E, 0x15, 0x32, 0xB2,
102 0xDD, 0x5D, 0x20, 0xEE, 0x91, 0x2A, 0x45, 0xDB,
103 0xDD, 0x2B, 0xD1, 0xDF, 0xBF, 0x18, 0x7E, 0xF6,
104 0x70, 0x31, 0xA9, 0x88, 0x31, 0x85, 0x9D, 0xC3,
105 0x4D, 0xFF, 0xEE, 0xDD, 0xA8, 0x68, 0x31, 0x84,
106 0x2C, 0xCD, 0x00, 0x79, 0xE1, 0xF9, 0x2A, 0xF1,
107 0x77, 0xF7, 0xF2, 0x2C, 0xC1, 0xDC, 0xED, 0x05,
117 static const unsigned char pkbuf[33] = {
119 0xDF, 0xF1, 0xD7, 0x7F, 0x2A, 0x67, 0x1C, 0x5F,
120 0x36, 0x18, 0x37, 0x26, 0xDB, 0x23, 0x41, 0xBE,
121 0x58, 0xFE, 0xAE, 0x1D, 0xA2, 0xDE, 0xCE, 0xD8,
122 0x43, 0x24, 0x0F, 0x7B, 0x50, 0x2B, 0xA6, 0x59,
125 static const unsigned char msg[32] = {
126 0x24, 0x3F, 0x6A, 0x88, 0x85, 0xA3, 0x08, 0xD3,
127 0x13, 0x19, 0x8A, 0x2E, 0x03, 0x70, 0x73, 0x44,
128 0xA4, 0x09, 0x38, 0x22, 0x29, 0x9F, 0x31, 0xD0,
129 0x08, 0x2E, 0xFA, 0x98, 0xEC, 0x4E, 0x6C, 0x89,
132 static const unsigned char sig[64] = {
133 0x2A, 0x29, 0x8D, 0xAC, 0xAE, 0x57, 0x39, 0x5A,
134 0x15, 0xD0, 0x79, 0x5D, 0xDB, 0xFD, 0x1D, 0xCB,
135 0x56, 0x4D, 0xA8, 0x2B, 0x0F, 0x26, 0x9B, 0xC7,
136 0x0A, 0x74, 0xF8, 0x22, 0x04, 0x29, 0xBA, 0x1D,
137 0x1E, 0x51, 0xA2, 0x2C, 0xCE, 0xC3, 0x55, 0x99,
138 0xB8, 0xF2, 0x66, 0x91, 0x22, 0x81, 0xF8, 0x36,
139 0x5F, 0xFC, 0x2D, 0x03, 0x5A, 0x23, 0x04, 0x34,
140 0xA1, 0xA6, 0x4D, 0xC5, 0x9F, 0x70, 0x13, 0xFD,
150 static const unsigned char pkbuf[33] = {
152 0xFA, 0xC2, 0x11, 0x4C, 0x2F, 0xBB, 0x09, 0x15,
153 0x27, 0xEB, 0x7C, 0x64, 0xEC, 0xB1, 0x1F, 0x80,
154 0x21, 0xCB, 0x45, 0xE8, 0xE7, 0x80, 0x9D, 0x3C,
155 0x09, 0x38, 0xE4, 0xB8, 0xC0, 0xE5, 0xF8, 0x4B,
158 static const unsigned char msg[32] = {
159 0x5E, 0x2D, 0x58, 0xD8, 0xB3, 0xBC, 0xDF, 0x1A,
160 0xBA, 0xDE, 0xC7, 0x82, 0x90, 0x54, 0xF9, 0x0D,
161 0xDA, 0x98, 0x05, 0xAA, 0xB5, 0x6C, 0x77, 0x33,
162 0x30, 0x24, 0xB9, 0xD0, 0xA5, 0x08, 0xB7, 0x5C,
165 static const unsigned char sig[64] = {
166 0x00, 0xDA, 0x9B, 0x08, 0x17, 0x2A, 0x9B, 0x6F,
167 0x04, 0x66, 0xA2, 0xDE, 0xFD, 0x81, 0x7F, 0x2D,
168 0x7A, 0xB4, 0x37, 0xE0, 0xD2, 0x53, 0xCB, 0x53,
169 0x95, 0xA9, 0x63, 0x86, 0x6B, 0x35, 0x74, 0xBE,
170 0x00, 0x88, 0x03, 0x71, 0xD0, 0x17, 0x66, 0x93,
171 0x5B, 0x92, 0xD2, 0xAB, 0x4C, 0xD5, 0xC8, 0xA2,
172 0xA5, 0x83, 0x7E, 0xC5, 0x7F, 0xED, 0x76, 0x60,
173 0x77, 0x3A, 0x05, 0xF0, 0xDE, 0x14, 0x23, 0x80,
183 static const unsigned char pkbuf[33] = {
185 0xDE, 0xFD, 0xEA, 0x4C, 0xDB, 0x67, 0x77, 0x50,
186 0xA4, 0x20, 0xFE, 0xE8, 0x07, 0xEA, 0xCF, 0x21,
187 0xEB, 0x98, 0x98, 0xAE, 0x79, 0xB9, 0x76, 0x87,
188 0x66, 0xE4, 0xFA, 0xA0, 0x4A, 0x2D, 0x4A, 0x34,
191 static const unsigned char msg[32] = {
192 0x4D, 0xF3, 0xC3, 0xF6, 0x8F, 0xCC, 0x83, 0xB2,
193 0x7E, 0x9D, 0x42, 0xC9, 0x04, 0x31, 0xA7, 0x24,
194 0x99, 0xF1, 0x78, 0x75, 0xC8, 0x1A, 0x59, 0x9B,
195 0x56, 0x6C, 0x98, 0x89, 0xB9, 0x69, 0x67, 0x03,
198 static const unsigned char sig[64] = {
199 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
200 0x00, 0x00, 0x00, 0x3B, 0x78, 0xCE, 0x56, 0x3F,
201 0x89, 0xA0, 0xED, 0x94, 0x14, 0xF5, 0xAA, 0x28,
202 0xAD, 0x0D, 0x96, 0xD6, 0x79, 0x5F, 0x9C, 0x63,
203 0x02, 0xA8, 0xDC, 0x32, 0xE6, 0x4E, 0x86, 0xA3,
204 0x33, 0xF2, 0x0E, 0xF5, 0x6E, 0xAC, 0x9B, 0xA3,
205 0x0B, 0x72, 0x46, 0xD6, 0xD2, 0x5E, 0x22, 0xAD,
206 0xB8, 0xC6, 0xBE, 0x1A, 0xEB, 0x08, 0xD4, 0x9D,
216 static const unsigned char pkbuf[33] = {
218 0x1B, 0x84, 0xC5, 0x56, 0x7B, 0x12, 0x64, 0x40,
219 0x99, 0x5D, 0x3E, 0xD5, 0xAA, 0xBA, 0x05, 0x65,
220 0xD7, 0x1E, 0x18, 0x34, 0x60, 0x48, 0x19, 0xFF,
221 0x9C, 0x17, 0xF5, 0xE9, 0xD5, 0xDD, 0x07, 0x8F,
224 static const unsigned char msg[32] = {
225 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
226 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
227 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
228 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
231 static const unsigned char sig[64] = {
232 0x52, 0x81, 0x85, 0x79, 0xAC, 0xA5, 0x97, 0x67,
233 0xE3, 0x29, 0x1D, 0x91, 0xB7, 0x6B, 0x63, 0x7B,
234 0xEF, 0x06, 0x20, 0x83, 0x28, 0x49, 0x92, 0xF2,
235 0xD9, 0x5F, 0x56, 0x4C, 0xA6, 0xCB, 0x4E, 0x35,
236 0x30, 0xB1, 0xDA, 0x84, 0x9C, 0x8E, 0x83, 0x04,
237 0xAD, 0xC0, 0xCF, 0xE8, 0x70, 0x66, 0x03, 0x34,
238 0xB3, 0xCF, 0xC1, 0x8E, 0x82, 0x5E, 0xF1, 0xDB,
239 0x34, 0xCF, 0xAE, 0x3D, 0xFC, 0x5D, 0x81, 0x87,
249 static const unsigned char pkbuf[33] = {
251 0xDF, 0xF1, 0xD7, 0x7F, 0x2A, 0x67, 0x1C, 0x5F,
252 0x36, 0x18, 0x37, 0x26, 0xDB, 0x23, 0x41, 0xBE,
253 0x58, 0xFE, 0xAE, 0x1D, 0xA2, 0xDE, 0xCE, 0xD8,
254 0x43, 0x24, 0x0F, 0x7B, 0x50, 0x2B, 0xA6, 0x59,
257 static const unsigned char msg[32] = {
258 0x24, 0x3F, 0x6A, 0x88, 0x85, 0xA3, 0x08, 0xD3,
259 0x13, 0x19, 0x8A, 0x2E, 0x03, 0x70, 0x73, 0x44,
260 0xA4, 0x09, 0x38, 0x22, 0x29, 0x9F, 0x31, 0xD0,
261 0x08, 0x2E, 0xFA, 0x98, 0xEC, 0x4E, 0x6C, 0x89,
264 static const unsigned char sig[64] = {
265 0x2A, 0x29, 0x8D, 0xAC, 0xAE, 0x57, 0x39, 0x5A,
266 0x15, 0xD0, 0x79, 0x5D, 0xDB, 0xFD, 0x1D, 0xCB,
267 0x56, 0x4D, 0xA8, 0x2B, 0x0F, 0x26, 0x9B, 0xC7,
268 0x0A, 0x74, 0xF8, 0x22, 0x04, 0x29, 0xBA, 0x1D,
269 0xFA, 0x16, 0xAE, 0xE0, 0x66, 0x09, 0x28, 0x0A,
270 0x19, 0xB6, 0x7A, 0x24, 0xE1, 0x97, 0x7E, 0x46,
271 0x97, 0x71, 0x2B, 0x5F, 0xD2, 0x94, 0x39, 0x14,
272 0xEC, 0xD5, 0xF7, 0x30, 0x90, 0x1B, 0x4A, 0xB7,
282 static const unsigned char pkbuf[33] = {
284 0xFA, 0xC2, 0x11, 0x4C, 0x2F, 0xBB, 0x09, 0x15,
285 0x27, 0xEB, 0x7C, 0x64, 0xEC, 0xB1, 0x1F, 0x80,
286 0x21, 0xCB, 0x45, 0xE8, 0xE7, 0x80, 0x9D, 0x3C,
287 0x09, 0x38, 0xE4, 0xB8, 0xC0, 0xE5, 0xF8, 0x4B,
290 static const unsigned char msg[32] = {
291 0x5E, 0x2D, 0x58, 0xD8, 0xB3, 0xBC, 0xDF, 0x1A,
292 0xBA, 0xDE, 0xC7, 0x82, 0x90, 0x54, 0xF9, 0x0D,
293 0xDA, 0x98, 0x05, 0xAA, 0xB5, 0x6C, 0x77, 0x33,
294 0x30, 0x24, 0xB9, 0xD0, 0xA5, 0x08, 0xB7, 0x5C,
297 static const unsigned char sig[64] = {
298 0x00, 0xDA, 0x9B, 0x08, 0x17, 0x2A, 0x9B, 0x6F,
299 0x04, 0x66, 0xA2, 0xDE, 0xFD, 0x81, 0x7F, 0x2D,
300 0x7A, 0xB4, 0x37, 0xE0, 0xD2, 0x53, 0xCB, 0x53,
301 0x95, 0xA9, 0x63, 0x86, 0x6B, 0x35, 0x74, 0xBE,
302 0xD0, 0x92, 0xF9, 0xD8, 0x60, 0xF1, 0x77, 0x6A,
303 0x1F, 0x74, 0x12, 0xAD, 0x8A, 0x1E, 0xB5, 0x0D,
304 0xAC, 0xCC, 0x22, 0x2B, 0xC8, 0xC0, 0xE2, 0x6B,
305 0x20, 0x56, 0xDF, 0x2F, 0x27, 0x3E, 0xFD, 0xEC,
315 static const unsigned char pkbuf[33] = {
317 0x79, 0xBE, 0x66, 0x7E, 0xF9, 0xDC, 0xBB, 0xAC,
318 0x55, 0xA0, 0x62, 0x95, 0xCE, 0x87, 0x0B, 0x07,
319 0x02, 0x9B, 0xFC, 0xDB, 0x2D, 0xCE, 0x28, 0xD9,
320 0x59, 0xF2, 0x81, 0x5B, 0x16, 0xF8, 0x17, 0x98,
323 static const unsigned char msg[32] = {
324 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
325 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
326 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
327 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
330 static const unsigned char sig[64] = {
331 0x78, 0x7A, 0x84, 0x8E, 0x71, 0x04, 0x3D, 0x28,
332 0x0C, 0x50, 0x47, 0x0E, 0x8E, 0x15, 0x32, 0xB2,
333 0xDD, 0x5D, 0x20, 0xEE, 0x91, 0x2A, 0x45, 0xDB,
334 0xDD, 0x2B, 0xD1, 0xDF, 0xBF, 0x18, 0x7E, 0xF6,
335 0x8F, 0xCE, 0x56, 0x77, 0xCE, 0x7A, 0x62, 0x3C,
336 0xB2, 0x00, 0x11, 0x22, 0x57, 0x97, 0xCE, 0x7A,
337 0x8D, 0xE1, 0xDC, 0x6C, 0xCD, 0x4F, 0x75, 0x4A,
338 0x47, 0xDA, 0x6C, 0x60, 0x0E, 0x59, 0x54, 0x3C,
348 static const unsigned char pkbuf[33] = {
350 0xDF, 0xF1, 0xD7, 0x7F, 0x2A, 0x67, 0x1C, 0x5F,
351 0x36, 0x18, 0x37, 0x26, 0xDB, 0x23, 0x41, 0xBE,
352 0x58, 0xFE, 0xAE, 0x1D, 0xA2, 0xDE, 0xCE, 0xD8,
353 0x43, 0x24, 0x0F, 0x7B, 0x50, 0x2B, 0xA6, 0x59,
356 static const unsigned char msg[32] = {
357 0x24, 0x3F, 0x6A, 0x88, 0x85, 0xA3, 0x08, 0xD3,
358 0x13, 0x19, 0x8A, 0x2E, 0x03, 0x70, 0x73, 0x44,
359 0xA4, 0x09, 0x38, 0x22, 0x29, 0x9F, 0x31, 0xD0,
360 0x08, 0x2E, 0xFA, 0x98, 0xEC, 0x4E, 0x6C, 0x89,
363 static const unsigned char sig[64] = {
364 0x2A, 0x29, 0x8D, 0xAC, 0xAE, 0x57, 0x39, 0x5A,
365 0x15, 0xD0, 0x79, 0x5D, 0xDB, 0xFD, 0x1D, 0xCB,
366 0x56, 0x4D, 0xA8, 0x2B, 0x0F, 0x26, 0x9B, 0xC7,
367 0x0A, 0x74, 0xF8, 0x22, 0x04, 0x29, 0xBA, 0x1D,
368 0x1E, 0x51, 0xA2, 0x2C, 0xCE, 0xC3, 0x55, 0x99,
369 0xB8, 0xF2, 0x66, 0x91, 0x22, 0x81, 0xF8, 0x36,
370 0x5F, 0xFC, 0x2D, 0x03, 0x5A, 0x23, 0x04, 0x34,
371 0xA1, 0xA6, 0x4D, 0xC5, 0x9F, 0x70, 0x13, 0xFD,
381 static const unsigned char pkbuf[33] = {
383 0xDF, 0xF1, 0xD7, 0x7F, 0x2A, 0x67, 0x1C, 0x5F,
384 0x36, 0x18, 0x37, 0x26, 0xDB, 0x23, 0x41, 0xBE,
385 0x58, 0xFE, 0xAE, 0x1D, 0xA2, 0xDE, 0xCE, 0xD8,
386 0x43, 0x24, 0x0F, 0x7B, 0x50, 0x2B, 0xA6, 0x59,
389 static const unsigned char msg[32] = {
390 0x24, 0x3F, 0x6A, 0x88, 0x85, 0xA3, 0x08, 0xD3,
391 0x13, 0x19, 0x8A, 0x2E, 0x03, 0x70, 0x73, 0x44,
392 0xA4, 0x09, 0x38, 0x22, 0x29, 0x9F, 0x31, 0xD0,
393 0x08, 0x2E, 0xFA, 0x98, 0xEC, 0x4E, 0x6C, 0x89,
396 static const unsigned char sig[64] = {
397 0x2A, 0x29, 0x8D, 0xAC, 0xAE, 0x57, 0x39, 0x5A,
398 0x15, 0xD0, 0x79, 0x5D, 0xDB, 0xFD, 0x1D, 0xCB,
399 0x56, 0x4D, 0xA8, 0x2B, 0x0F, 0x26, 0x9B, 0xC7,
400 0x0A, 0x74, 0xF8, 0x22, 0x04, 0x29, 0xBA, 0x1D,
401 0x8C, 0x34, 0x28, 0x86, 0x9A, 0x66, 0x3E, 0xD1,
402 0xE9, 0x54, 0x70, 0x5B, 0x02, 0x0C, 0xBB, 0x3E,
403 0x7B, 0xB6, 0xAC, 0x31, 0x96, 0x5B, 0x9E, 0xA4,
404 0xC7, 0x3E, 0x22, 0x7B, 0x17, 0xC5, 0xAF, 0x5A,
414 static const unsigned char pkbuf[33] = {
416 0xDF, 0xF1, 0xD7, 0x7F, 0x2A, 0x67, 0x1C, 0x5F,
417 0x36, 0x18, 0x37, 0x26, 0xDB, 0x23, 0x41, 0xBE,
418 0x58, 0xFE, 0xAE, 0x1D, 0xA2, 0xDE, 0xCE, 0xD8,
419 0x43, 0x24, 0x0F, 0x7B, 0x50, 0x2B, 0xA6, 0x59,
422 static const unsigned char msg[32] = {
423 0x24, 0x3F, 0x6A, 0x88, 0x85, 0xA3, 0x08, 0xD3,
424 0x13, 0x19, 0x8A, 0x2E, 0x03, 0x70, 0x73, 0x44,
425 0xA4, 0x09, 0x38, 0x22, 0x29, 0x9F, 0x31, 0xD0,
426 0x08, 0x2E, 0xFA, 0x98, 0xEC, 0x4E, 0x6C, 0x89,
429 static const unsigned char sig[64] = {
430 0x4A, 0x29, 0x8D, 0xAC, 0xAE, 0x57, 0x39, 0x5A,
431 0x15, 0xD0, 0x79, 0x5D, 0xDB, 0xFD, 0x1D, 0xCB,
432 0x56, 0x4D, 0xA8, 0x2B, 0x0F, 0x26, 0x9B, 0xC7,
433 0x0A, 0x74, 0xF8, 0x22, 0x04, 0x29, 0xBA, 0x1D,
434 0x1E, 0x51, 0xA2, 0x2C, 0xCE, 0xC3, 0x55, 0x99,
435 0xB8, 0xF2, 0x66, 0x91, 0x22, 0x81, 0xF8, 0x36,
436 0x5F, 0xFC, 0x2D, 0x03, 0x5A, 0x23, 0x04, 0x34,
437 0xA1, 0xA6, 0x4D, 0xC5, 0x9F, 0x70, 0x13, 0xFD,
447 static const unsigned char pkbuf[33] = {
449 0xDF, 0xF1, 0xD7, 0x7F, 0x2A, 0x67, 0x1C, 0x5F,
450 0x36, 0x18, 0x37, 0x26, 0xDB, 0x23, 0x41, 0xBE,
451 0x58, 0xFE, 0xAE, 0x1D, 0xA2, 0xDE, 0xCE, 0xD8,
452 0x43, 0x24, 0x0F, 0x7B, 0x50, 0x2B, 0xA6, 0x59,
455 static const unsigned char msg[32] = {
456 0x24, 0x3F, 0x6A, 0x88, 0x85, 0xA3, 0x08, 0xD3,
457 0x13, 0x19, 0x8A, 0x2E, 0x03, 0x70, 0x73, 0x44,
458 0xA4, 0x09, 0x38, 0x22, 0x29, 0x9F, 0x31, 0xD0,
459 0x08, 0x2E, 0xFA, 0x98, 0xEC, 0x4E, 0x6C, 0x89,
462 static const unsigned char sig[64] = {
463 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
464 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
465 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
466 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0x2F,
467 0x1E, 0x51, 0xA2, 0x2C, 0xCE, 0xC3, 0x55, 0x99,
468 0xB8, 0xF2, 0x66, 0x91, 0x22, 0x81, 0xF8, 0x36,
469 0x5F, 0xFC, 0x2D, 0x03, 0x5A, 0x23, 0x04, 0x34,
470 0xA1, 0xA6, 0x4D, 0xC5, 0x9F, 0x70, 0x13, 0xFD,
480 static const unsigned char pkbuf[33] = {
482 0xDF, 0xF1, 0xD7, 0x7F, 0x2A, 0x67, 0x1C, 0x5F,
483 0x36, 0x18, 0x37, 0x26, 0xDB, 0x23, 0x41, 0xBE,
484 0x58, 0xFE, 0xAE, 0x1D, 0xA2, 0xDE, 0xCE, 0xD8,
485 0x43, 0x24, 0x0F, 0x7B, 0x50, 0x2B, 0xA6, 0x59,
488 static const unsigned char msg[32] = {
489 0x24, 0x3F, 0x6A, 0x88, 0x85, 0xA3, 0x08, 0xD3,
490 0x13, 0x19, 0x8A, 0x2E, 0x03, 0x70, 0x73, 0x44,
491 0xA4, 0x09, 0x38, 0x22, 0x29, 0x9F, 0x31, 0xD0,
492 0x08, 0x2E, 0xFA, 0x98, 0xEC, 0x4E, 0x6C, 0x89,
495 static const unsigned char sig[64] = {
496 0x2A, 0x29, 0x8D, 0xAC, 0xAE, 0x57, 0x39, 0x5A,
497 0x15, 0xD0, 0x79, 0x5D, 0xDB, 0xFD, 0x1D, 0xCB,
498 0x56, 0x4D, 0xA8, 0x2B, 0x0F, 0x26, 0x9B, 0xC7,
499 0x0A, 0x74, 0xF8, 0x22, 0x04, 0x29, 0xBA, 0x1D,
500 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
501 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE,
502 0xBA, 0xAE, 0xDC, 0xE6, 0xAF, 0x48, 0xA0, 0x3B,
503 0xBF, 0xD2, 0x5E, 0x8C, 0xD0, 0x36, 0x41, 0x41,
514 for (i = 0; i < 32 *
count; i++) {
static void secp256k1_ecmult_gen(const secp256k1_ecmult_gen_context *ctx, secp256k1_gej *r, const secp256k1_scalar *a)
Multiply with the generator: R = a*G.
static void secp256k1_fe_normalize(secp256k1_fe *r)
Field element module.
static void secp256k1_ge_set_gej_var(secp256k1_ge *r, secp256k1_gej *a)
Set a group element equal to another which is given in jacobian coordinates.
static void secp256k1_scalar_get_b32(unsigned char *bin, const secp256k1_scalar *a)
Convert a scalar to a byte array.
void test_schnorr_end_to_end(void)
void run_schnorr_tests(void)
void test_schnorr_sign_verify(void)
void run_schnorr_compact_test(void)
static int secp256k1_schnorr_sig_verify(const secp256k1_ecmult_context *ctx, const unsigned char *sig64, secp256k1_ge *pubkey, const unsigned char *msg32)
static int secp256k1_schnorr_sig_sign(const secp256k1_context *ctx, unsigned char *sig64, const unsigned char *msg32, const secp256k1_scalar *privkey, secp256k1_ge *pubkey, secp256k1_nonce_function noncefp, const void *ndata)
SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_seckey_verify(const secp256k1_context *ctx, const unsigned char *seckey) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2)
Verify an ECDSA secret key.
SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_pubkey_parse(const secp256k1_context *ctx, secp256k1_pubkey *pubkey, const unsigned char *input, size_t inputlen) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3)
Parse a variable-length public key into the pubkey object.
SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_pubkey_create(const secp256k1_context *ctx, secp256k1_pubkey *pubkey, const unsigned char *seckey) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3)
Compute the public key for a secret key.
SECP256K1_API int secp256k1_schnorr_sign(const secp256k1_context *ctx, unsigned char *sig64, const unsigned char *msghash32, const unsigned char *seckey, secp256k1_nonce_function noncefp, const void *ndata) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3) SECP256K1_ARG_NONNULL(4)
Create a signature using a custom EC-Schnorr-SHA256 construction.
SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_schnorr_verify(const secp256k1_context *ctx, const unsigned char *sig64, const unsigned char *msghash32, const secp256k1_pubkey *pubkey) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3) SECP256K1_ARG_NONNULL(4)
Verify a signature created by secp256k1_schnorr_sign.
secp256k1_ecmult_gen_context ecmult_gen_ctx
secp256k1_ecmult_context ecmult_ctx
A group element of the secp256k1 curve, in affine coordinates.
A group element of the secp256k1 curve, in jacobian coordinates.
Opaque data structure that holds a parsed and valid public key.
A scalar modulo the group order of the secp256k1 curve.
static uint32_t secp256k1_testrand_int(uint32_t range)
Generate a pseudorandom number in the range [0..range-1].
static void secp256k1_testrand256_test(unsigned char *b32)
Generate a pseudorandom 32-byte array with long sequences of zero and one bits.
static uint32_t secp256k1_testrand_bits(int bits)
Generate a pseudorandom number in the range [0..2**bits-1].
void random_scalar_order_test(secp256k1_scalar *num)