summaryrefslogtreecommitdiffstats
path: root/thirdparties/win32/include/srtp/aes_cbc.h
diff options
context:
space:
mode:
Diffstat (limited to 'thirdparties/win32/include/srtp/aes_cbc.h')
-rw-r--r--thirdparties/win32/include/srtp/aes_cbc.h52
1 files changed, 52 insertions, 0 deletions
diff --git a/thirdparties/win32/include/srtp/aes_cbc.h b/thirdparties/win32/include/srtp/aes_cbc.h
new file mode 100644
index 0000000..f92591d
--- /dev/null
+++ b/thirdparties/win32/include/srtp/aes_cbc.h
@@ -0,0 +1,52 @@
+/*
+ * aes_cbc.h
+ *
+ * Header for AES Cipher Blobk Chaining Mode.
+ *
+ * David A. McGrew
+ * Cisco Systems, Inc.
+ *
+ */
+
+#ifndef AES_CBC_H
+#define AES_CBC_H
+
+#include "aes.h"
+#include "cipher.h"
+
+typedef struct {
+ v128_t state; /* cipher chaining state */
+ v128_t previous; /* previous ciphertext block */
+ uint8_t key[32];
+ int key_len;
+ aes_expanded_key_t expanded_key; /* the cipher key */
+} aes_cbc_ctx_t;
+
+err_status_t
+aes_cbc_set_key(aes_cbc_ctx_t *c,
+ const unsigned char *key);
+
+err_status_t
+aes_cbc_encrypt(aes_cbc_ctx_t *c,
+ unsigned char *buf,
+ unsigned int *bytes_in_data);
+
+err_status_t
+aes_cbc_context_init(aes_cbc_ctx_t *c, const uint8_t *key,
+ int key_len);
+
+err_status_t
+aes_cbc_set_iv(aes_cbc_ctx_t *c, void *iv, int direction);
+
+err_status_t
+aes_cbc_nist_encrypt(aes_cbc_ctx_t *c,
+ unsigned char *data,
+ unsigned int *bytes_in_data);
+
+err_status_t
+aes_cbc_nist_decrypt(aes_cbc_ctx_t *c,
+ unsigned char *data,
+ unsigned int *bytes_in_data);
+
+#endif /* AES_CBC_H */
+
OpenPOWER on IntegriCloud