2013-01-20 18:41:17 -05:00
|
|
|
|
2013-01-20 18:55:10 -05:00
|
|
|
#define TEST_NAME "core4"
|
|
|
|
#include "cmptest.h"
|
|
|
|
|
2017-02-23 05:19:53 -05:00
|
|
|
static unsigned char k[32] = { 1, 2, 3, 4, 5, 6, 7, 8,
|
|
|
|
9, 10, 11, 12, 13, 14, 15, 16,
|
|
|
|
201, 202, 203, 204, 205, 206, 207, 208,
|
|
|
|
209, 210, 211, 212, 213, 214, 215, 216 };
|
2013-01-20 18:41:17 -05:00
|
|
|
|
2017-02-23 05:19:53 -05:00
|
|
|
static unsigned char in[16] = { 101, 102, 103, 104, 105, 106, 107, 108,
|
|
|
|
109, 110, 111, 112, 113, 114, 115, 116 };
|
2013-01-20 18:41:17 -05:00
|
|
|
|
2017-02-23 05:19:53 -05:00
|
|
|
static unsigned char c[16] = { 101, 120, 112, 97, 110, 100, 32, 51,
|
|
|
|
50, 45, 98, 121, 116, 101, 32, 107 };
|
2013-01-20 18:41:17 -05:00
|
|
|
|
2015-11-23 10:07:13 -05:00
|
|
|
static unsigned char out[64];
|
2013-01-20 18:41:17 -05:00
|
|
|
|
2017-02-23 05:19:53 -05:00
|
|
|
int
|
|
|
|
main(void)
|
2013-01-20 18:41:17 -05:00
|
|
|
{
|
2014-09-14 13:34:16 -04:00
|
|
|
int i;
|
|
|
|
|
2014-09-14 14:32:55 -04:00
|
|
|
crypto_core_salsa20(out, in, k, c);
|
|
|
|
for (i = 0; i < 64; ++i) {
|
2014-09-14 13:34:16 -04:00
|
|
|
if (i > 0) {
|
|
|
|
printf(",");
|
|
|
|
} else {
|
|
|
|
printf(" ");
|
|
|
|
}
|
2017-12-01 09:24:48 -05:00
|
|
|
printf("%3u", (unsigned int) out[i]);
|
2014-09-14 13:34:16 -04:00
|
|
|
if (i % 8 == 7) {
|
|
|
|
printf("\n");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return 0;
|
2013-01-20 18:41:17 -05:00
|
|
|
}
|