ad2d76
diff --git a/lib/luks2/luks2_keyslot_luks2.c b/lib/luks2/luks2_keyslot_luks2.c
ad2d76
index 3716c26..540915b 100644
ad2d76
--- a/lib/luks2/luks2_keyslot_luks2.c
ad2d76
+++ b/lib/luks2/luks2_keyslot_luks2.c
ad2d76
@@ -350,6 +350,13 @@ static int luks2_keyslot_get_key(struct crypt_device *cd,
ad2d76
 		crypt_free_volume_key(derived_key);
ad2d76
 		return -ENOMEM;
ad2d76
 	}
ad2d76
+
ad2d76
+	if (crypt_fips_mode() &&
ad2d76
+	    (!strcmp(pbkdf.type, CRYPT_KDF_ARGON2I) ||
ad2d76
+	     !strcmp(pbkdf.type, CRYPT_KDF_ARGON2ID)))
ad2d76
+		log_verbose(cd, _("%s key derivation function is not currently FIPS-compliant."),
ad2d76
+			    pbkdf.type);
ad2d76
+
ad2d76
 	/*
ad2d76
 	 * Calculate derived key, decrypt keyslot content and merge it.
ad2d76
 	 */
ad2d76
@@ -406,6 +413,14 @@ static int luks2_keyslot_update_json(struct crypt_device *cd,
ad2d76
 	if (!pbkdf)
ad2d76
 		return -EINVAL;
ad2d76
 
ad2d76
+	if (crypt_fips_mode() &&
ad2d76
+	    (!strcmp(pbkdf->type, CRYPT_KDF_ARGON2I) ||
ad2d76
+	     !strcmp(pbkdf->type, CRYPT_KDF_ARGON2ID))) {
ad2d76
+		log_err(cd, _("%s key derivation function is not allowed in FIPS mode."),
ad2d76
+			pbkdf->type);
ad2d76
+		return -EINVAL;
ad2d76
+	}
ad2d76
+
ad2d76
 	r = crypt_benchmark_pbkdf_internal(cd, CONST_CAST(struct crypt_pbkdf_type *)pbkdf, keyslot_key_len);
ad2d76
 	if (r < 0)
ad2d76
 		return r;