blob: 355063a78ce6e56c41f39dd65059e959237203df (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
#include "defs.h"
#include <stdio.h>
#include <assert.h>
#include "testv.h"
/* check verify, pk can't be NULL */
void testverify(const test_t *tests, int ntest)
{
int j;
unsigned char bpk[57];
unsigned char bsign[114];
for (j = 0; j < ntest; j++)
{
hex2bin(bpk, tests[j].pk);
hex2bin(bsign, tests[j].sign);
assert(crypto_sign_ed448_open_detached(tests[j].msg, tests[j].mlen, bsign, bpk) == 0);
printf("test verify %d good\n", j);
}
}
int main()
{
testverify(tests, NTESTS);
return 0;
}
|