quickjs-tart

quickjs-based runtime for wallet-core logic
Log | Files | Refs | README | LICENSE

scalarmult2.c (641B)


      1 
      2 #define TEST_NAME "scalarmult2"
      3 #include "cmptest.h"
      4 
      5 static unsigned char bobsk[32] = { 0x5d, 0xab, 0x08, 0x7e, 0x62, 0x4a, 0x8a,
      6                                    0x4b, 0x79, 0xe1, 0x7f, 0x8b, 0x83, 0x80,
      7                                    0x0e, 0xe6, 0x6f, 0x3b, 0xb1, 0x29, 0x26,
      8                                    0x18, 0xb6, 0xfd, 0x1c, 0x2f, 0x8b, 0x27,
      9                                    0xff, 0x88, 0xe0, 0xeb };
     10 
     11 int
     12 main(void)
     13 {
     14     unsigned char bobpk[32];
     15     char          hex[65];
     16 
     17     crypto_scalarmult_base(bobpk, bobsk);
     18     sodium_bin2hex(hex, sizeof hex, bobpk, sizeof bobpk);
     19     printf("%s\n", hex);
     20 
     21     return 0;
     22 }