libsodium 1.0.8
[tomato.git] / release / src / router / libsodium / test / default / scalarmult2.c
blob43bd6ab4b3442ee8079d283d212eae2993f20194
2 #define TEST_NAME "scalarmult2"
3 #include "cmptest.h"
5 static unsigned char bobsk[32]
6 = { 0x5d, 0xab, 0x08, 0x7e, 0x62, 0x4a, 0x8a, 0x4b, 0x79, 0xe1, 0x7f,
7 0x8b, 0x83, 0x80, 0x0e, 0xe6, 0x6f, 0x3b, 0xb1, 0x29, 0x26, 0x18,
8 0xb6, 0xfd, 0x1c, 0x2f, 0x8b, 0x27, 0xff, 0x88, 0xe0, 0xeb };
10 static unsigned char bobpk[32];
12 int main(void)
14 int i;
16 crypto_scalarmult_base(bobpk, bobsk);
18 for (i = 0; i < 32; ++i) {
19 if (i > 0) {
20 printf(",");
21 } else {
22 printf(" ");
24 printf("0x%02x", (unsigned int)bobpk[i]);
25 if (i % 8 == 7) {
26 printf("\n");
29 return 0;