botan: Support of AES-CFB encryption

This commit is contained in:
Andreas Steffen
2021-12-06 13:28:31 +01:00
parent 54d7e39d40
commit 2d1a1cc907
2 changed files with 25 additions and 0 deletions
@@ -185,6 +185,26 @@ botan_crypter_t *botan_crypter_create(encryption_algorithm_t algo,
return NULL;
}
break;
case ENCR_AES_CFB:
switch (key_size)
{
case 16:
/* AES 128 */
this->cipher_name = "AES-128/CFB";
break;
case 24:
/* AES-192 */
this->cipher_name = "AES-192/CFB";
break;
case 32:
/* AES-256 */
this->cipher_name = "AES-256/CFB";
break;
default:
free(this);
return NULL;
}
break;
default:
free(this);
return NULL;
@@ -112,6 +112,11 @@ METHOD(plugin_t, get_features, int,
PLUGIN_PROVIDE(CRYPTER, ENCR_AES_CBC, 24),
PLUGIN_PROVIDE(CRYPTER, ENCR_AES_CBC, 32),
#endif
#ifdef BOTAN_HAS_MODE_CFB
PLUGIN_PROVIDE(CRYPTER, ENCR_AES_CFB, 16),
PLUGIN_PROVIDE(CRYPTER, ENCR_AES_CFB, 24),
PLUGIN_PROVIDE(CRYPTER, ENCR_AES_CFB, 32),
#endif
#endif
#endif