1
0

scalarmult2.c 528 B

1234567891011121314151617181920212223
  1. #include <stdio.h>
  2. #include "crypto_scalarmult_curve25519.h"
  3. unsigned char bobsk[32] = {
  4. 0x5d,0xab,0x08,0x7e,0x62,0x4a,0x8a,0x4b
  5. ,0x79,0xe1,0x7f,0x8b,0x83,0x80,0x0e,0xe6
  6. ,0x6f,0x3b,0xb1,0x29,0x26,0x18,0xb6,0xfd
  7. ,0x1c,0x2f,0x8b,0x27,0xff,0x88,0xe0,0xeb
  8. } ;
  9. unsigned char bobpk[32];
  10. int main()
  11. {
  12. int i;
  13. crypto_scalarmult_curve25519_base(bobpk,bobsk);
  14. for (i = 0;i < 32;++i) {
  15. if (i > 0) printf(","); else printf(" ");
  16. printf("0x%02x",(unsigned int) bobpk[i]);
  17. if (i % 8 == 7) printf("\n");
  18. }
  19. return 0;
  20. }