2 Timing code for optimized implementation of Haraka.
14 static void phex(uint8_t* str)
19 for (i = 0; i < len; ++i)
20 printf("%lx, ", str[i]);
24 alignas(64) uint8_t a[64] = {0x6b, 0x2e, 0xe9, 0x73, 0xc1, 0x40, 0x3d, 0x93, 0xbe, 0x9f, 0x7e, 0x17, 0xe2, 0x96, 0x11, 0x2a};
25 alignas(64) uint8_t b[64] = {0x6b, 0x2e, 0xe9, 0x73, 0xc1, 0x40, 0x3d, 0x93, 0xbe, 0x9f, 0x7e, 0x17, 0xe2, 0x96, 0x11, 0x2a};
26 alignas(64) uint8_t c[64] = {0x6b, 0x2e, 0xe9, 0x73, 0xc1, 0x40, 0x3d, 0x93, 0xbe, 0x9f, 0x7e, 0x17, 0xe2, 0x96, 0x11, 0x2a};
27 alignas(64) uint8_t key[64] = {0x6b, 0x2e, 0xe9, 0x73, 0xc1, 0x40, 0x3d, 0x93, 0xbe, 0x9f, 0x7e, 0x17, 0xe2, 0x96, 0x11, 0x2a};
30 __m512i i = LOAD (key);
32 __m128i k = _mm_loadu_si128((__m128i *) key);
33 __m128i test = _mm_loadu_si128((__m128i *) b);
34 __m128i m =_mm_aesenc_si128 (test, k);
35 _mm_storeu_si128((__m128i *) a,m);
36 aes((_512_state*)c,(_512_key*)key);