summaryrefslogtreecommitdiffhomepage
path: root/session.h
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2008-09-29 13:53:31 +0000
committerMatt Johnston <matt@ucc.asn.au>2008-09-29 13:53:31 +0000
commit511f6555c98634d8d962f65e8d5ff3ba690e0bf9 (patch)
tree83dc9f384e04071da685d43688e54dc1bb5d874e /session.h
parent049fcf1ac572e1a13dc1281c26bbf3512c533fb7 (diff)
- Add Counter Mode support
--HG-- extra : convert_revision : 5225162bdf32d70b58b6d3ae375a290326c59f3a
Diffstat (limited to 'session.h')
-rw-r--r--session.h16
1 files changed, 14 insertions, 2 deletions
diff --git a/session.h b/session.h
index 96f4363..09c7e3a 100644
--- a/session.h
+++ b/session.h
@@ -64,6 +64,8 @@ struct key_context {
const struct dropbear_cipher *recv_algo_crypt; /* NULL for none */
const struct dropbear_cipher *trans_algo_crypt; /* NULL for none */
+ const struct dropbear_cipher_mode *recv_crypt_mode;
+ const struct dropbear_cipher_mode *trans_crypt_mode;
const struct dropbear_hash *recv_algo_mac; /* NULL for none */
const struct dropbear_hash *trans_algo_mac; /* NULL for none */
char algo_kex;
@@ -79,8 +81,18 @@ struct key_context {
#endif
/* actual keys */
- symmetric_CBC recv_symmetric_struct;
- symmetric_CBC trans_symmetric_struct;
+ union {
+ symmetric_CBC cbc;
+#ifdef DROPBEAR_ENABLE_CTR_MODE
+ symmetric_CTR ctr;
+#endif
+ } recv_cipher_state;
+ union {
+ symmetric_CBC cbc;
+#ifdef DROPBEAR_ENABLE_CTR_MODE
+ symmetric_CTR ctr;
+#endif
+ } trans_cipher_state;
unsigned char recvmackey[MAX_MAC_KEY];
unsigned char transmackey[MAX_MAC_KEY];