xof: Defined Extended Output Functions

This commit is contained in:
Andreas Steffen
2016-07-29 12:36:14 +02:00
parent 7f65a8c271
commit 04208ac5d4
14 changed files with 539 additions and 5 deletions
@@ -844,6 +844,7 @@ static void list_algs(FILE *out)
integrity_algorithm_t integrity;
hash_algorithm_t hash;
pseudo_random_function_t prf;
ext_out_function_t xof;
diffie_hellman_group_t group;
rng_quality_t quality;
const char *plugin_name;
@@ -891,6 +892,14 @@ static void list_algs(FILE *out)
print_alg(out, &len, pseudo_random_function_names, prf, plugin_name);
}
enumerator->destroy(enumerator);
fprintf(out, "\n xof: ");
len = 13;
enumerator = lib->crypto->create_xof_enumerator(lib->crypto);
while (enumerator->enumerate(enumerator, &xof, &plugin_name))
{
print_alg(out, &len, ext_out_function_names, xof, plugin_name);
}
enumerator->destroy(enumerator);
fprintf(out, "\n dh-group: ");
len = 13;
enumerator = lib->crypto->create_dh_enumerator(lib->crypto);
+10
View File
@@ -1072,6 +1072,7 @@ CALLBACK(get_algorithms, vici_message_t*,
integrity_algorithm_t integrity;
hash_algorithm_t hash;
pseudo_random_function_t prf;
ext_out_function_t xof;
diffie_hellman_group_t group;
rng_quality_t quality;
const char *plugin_name;
@@ -1123,6 +1124,15 @@ CALLBACK(get_algorithms, vici_message_t*,
enumerator->destroy(enumerator);
b->end_section(b);
b->begin_section(b, "xof");
enumerator = lib->crypto->create_xof_enumerator(lib->crypto);
while (enumerator->enumerate(enumerator, &xof, &plugin_name))
{
add_algorithm(b, ext_out_function_names, xof, plugin_name);
}
enumerator->destroy(enumerator);
b->end_section(b);
b->begin_section(b, "dh");
enumerator = lib->crypto->create_dh_enumerator(lib->crypto);
while (enumerator->enumerate(enumerator, &group, &plugin_name))