summaryrefslogtreecommitdiff
path: root/src/libsodium/crypto_stream/aes256estream/hongjun/ecrypt-sync.h
diff options
context:
space:
mode:
authorMicah Anderson <micah@riseup.net>2014-08-11 13:49:21 -0400
committerMicah Anderson <micah@riseup.net>2014-08-11 13:49:21 -0400
commit2e59f9740a29439df7c7a56cf0ae83dec3081d31 (patch)
treed5e7c4e74c9a0f1ea999327d2e68b1dd27be00e0 /src/libsodium/crypto_stream/aes256estream/hongjun/ecrypt-sync.h
initial import of debian version from mentors0.6.1
Diffstat (limited to 'src/libsodium/crypto_stream/aes256estream/hongjun/ecrypt-sync.h')
-rw-r--r--src/libsodium/crypto_stream/aes256estream/hongjun/ecrypt-sync.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/libsodium/crypto_stream/aes256estream/hongjun/ecrypt-sync.h b/src/libsodium/crypto_stream/aes256estream/hongjun/ecrypt-sync.h
new file mode 100644
index 0000000..23f2aee
--- /dev/null
+++ b/src/libsodium/crypto_stream/aes256estream/hongjun/ecrypt-sync.h
@@ -0,0 +1,27 @@
+
+#ifndef __ECRYPT_SYNC__
+#define __ECRYPT_SYNC__
+
+#include <stdint.h>
+
+typedef uint8_t u8;
+typedef uint32_t u32;
+
+#define Nr 14
+#define Nk 8
+#define Nb 4
+
+#pragma pack(push, 1)
+typedef struct ECRYPT_ctx
+{
+ u32 round_key[Nr+1][4];
+ u32 counter[4];
+ u32 first_round_output_x0;
+ u32 second_round_output[4];
+} ECRYPT_ctx;
+#pragma pack(pop)
+
+#define ECRYPT_encrypt_bytes(ctx, plaintext, ciphertext, msglen) \
+ ECRYPT_process_bytes(0, ctx, plaintext, ciphertext, msglen)
+
+#endif