[PATCH] Disable SM3 in FIPS mode

Jussi Kivilinna jussi.kivilinna at iki.fi
Mon Apr 8 18:07:00 CEST 2019


* cipher/sm3.h (_gcry_digest_spec_sm3): Set flags.fips to zero.
--

Signed-off-by: Jussi Kivilinna <jussi.kivilinna at iki.fi>
---
 cipher/sm3.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cipher/sm3.c b/cipher/sm3.c
index e76f32297..b6f0ab28c 100644
--- a/cipher/sm3.c
+++ b/cipher/sm3.c
@@ -464,7 +464,7 @@ static gcry_md_oid_spec_t oid_spec_sm3[] =
 
 gcry_md_spec_t _gcry_digest_spec_sm3 =
   {
-    GCRY_MD_SM3, {0, 1},
+    GCRY_MD_SM3, {0, 0},
     "SM3", asn_sm3, DIM (asn_sm3), oid_spec_sm3, 32,
     sm3_init, _gcry_md_block_write, sm3_final, sm3_read, NULL,
     _gcry_sm3_hash_buffer, _gcry_sm3_hash_buffers,




More information about the Gcrypt-devel mailing list