You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
659 B

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