test.c (view raw)
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 27 28 29 30 31 |
#include "tinycrypt/ed25519.h"
#include <stdint.h>
static uint8_t SK4[] = {
0x6d, 0xf9, 0x34, 0x0c, 0x13, 0x8c, 0xc1, 0x88, 0xb5, 0xfe, 0x44,
0x64, 0xeb, 0xaa, 0x3f, 0x7f, 0xc2, 0x06, 0xa2, 0xd5, 0x5c, 0x34,
0x34, 0x70, 0x7e, 0x74, 0xc9, 0xfc, 0x04, 0xe2, 0x0e, 0xbb,
};
static uint8_t PK4[] = {
0xc0, 0xda, 0xc1, 0x02, 0xc4, 0x53, 0x31, 0x86, 0xe2, 0x5d, 0xc4,
0x31, 0x28, 0x47, 0x23, 0x53, 0xea, 0xab, 0xdb, 0x87, 0x8b, 0x15,
0x2a, 0xeb, 0x8e, 0x00, 0x1f, 0x92, 0xd9, 0x02, 0x33, 0xa7,
};
static uint8_t MSG4[] = {
0x5f,
0x4c,
0x89,
0x89,
};
int
main (int argc, char **argv)
{
uint8_t signature[64];
uint8_t working_buf[sizeof (MSG4) + 64];
for (unsigned int i = 0; i < 10000; ++i)
{
tct_ed25519_sign (MSG4, sizeof (MSG4), SK4, PK4, working_buf, signature);
}
return 0;
}
|