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.

34 lines
895 B

  1. #define TEST_NAME "core4"
  2. #include "cmptest.h"
  3. unsigned char k[32] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,
  4. 12, 13, 14, 15, 16, 201, 202, 203, 204, 205, 206,
  5. 207, 208, 209, 210, 211, 212, 213, 214, 215, 216 };
  6. unsigned char in[16] = { 101, 102, 103, 104, 105, 106, 107, 108,
  7. 109, 110, 111, 112, 113, 114, 115, 116 };
  8. unsigned char c[16] = { 101, 120, 112, 97, 110, 100, 32, 51,
  9. 50, 45, 98, 121, 116, 101, 32, 107 };
  10. unsigned char out[64];
  11. int main(void)
  12. {
  13. int i;
  14. crypto_core_salsa20(out, in, k, c);
  15. for (i = 0; i < 64; ++i) {
  16. if (i > 0) {
  17. printf(",");
  18. } else {
  19. printf(" ");
  20. }
  21. printf("%3d", (unsigned int)out[i]);
  22. if (i % 8 == 7) {
  23. printf("\n");
  24. }
  25. }
  26. return 0;
  27. }