libsodium: Needed for Dnscrypto-proxy Release 1.3.0
[tomato.git] / release / src / router / libsodium / src / libsodium / crypto_stream / aes256estream / hongjun / ecrypt-sync.h
blob6dafedbe399e1984dec6b8536f420c29bfc8c336
2 #ifndef __ECRYPT_SYNC__
3 #define __ECRYPT_SYNC__
5 #include <stdint.h>
7 typedef uint8_t u8;
8 typedef uint32_t u32;
10 #define Nr 14
11 #define Nk 8
12 #define Nb 4
14 #pragma pack(push, 1)
15 __attribute__((aligned(64))) typedef struct ECRYPT_ctx
17 u32 round_key[Nr+1][4];
18 u32 counter[4];
19 u32 first_round_output_x0;
20 u32 second_round_output[4];
21 } ECRYPT_ctx;
22 #pragma pack(pop)
24 #define ECRYPT_encrypt_bytes(ctx, plaintext, ciphertext, msglen) \
25 ECRYPT_process_bytes(0, ctx, plaintext, ciphertext, msglen)
27 #endif