xref: /freebsd/sys/contrib/libsodium/src/libsodium/crypto_stream/salsa20/xmm6/salsa20_xmm6.c (revision 3611ec604864a7d4dcc9a3ea898c80eb35eef8a0)
1 
2 #include <stdint.h>
3 
4 #include "utils.h"
5 
6 #include "../stream_salsa20.h"
7 #include "salsa20_xmm6.h"
8 
9 #ifdef HAVE_AMD64_ASM
10 
11 #ifdef __cplusplus
12 extern "C" {
13 #endif
14 extern int stream_salsa20_xmm6(unsigned char *c, unsigned long long clen,
15                                const unsigned char *n, const unsigned char *k);
16 
17 extern int stream_salsa20_xmm6_xor_ic(unsigned char *c, const unsigned char *m,
18                                       unsigned long long mlen,
19                                       const unsigned char *n,
20                                       uint64_t ic, const unsigned char *k);
21 #ifdef __cplusplus
22 }
23 #endif
24 
25 struct crypto_stream_salsa20_implementation
26     crypto_stream_salsa20_xmm6_implementation = {
27         SODIUM_C99(.stream =) stream_salsa20_xmm6,
28         SODIUM_C99(.stream_xor_ic =) stream_salsa20_xmm6_xor_ic,
29     };
30 
31 #endif
32