summaryrefslogtreecommitdiffstats
path: root/libssh/wrapper.c
diff options
context:
space:
mode:
authorAris Adamantiadis <aris@0xbadc0de.be>2010-02-09 22:29:43 +0100
committerAris Adamantiadis <aris@0xbadc0de.be>2010-02-09 22:43:27 +0100
commit028516ba6a26b2f8e885e7e2cd6b27854b8ba2a5 (patch)
tree7964f11a308be8be1d18c4c212e3cc600f2b0eee /libssh/wrapper.c
parent344b27ac6ca948af889ac2858ca986dd4855af1d (diff)
aes192-ctr and aes256-ctr working on libcrypto
Diffstat (limited to 'libssh/wrapper.c')
-rw-r--r--libssh/wrapper.c25
1 files changed, 24 insertions, 1 deletions
diff --git a/libssh/wrapper.c b/libssh/wrapper.c
index b7de1532..bc0b6888 100644
--- a/libssh/wrapper.c
+++ b/libssh/wrapper.c
@@ -572,7 +572,8 @@ static void aes_decrypt(struct crypto_struct *cipher, void *in, void *out,
}
/** @internal
- * @brief encrypts/decrypts data with stream cipher AES128_ctr
+ * @brief encrypts/decrypts data with stream cipher AES_ctr128. 128 bits is actually
+ * the size of the CTR counter and incidentally the blocksize, but not the keysize.
* @param len[in] must be a multiple of AES128 block size.
*/
static void aes_ctr128_encrypt(struct crypto_struct *cipher, void *in, void *out,
@@ -690,6 +691,28 @@ static struct crypto_struct ssh_ciphertab[] = {
aes_ctr128_encrypt
},
{
+ "aes192-ctr",
+ 16,
+ sizeof(AES_KEY),
+ NULL,
+ 192,
+ aes_set_encrypt_key,
+ aes_set_encrypt_key,
+ aes_ctr128_encrypt,
+ aes_ctr128_encrypt
+ },
+ {
+ "aes256-ctr",
+ 16,
+ sizeof(AES_KEY),
+ NULL,
+ 256,
+ aes_set_encrypt_key,
+ aes_set_encrypt_key,
+ aes_ctr128_encrypt,
+ aes_ctr128_encrypt
+ },
+ {
"aes128-cbc",
16,
sizeof(AES_KEY),