aes192-ctr and aes256-ctr working on libcrypto

This commit is contained in:
Aris Adamantiadis
2010-02-09 22:29:43 +01:00
parent fdfd12716e
commit c1711243f0
2 changed files with 25 additions and 2 deletions

View File

@@ -53,7 +53,7 @@
#define BLOWFISH "" #define BLOWFISH ""
#endif #endif
#ifdef HAVE_OPENSSL_AES_H #ifdef HAVE_OPENSSL_AES_H
#define AES "aes128-ctr,aes256-cbc,aes192-cbc,aes128-cbc," #define AES "aes256-ctr,aes192-ctr,aes128-ctr,aes256-cbc,aes192-cbc,aes128-cbc,"
#else #else
#define AES "" #define AES ""
#endif #endif

View File

@@ -615,7 +615,8 @@ static void aes_decrypt(struct crypto_struct *cipher, void *in, void *out,
} }
/** @internal /** @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. * @param len[in] must be a multiple of AES128 block size.
*/ */
static void aes_ctr128_encrypt(struct crypto_struct *cipher, void *in, void *out, static void aes_ctr128_encrypt(struct crypto_struct *cipher, void *in, void *out,
@@ -732,6 +733,28 @@ static struct crypto_struct ssh_ciphertab[] = {
aes_ctr128_encrypt, aes_ctr128_encrypt,
aes_ctr128_encrypt 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", "aes128-cbc",
16, 16,