aboutsummaryrefslogtreecommitdiff
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:29:43 +0100
commitc1711243f02e70303849e75b4b212f5b9e6feef4 (patch)
tree6efe300e64d944c8f8f8e7e8d0d79f032c3c4eba /libssh/wrapper.c
parentfdfd12716e14d575a00bb5ce4289ac7984a227ba (diff)
downloadlibssh-c1711243f02e70303849e75b4b212f5b9e6feef4.tar.gz
libssh-c1711243f02e70303849e75b4b212f5b9e6feef4.tar.xz
libssh-c1711243f02e70303849e75b4b212f5b9e6feef4.zip
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 991a7c21..a42c2367 100644
--- a/libssh/wrapper.c
+++ b/libssh/wrapper.c
@@ -615,7 +615,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,
@@ -733,6 +734,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),