mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-11-29 01:03:57 +03:00
libcrypto: Do not use magic numbers for AES block size
Signed-off-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
committed by
Andreas Schneider
parent
101df98e54
commit
777786d76c
@@ -666,7 +666,7 @@ static struct ssh_cipher_struct ssh_ciphertab[] = {
|
|||||||
#ifdef HAVE_OPENSSL_EVP_AES_CTR
|
#ifdef HAVE_OPENSSL_EVP_AES_CTR
|
||||||
{
|
{
|
||||||
.name = "aes128-ctr",
|
.name = "aes128-ctr",
|
||||||
.blocksize = 16,
|
.blocksize = AES_BLOCK_SIZE,
|
||||||
.ciphertype = SSH_AES128_CTR,
|
.ciphertype = SSH_AES128_CTR,
|
||||||
.keysize = 128,
|
.keysize = 128,
|
||||||
.set_encrypt_key = evp_cipher_set_encrypt_key,
|
.set_encrypt_key = evp_cipher_set_encrypt_key,
|
||||||
@@ -677,7 +677,7 @@ static struct ssh_cipher_struct ssh_ciphertab[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.name = "aes192-ctr",
|
.name = "aes192-ctr",
|
||||||
.blocksize = 16,
|
.blocksize = AES_BLOCK_SIZE,
|
||||||
.ciphertype = SSH_AES192_CTR,
|
.ciphertype = SSH_AES192_CTR,
|
||||||
.keysize = 192,
|
.keysize = 192,
|
||||||
.set_encrypt_key = evp_cipher_set_encrypt_key,
|
.set_encrypt_key = evp_cipher_set_encrypt_key,
|
||||||
@@ -688,7 +688,7 @@ static struct ssh_cipher_struct ssh_ciphertab[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.name = "aes256-ctr",
|
.name = "aes256-ctr",
|
||||||
.blocksize = 16,
|
.blocksize = AES_BLOCK_SIZE,
|
||||||
.ciphertype = SSH_AES256_CTR,
|
.ciphertype = SSH_AES256_CTR,
|
||||||
.keysize = 256,
|
.keysize = 256,
|
||||||
.set_encrypt_key = evp_cipher_set_encrypt_key,
|
.set_encrypt_key = evp_cipher_set_encrypt_key,
|
||||||
@@ -700,7 +700,7 @@ static struct ssh_cipher_struct ssh_ciphertab[] = {
|
|||||||
#else /* HAVE_OPENSSL_EVP_AES_CTR */
|
#else /* HAVE_OPENSSL_EVP_AES_CTR */
|
||||||
{
|
{
|
||||||
.name = "aes128-ctr",
|
.name = "aes128-ctr",
|
||||||
.blocksize = 16,
|
.blocksize = AES_BLOCK_SIZE,
|
||||||
.ciphertype = SSH_AES128_CTR,
|
.ciphertype = SSH_AES128_CTR,
|
||||||
.keysize = 128,
|
.keysize = 128,
|
||||||
.set_encrypt_key = aes_ctr_set_key,
|
.set_encrypt_key = aes_ctr_set_key,
|
||||||
@@ -711,7 +711,7 @@ static struct ssh_cipher_struct ssh_ciphertab[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.name = "aes192-ctr",
|
.name = "aes192-ctr",
|
||||||
.blocksize = 16,
|
.blocksize = AES_BLOCK_SIZE,
|
||||||
.ciphertype = SSH_AES192_CTR,
|
.ciphertype = SSH_AES192_CTR,
|
||||||
.keysize = 192,
|
.keysize = 192,
|
||||||
.set_encrypt_key = aes_ctr_set_key,
|
.set_encrypt_key = aes_ctr_set_key,
|
||||||
@@ -722,7 +722,7 @@ static struct ssh_cipher_struct ssh_ciphertab[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.name = "aes256-ctr",
|
.name = "aes256-ctr",
|
||||||
.blocksize = 16,
|
.blocksize = AES_BLOCK_SIZE,
|
||||||
.ciphertype = SSH_AES256_CTR,
|
.ciphertype = SSH_AES256_CTR,
|
||||||
.keysize = 256,
|
.keysize = 256,
|
||||||
.set_encrypt_key = aes_ctr_set_key,
|
.set_encrypt_key = aes_ctr_set_key,
|
||||||
@@ -735,7 +735,7 @@ static struct ssh_cipher_struct ssh_ciphertab[] = {
|
|||||||
#endif /* BROKEN_AES_CTR */
|
#endif /* BROKEN_AES_CTR */
|
||||||
{
|
{
|
||||||
.name = "aes128-cbc",
|
.name = "aes128-cbc",
|
||||||
.blocksize = 16,
|
.blocksize = AES_BLOCK_SIZE,
|
||||||
.ciphertype = SSH_AES128_CBC,
|
.ciphertype = SSH_AES128_CBC,
|
||||||
.keysize = 128,
|
.keysize = 128,
|
||||||
.set_encrypt_key = evp_cipher_set_encrypt_key,
|
.set_encrypt_key = evp_cipher_set_encrypt_key,
|
||||||
@@ -746,7 +746,7 @@ static struct ssh_cipher_struct ssh_ciphertab[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.name = "aes192-cbc",
|
.name = "aes192-cbc",
|
||||||
.blocksize = 16,
|
.blocksize = AES_BLOCK_SIZE,
|
||||||
.ciphertype = SSH_AES192_CBC,
|
.ciphertype = SSH_AES192_CBC,
|
||||||
.keysize = 192,
|
.keysize = 192,
|
||||||
.set_encrypt_key = evp_cipher_set_encrypt_key,
|
.set_encrypt_key = evp_cipher_set_encrypt_key,
|
||||||
@@ -757,7 +757,7 @@ static struct ssh_cipher_struct ssh_ciphertab[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.name = "aes256-cbc",
|
.name = "aes256-cbc",
|
||||||
.blocksize = 16,
|
.blocksize = AES_BLOCK_SIZE,
|
||||||
.ciphertype = SSH_AES256_CBC,
|
.ciphertype = SSH_AES256_CBC,
|
||||||
.keysize = 256,
|
.keysize = 256,
|
||||||
.set_encrypt_key = evp_cipher_set_encrypt_key,
|
.set_encrypt_key = evp_cipher_set_encrypt_key,
|
||||||
|
|||||||
Reference in New Issue
Block a user