aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/libstrongswan/crypto/xofs/xof.c8
-rw-r--r--src/libstrongswan/crypto/xofs/xof.h10
2 files changed, 13 insertions, 5 deletions
diff --git a/src/libstrongswan/crypto/xofs/xof.c b/src/libstrongswan/crypto/xofs/xof.c
index 791598588..2b866ae5b 100644
--- a/src/libstrongswan/crypto/xofs/xof.c
+++ b/src/libstrongswan/crypto/xofs/xof.c
@@ -19,7 +19,9 @@
ENUM(ext_out_function_names, XOF_UNDEFINED, XOF_CHACHA20,
"XOF_UNDEFINED",
"XOF_MGF1_SHA1",
+ "XOF_MGF1_SHA224",
"XOF_MGF1_SHA256",
+ "XOF_MGF1_SHA384",
"XOF_MGF1_SHA512",
"XOF_SHAKE128",
"XOF_SHAKE256",
@@ -35,12 +37,14 @@ ext_out_function_t xof_mgf1_from_hash_algorithm(hash_algorithm_t alg)
{
case HASH_SHA1:
return XOF_MGF1_SHA1;
+ case HASH_SHA224:
+ return XOF_MGF1_SHA224;
case HASH_SHA256:
return XOF_MGF1_SHA256;
+ case HASH_SHA384:
+ return XOF_MGF1_SHA384;
case HASH_SHA512:
return XOF_MGF1_SHA512;
- case HASH_SHA224:
- case HASH_SHA384:
case HASH_IDENTITY:
case HASH_UNKNOWN:
case HASH_MD2:
diff --git a/src/libstrongswan/crypto/xofs/xof.h b/src/libstrongswan/crypto/xofs/xof.h
index 83c9ab857..934a1ee35 100644
--- a/src/libstrongswan/crypto/xofs/xof.h
+++ b/src/libstrongswan/crypto/xofs/xof.h
@@ -32,11 +32,15 @@ typedef struct xof_t xof_t;
*/
enum ext_out_function_t {
XOF_UNDEFINED,
- /** RFC 2437 PKCS#1 */
+ /** RFC 8017 PKCS#1 */
XOF_MGF1_SHA1,
- /** RFC 2437 PKCS#1 */
+ /** RFC 8017 PKCS#1 */
+ XOF_MGF1_SHA224,
+ /** RFC 8017 PKCS#1 */
XOF_MGF1_SHA256,
- /** RFC 2437 PKCS#1 */
+ /** RFC 8017 PKCS#1 */
+ XOF_MGF1_SHA384,
+ /** RFC 8017 PKCS#1 */
XOF_MGF1_SHA512,
/** FIPS 202 */
XOF_SHAKE_128,