Register some less common AF_ALG ciphers (cast5, serpent, twofish, blowfish)

This commit is contained in:
Martin Willi
2010-12-20 09:52:02 +01:00
parent 533151692f
commit d214ebdf82
2 changed files with 18 additions and 0 deletions
@@ -79,6 +79,16 @@ static size_t lookup_alg(encryption_algorithm_t algo, char **name,
{ENCR_CAMELLIA_CTR, "rfc3686(ctr(camellia))", 1, 16, 20, 8, },
{ENCR_CAMELLIA_CTR, "rfc3686(ctr(camellia))", 1, 24, 28, 8, },
{ENCR_CAMELLIA_CTR, "rfc3686(ctr(camellia))", 1, 32, 36, 8, },
{ENCR_CAST, "cbc(cast5)", 8, 16, 16, 8, },
{ENCR_BLOWFISH, "cbc(blowfish)", 8, 16, 16, 8, },
{ENCR_BLOWFISH, "cbc(blowfish)", 8, 24, 24, 8, },
{ENCR_BLOWFISH, "cbc(blowfish)", 8, 32, 32, 8, },
{ENCR_SERPENT_CBC, "cbc(serpent)", 16, 16, 16, 16, },
{ENCR_SERPENT_CBC, "cbc(serpent)", 16, 24, 24, 16, },
{ENCR_SERPENT_CBC, "cbc(serpent)", 16, 32, 32, 16, },
{ENCR_TWOFISH_CBC, "cbc(twofish)", 16, 16, 16, 16, },
{ENCR_TWOFISH_CBC, "cbc(twofish)", 16, 24, 24, 16, },
{ENCR_TWOFISH_CBC, "cbc(twofish)", 16, 32, 32, 16, },
};
int i;
@@ -134,6 +134,14 @@ plugin_t *af_alg_plugin_create()
(crypter_constructor_t)af_alg_crypter_create);
lib->crypto->add_crypter(lib->crypto, ENCR_CAMELLIA_CTR,
(crypter_constructor_t)af_alg_crypter_create);
lib->crypto->add_crypter(lib->crypto, ENCR_CAST,
(crypter_constructor_t)af_alg_crypter_create);
lib->crypto->add_crypter(lib->crypto, ENCR_BLOWFISH,
(crypter_constructor_t)af_alg_crypter_create);
lib->crypto->add_crypter(lib->crypto, ENCR_SERPENT_CBC,
(crypter_constructor_t)af_alg_crypter_create);
lib->crypto->add_crypter(lib->crypto, ENCR_TWOFISH_CBC,
(crypter_constructor_t)af_alg_crypter_create);
return &this->public.plugin;
}