2020-07-07 03:36:21

by Tianjia Zhang

[permalink] [raw]
Subject: [PATCH ima-evm-utils 3/3] ima-evm-utils: ima_sign supports sm3 algorithm

imaevm sign and verify support sm3 hash algorithm.

Signed-off-by: Tianjia Zhang <[email protected]>
---
src/libimaevm.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/src/libimaevm.c b/src/libimaevm.c
index 8f2ebcf..9c61e64 100644
--- a/src/libimaevm.c
+++ b/src/libimaevm.c
@@ -71,6 +71,7 @@ static const char *const pkey_hash_algo[PKEY_HASH__LAST] = {
[PKEY_HASH_SHA384] = "sha384",
[PKEY_HASH_SHA512] = "sha512",
[PKEY_HASH_SHA224] = "sha224",
+ [PKEY_HASH_SM3_256] = "sm3",
[PKEY_HASH_STREEBOG_256] = "md_gost12_256",
[PKEY_HASH_STREEBOG_512] = "md_gost12_512",
};
--
2.17.1


2020-07-08 16:40:40

by Mimi Zohar

[permalink] [raw]
Subject: Re: [PATCH ima-evm-utils 3/3] ima-evm-utils: ima_sign supports sm3 algorithm

On Tue, 2020-07-07 at 11:35 +0800, Tianjia Zhang wrote:
> imaevm sign and verify support sm3 hash algorithm.
>
> Signed-off-by: Tianjia Zhang <[email protected]>

The patch description is a bit off.  The crypto support already
exists.  Please update the patch description appropriately.

Mimi