summary refs log tree commit diff stats
path: root/include
diff options
context:
space:
mode:
authorliequan che <liequanche@gmail.com>2024-10-30 08:51:46 +0000
committerDaniel P. Berrangé <berrange@redhat.com>2024-11-05 18:37:18 +0000
commitd078da86d61cf0f188cd099bef9b7b2dcfeba5a7 (patch)
tree7fa359d1900f7460aead1f89e59a81f2f3648835 /include
parent62eb377e0a3179ff57274e096eca0102f96d0170 (diff)
downloadfocaccia-qemu-d078da86d61cf0f188cd099bef9b7b2dcfeba5a7.tar.gz
focaccia-qemu-d078da86d61cf0f188cd099bef9b7b2dcfeba5a7.zip
crypto: Introduce SM3 hash hmac pbkdf algorithm
Introduce the SM3 cryptographic hash algorithm (GB/T 32905-2016).

SM3 (GB/T 32905-2016) is a cryptographic standard issued by the
Organization of State Commercial Cryptography Administration (OSCCA)
as an authorized cryptographic algorithm for use within China.

Detect the SM3 cryptographic hash algorithm and enable the feature silently
if it is available.

Signed-off-by: cheliequan <cheliequan@inspur.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/crypto/hash.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/crypto/hash.h b/include/crypto/hash.h
index 712cac79ee..1868d4a0f7 100644
--- a/include/crypto/hash.h
+++ b/include/crypto/hash.h
@@ -31,6 +31,7 @@
 #define QCRYPTO_HASH_DIGEST_LEN_SHA384    48
 #define QCRYPTO_HASH_DIGEST_LEN_SHA512    64
 #define QCRYPTO_HASH_DIGEST_LEN_RIPEMD160 20
+#define QCRYPTO_HASH_DIGEST_LEN_SM3       32
 
 /* See also "QCryptoHashAlgo" defined in qapi/crypto.json */