The introduced SHA1_NOFINAL hasher was not sufficient for EAP-AKA,
as it requires to XOR the key into the hashers state. A new SHA1 based keyed hash function, implemented as PRF, enables EAP-AKA and the FIPS-PRF function to properly use the existing SHA1 implementation.
This commit is contained in:
@@ -40,6 +40,8 @@ static void destroy(private_sha1_plugin_t *this)
|
||||
{
|
||||
lib->crypto->remove_hasher(lib->crypto,
|
||||
(hasher_constructor_t)sha1_hasher_create);
|
||||
lib->crypto->remove_prf(lib->crypto,
|
||||
(prf_constructor_t)sha1_keyed_prf_create);
|
||||
free(this);
|
||||
}
|
||||
|
||||
@@ -54,8 +56,8 @@ plugin_t *plugin_create()
|
||||
|
||||
lib->crypto->add_hasher(lib->crypto, HASH_SHA1,
|
||||
(hasher_constructor_t)sha1_hasher_create);
|
||||
lib->crypto->add_hasher(lib->crypto, HASH_SHA1_NOFINAL,
|
||||
(hasher_constructor_t)sha1_hasher_create);
|
||||
lib->crypto->add_prf(lib->crypto, PRF_KEYED_SHA1,
|
||||
(prf_constructor_t)sha1_keyed_prf_create);
|
||||
|
||||
return &this->public.plugin;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user