mirror of
https://github.com/ntop/n2n.git
synced 2024-09-19 16:41:11 +02:00
added SSE support
This commit is contained in:
parent
a409d611af
commit
e28ec42ac2
15
speck.h
15
speck.h
|
@ -1,9 +1,20 @@
|
|||
|
||||
#define u64 uint64_t
|
||||
|
||||
#ifdef __SSE4_2__
|
||||
#include <immintrin.h>
|
||||
#define u128 __m128i
|
||||
typedef struct {
|
||||
u128 rk[34];
|
||||
u64 key[34];
|
||||
} speck_context_t;
|
||||
#else
|
||||
typedef u64 speck_context_t [34];
|
||||
#endif
|
||||
|
||||
int speck_ctr (unsigned char *out, const unsigned char *in,
|
||||
unsigned long long inlen,
|
||||
const unsigned char *n,
|
||||
u64 rk[]);
|
||||
speck_context_t ctx);
|
||||
|
||||
int speck_expand_key (const unsigned char *k, u64 rk[]);
|
||||
int speck_expand_key (const unsigned char *k, speck_context_t ctx);
|
||||
|
|
Loading…
Reference in New Issue
Block a user