gcrypt: Added AES_ECB support

This commit is contained in:
Andreas Steffen authored and Tobias Brunner committed 2019-11-28 17:03:09 +01:00
1 parent a46e436e29
commit b7e840af5c
2 files changed
+6 -1

No files matched your search

@@ -198,7 +198,9 @@ gcrypt_crypter_t *gcrypt_crypter_create(encryption_algorithm_t algo,
gcrypt_alg = GCRY_CIPHER_BLOWFISH;
break;
case ENCR_AES_CTR:
mode = GCRY_CIPHER_MODE_CTR;
case ENCR_AES_ECB:
mode = (algo == ENCR_AES_CTR) ? GCRY_CIPHER_MODE_CTR :
GCRY_CIPHER_MODE_ECB;
/* fall */
case ENCR_AES_CBC:
switch (key_size)
@@ -70,6 +70,9 @@ METHOD(plugin_t, get_features, int,
PLUGIN_PROVIDE(CRYPTER, ENCR_AES_CBC, 16),
PLUGIN_PROVIDE(CRYPTER, ENCR_AES_CBC, 24),
PLUGIN_PROVIDE(CRYPTER, ENCR_AES_CBC, 32),
PLUGIN_PROVIDE(CRYPTER, ENCR_AES_ECB, 16),
PLUGIN_PROVIDE(CRYPTER, ENCR_AES_ECB, 24),
PLUGIN_PROVIDE(CRYPTER, ENCR_AES_ECB, 32),
/* gcrypt only supports 128 bit blowfish */
PLUGIN_PROVIDE(CRYPTER, ENCR_BLOWFISH, 16),
#ifdef HAVE_GCRY_CIPHER_CAMELLIA