libsodium: Needed for Dnscrypto-proxy Release 1.3.0
[tomato.git] / release / src / router / libsodium / test / default / scalarmult2.c
blob93a37d07ffd5aa8cf251bed4e11e734c0843e517
1 #include <stdio.h>
3 #define TEST_NAME "scalarmult2"
4 #include "cmptest.h"
6 unsigned char bobsk[32] = {
7 0x5d,0xab,0x08,0x7e,0x62,0x4a,0x8a,0x4b
8 ,0x79,0xe1,0x7f,0x8b,0x83,0x80,0x0e,0xe6
9 ,0x6f,0x3b,0xb1,0x29,0x26,0x18,0xb6,0xfd
10 ,0x1c,0x2f,0x8b,0x27,0xff,0x88,0xe0,0xeb
11 } ;
13 unsigned char bobpk[32];
15 int main(void)
17 int i;
18 crypto_scalarmult_curve25519_base(bobpk,bobsk);
19 for (i = 0;i < 32;++i) {
20 if (i > 0) printf(","); else printf(" ");
21 printf("0x%02x",(unsigned int) bobpk[i]);
22 if (i % 8 == 7) printf("\n");
24 return 0;