exit(1);
}
-static char data_buf[] = {0x01,0x02,0x03,0x04,0x05,0x06,0x07};
-
int main(int argc, char *argv[])
{
private_key_t *private;
char buf[8096], *pos = buf;
key_type_t type = KEY_ANY;
signature_scheme_t scheme = SIGN_UNKNOWN;
- chunk_t keydata, *sigs, data = chunk_from_buf(data_buf);
+ chunk_t keydata, *sigs, data;
if (argc < 4)
{
{
switch (private->get_keysize(private))
{
- case 32:
+ case 256:
scheme = SIGN_ECDSA_256;
break;
- case 48:
+ case 384:
scheme = SIGN_ECDSA_384;
break;
- case 66:
+ case 521:
scheme = SIGN_ECDSA_521;
break;
default:
printf("%d bit ECDSA private key size not supported",
- private->get_keysize(private) * 8);
+ private->get_keysize(private));
exit(1);
}
}
- printf("%4d bit %N: ", private->get_keysize(private)*8,
+ printf("%4d bit %N: ", private->get_keysize(private),
key_type_names, type);
sigs = malloc(sizeof(chunk_t) * rounds);
+ data = chunk_from_chars(0x01,0x02,0x03,0x04,0x05,0x06,0x07);
start_timing(&timing);
for (round = 0; round < rounds; round++)
{