summaryrefslogtreecommitdiff
path: root/lib/lib3.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/lib3.h')
-rw-r--r--lib/lib3.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/lib3.h b/lib/lib3.h
index 3078cfe..8adbbb9 100644
--- a/lib/lib3.h
+++ b/lib/lib3.h
@@ -8,9 +8,26 @@
#define BLOCKSIZE 16
+#define MT_19937_N 624
+// needed for initialization
+#define MT_19937_F 0x6C078965
+// word size
+#define MT_19937_W 32
+#define MT_19937_UPPER_MASK 0x80000000
+#define MT_19937_LOWER_MASK 0x7fffffff
+
+struct mt_19937_state {
+ unsigned int mt[MT_19937_N];
+ unsigned int index;
+};
+
+struct mt_19937_state __global_mt_19937;
+
char *challenge17_encrypt(int *length);
int cbc_padding_oracle(char *encrypted, int length);
int aes_ctr(char *in, int length_in, char *out, char *string_key, char *nonce);
+void mt_19937_seed(unsigned int seed);
+int mt_19937();
#endif