achieve the test purpose.
Signed-off-by: Tianjia Zhang
---
crypto/testmgr.c | 7 ++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/crypto/testmgr.c b/crypto/testmgr.c
index 6863f911fcee..0dc94461c437 100644
--- a/crypto/testmgr.c
+++ b/crypto/testmgr.c
@@ -4025,7 +4025,7 @@ static
tain the verify function.
2. extract the sm2 certificate code into a separate file.
Tianjia Zhang (8):
crypto: sm3 - export crypto_sm3_final function
lib/mpi: Extend the MPI library
lib/mpi: Introduce ec implementation to MPI library
crypto: sm2 - introduce OSCCA SM2 asymmetric cipher alg
Asymmetric digsig supports SM2-with-SM3 algorithm combination,
so that IMA can also verify SM2's signature data.
Signed-off-by: Tianjia Zhang
---
security/integrity/digsig_asymmetric.c | 14 +++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/security/inte
calculate ZA. Finally calculate the digest of the
signature and complete the verification work. The calculation
process of ZA is declared in specifications GM/T 0009-2012
and GM/T 0003.2-2012.
Signed-off-by: Tianjia Zhang
---
crypto/asymmetric_keys/Makefile | 1 +
crypto
The implementation of EC is introduced from libgcrypt as the
basic algorithm of elliptic curve, which can be more perfectly
integrated with MPI implementation.
Some other algorithms will be developed based on mpi ecc, such as SM2.
Signed-off-by: Tianjia Zhang
---
include/linux/mpi.h | 105
://tools.ietf.org/html/draft-shen-sm2-ecdsa-02
oscca: http://www.oscca.gov.cn/sca/xxgk/2010-12/17/content_1002386.shtml
scctc: http://www.gmbz.org.cn/main/bzlb.html
Signed-off-by: Tianjia Zhang
---
crypto/Kconfig | 17 ++
crypto/Makefile | 8 +
crypto/sm2.c | 473
standard elliptic curve public key, and the sm2
algorithm signs the hash generated by sm3.
Signed-off-by: Tianjia Zhang
---
crypto/asymmetric_keys/x509_cert_parser.c | 14 +-
include/linux/oid_registry.h | 6 ++
2 files changed, 19 insertions(+), 1 deletion(-)
diff
Expand the mpi library based on libgcrypt, and the ECC algorithm of
mpi based on libgcrypt requires these functions.
Some other algorithms will be developed based on mpi ecc, such as SM2.
Signed-off-by: Tianjia Zhang
---
include/linux/mpi.h| 88 +++
lib/mpi/Makefile | 5
Both crypto_sm3_update and crypto_sm3_finup have been
exported, exporting crypto_sm3_final, to avoid having to
use crypto_sm3_finup(desc, NULL, 0, dgst) to calculate
the hash in some cases.
Signed-off-by: Tianjia Zhang
---
crypto/sm3_generic.c | 7 ---
include/crypto/sm3.h | 2 ++
2 files
sig support sm2-with-sm3 algorithm.
2. remove unused sm2_set_priv_key().
3. rebase on mainline.
v2 changes:
1. simplify the sm2 algorithm and only retain the verify function.
2. extract the sm2 certificate code into a separate file.
Tianjia Zhang (8):
crypto: sm3 - export crypto_sm3_final
achieve the test purpose.
Signed-off-by: Tianjia Zhang
---
crypto/testmgr.c | 7 ++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/crypto/testmgr.c b/crypto/testmgr.c
index 6863f911fcee..0dc94461c437 100644
--- a/crypto/testmgr.c
+++ b/crypto/testmgr.c
@@ -4025,7 +4025,7 @@ static
Expand the mpi library based on libgcrypt, and the ECC algorithm of
mpi based on libgcrypt requires these functions.
Some other algorithms will be developed based on mpi ecc, such as SM2.
Signed-off-by: Tianjia Zhang
---
include/linux/mpi.h| 88 +++
lib/mpi/Makefile | 5
calculate ZA. Finally calculate the digest of the
signature and complete the verification work. The calculation
process of ZA is declared in specifications GM/T 0009-2012
and GM/T 0003.2-2012.
Signed-off-by: Tianjia Zhang
---
crypto/asymmetric_keys/Makefile | 1 +
crypto
standard elliptic curve public key, and the sm2
algorithm signs the hash generated by sm3.
Signed-off-by: Tianjia Zhang
---
crypto/asymmetric_keys/x509_cert_parser.c | 14 +-
include/linux/oid_registry.h | 6 ++
2 files changed, 19 insertions(+), 1 deletion(-)
diff
://tools.ietf.org/html/draft-shen-sm2-ecdsa-02
oscca: http://www.oscca.gov.cn/sca/xxgk/2010-12/17/content_1002386.shtml
scctc: http://www.gmbz.org.cn/main/bzlb.html
Signed-off-by: Tianjia Zhang
---
crypto/Kconfig | 17 ++
crypto/Makefile | 8 +
crypto/sm2.c | 473
The implementation of EC is introduced from libgcrypt as the
basic algorithm of elliptic curve, which can be more perfectly
integrated with MPI implementation.
Some other algorithms will be developed based on mpi ecc, such as SM2.
Signed-off-by: Tianjia Zhang
---
include/linux/mpi.h | 105
Asymmetric digsig supports SM2-with-SM3 algorithm combination,
so that IMA can also verify SM2's signature data.
Signed-off-by: Tianjia Zhang
---
security/integrity/digsig_asymmetric.c | 14 +++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/security/inte
Both crypto_sm3_update and crypto_sm3_finup have been
exported, exporting crypto_sm3_final, to avoid having to
use crypto_sm3_finup(desc, NULL, 0, dgst) to calculate
the hash in some cases.
Signed-off-by: Tianjia Zhang
---
crypto/sm3_generic.c | 7 ---
include/crypto/sm3.h | 2 ++
2 files
On 2020/7/10 21:12, Marcelo Henrique Cerri wrote:
Hi, Tianjia.
On Thu, Jul 09, 2020 at 04:40:09PM +0800, Tianjia Zhang wrote:
Expand the mpi library based on libgcrypt, and the ECC algorithm of
mpi based on libgcrypt requires these functions.
Some other algorithms will be developed based on
In case of memory allocation failure, a negative error code should
be returned.
Fixes: 785e5c616c849 ("crypto: mediatek - Add crypto driver support for some
MediaTek chips")
Cc: Ryder Lee
Signed-off-by: Tianjia Zhang
---
drivers/crypto/mediatek/mtk-platform.c | 4 ++--
1 file
Asymmetric digsig supports SM2-with-SM3 algorithm combination,
so that IMA can also verify SM2's signature data.
Signed-off-by: Tianjia Zhang
Tested-by: Xufeng Zhang
---
security/integrity/digsig_asymmetric.c | 14 +++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --
The implementation of EC is introduced from libgcrypt as the
basic algorithm of elliptic curve, which can be more perfectly
integrated with MPI implementation.
Some other algorithms will be developed based on mpi ecc, such as SM2.
Signed-off-by: Tianjia Zhang
Tested-by: Xufeng Zhang
Both crypto_sm3_update and crypto_sm3_finup have been
exported, exporting crypto_sm3_final, to avoid having to
use crypto_sm3_finup(desc, NULL, 0, dgst) to calculate
the hash in some cases.
Signed-off-by: Tianjia Zhang
Tested-by: Xufeng Zhang
---
crypto/sm3_generic.c | 7 ---
include
achieve the test purpose.
Signed-off-by: Tianjia Zhang
Tested-by: Xufeng Zhang
---
crypto/testmgr.c | 7 ++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/crypto/testmgr.c b/crypto/testmgr.c
index 23c27fc96394..cd002a030af5 100644
--- a/crypto/testmgr.c
+++ b/crypto/testmgr.c
ate code into a separate file.
Tianjia Zhang (8):
crypto: sm3 - export crypto_sm3_final function
lib/mpi: Extend the MPI library
lib/mpi: Introduce ec implementation to MPI library
crypto: sm2 - introduce OSCCA SM2 asymmetric cipher algorithm
crypto: testmgr - support test with different
Expand the mpi library based on libgcrypt, and the ECC algorithm of
mpi based on libgcrypt requires these functions.
Some other algorithms will be developed based on mpi ecc, such as SM2.
Signed-off-by: Tianjia Zhang
Tested-by: Xufeng Zhang
---
include/linux/mpi.h| 87 +++
lib/mpi
calculate ZA. Finally calculate the digest of the
signature and complete the verification work. The calculation
process of ZA is declared in specifications GM/T 0009-2012
and GM/T 0003.2-2012.
Signed-off-by: Tianjia Zhang
Tested-by: Xufeng Zhang
---
crypto/asymmetric_keys/Makefile | 1
standard elliptic curve public key, and the sm2
algorithm signs the hash generated by sm3.
Signed-off-by: Tianjia Zhang
Tested-by: Xufeng Zhang
---
crypto/asymmetric_keys/x509_cert_parser.c | 14 +-
include/linux/oid_registry.h | 6 ++
2 files changed, 19 insertions
://tools.ietf.org/html/draft-shen-sm2-ecdsa-02
oscca: http://www.oscca.gov.cn/sca/xxgk/2010-12/17/content_1002386.shtml
scctc: http://www.gmbz.org.cn/main/bzlb.html
Signed-off-by: Tianjia Zhang
Tested-by: Xufeng Zhang
---
crypto/Kconfig | 17 ++
crypto/Makefile | 8
Hi Gilad,
On 9/13/20 3:12 PM, Gilad Ben-Yossef wrote:
Hi,
On Thu, Sep 3, 2020 at 4:13 PM Tianjia Zhang
wrote:
The digital certificate format based on SM2 crypto algorithm as
specified in GM/T 0015-2012. It was published by State Encryption
Management Bureau, China.
The method of
Hi,
On 9/11/20 12:24 PM, Herbert Xu wrote:
On Thu, Sep 03, 2020 at 09:12:34PM +0800, Tianjia Zhang wrote:
---
v6 changes:
1. remove mpi_sub_ui function from mpi library.
2. rebase on mainline.
This series is still missing acks for patches 6-8. Without them
it cannot proceed.
Thanks
On 9/18/20 2:47 PM, Herbert Xu wrote:
On Thu, Sep 03, 2020 at 09:12:39PM +0800, Tianjia Zhang wrote:
Some asymmetric algorithms will get different ciphertext after
each encryption, such as SM2, and let testmgr support the testing
of such algorithms.
In struct akcipher_testvec, set c and
3. rebase on mainline.
v2 changes:
1. simplify the sm2 algorithm and only retain the verify function.
2. extract the sm2 certificate code into a separate file.
Tianjia Zhang (10):
crypto: sm3 - export crypto_sm3_final function
lib/mpi: Extend the MPI library
lib/mpi: Introduce ec implem
Add testmgr test vectors for SM2 algorithm. These vectors come
from `openssl pkeyutl -sign` and libgcrypt.
Signed-off-by: Tianjia Zhang
Tested-by: Xufeng Zhang
---
crypto/testmgr.c | 6 +
crypto/testmgr.h | 59
2 files changed, 65
Asymmetric digsig supports SM2-with-SM3 algorithm combination,
so that IMA can also verify SM2's signature data.
Signed-off-by: Tianjia Zhang
Tested-by: Xufeng Zhang
Reviewed-by: Mimi Zohar
Reviewed-by: Vitaly Chikunov
---
security/integrity/digsig_asymmetric.c | 14 +++---
1
The implementation of EC is introduced from libgcrypt as the
basic algorithm of elliptic curve, which can be more perfectly
integrated with MPI implementation.
Some other algorithms will be developed based on mpi ecc, such as SM2.
Signed-off-by: Tianjia Zhang
Tested-by: Xufeng Zhang
Expand the mpi library based on libgcrypt, and the ECC algorithm of
mpi based on libgcrypt requires these functions.
Some other algorithms will be developed based on mpi ecc, such as SM2.
Signed-off-by: Tianjia Zhang
Tested-by: Xufeng Zhang
---
include/linux/mpi.h| 87 +++
lib/mpi
achieve the test purpose.
Signed-off-by: Tianjia Zhang
Tested-by: Xufeng Zhang
---
crypto/testmgr.c | 7 ++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/crypto/testmgr.c b/crypto/testmgr.c
index 23c27fc96394..cd002a030af5 100644
--- a/crypto/testmgr.c
+++ b/crypto/testmgr.c
Both crypto_sm3_update and crypto_sm3_finup have been
exported, exporting crypto_sm3_final, to avoid having to
use crypto_sm3_finup(desc, NULL, 0, dgst) to calculate
the hash in some cases.
Signed-off-by: Tianjia Zhang
Tested-by: Xufeng Zhang
---
crypto/sm3_generic.c | 7 ---
include
://tools.ietf.org/html/draft-shen-sm2-ecdsa-02
oscca: http://www.oscca.gov.cn/sca/xxgk/2010-12/17/content_1002386.shtml
scctc: http://www.gmbz.org.cn/main/bzlb.html
Signed-off-by: Tianjia Zhang
Tested-by: Xufeng Zhang
---
crypto/Kconfig | 17 ++
crypto/Makefile | 8
calculate ZA. Finally calculate the digest of the
signature and complete the verification work. The calculation
process of ZA is declared in specifications GM/T 0009-2012
and GM/T 0003.2-2012.
Signed-off-by: Tianjia Zhang
Tested-by: Xufeng Zhang
Reviewed-by: Gilad Ben-Yossef
---
crypto
When the 'key' allocation fails, the 'req' will not be released,
which will cause memory leakage on this path. This patch adds a
'free_req' tag used to solve this problem, and two new err values
are added to reflect the real reason of the error.
Signed-off-by: Tianji
standard elliptic curve public key, and the sm2
algorithm signs the hash generated by sm3.
Signed-off-by: Tianjia Zhang
Tested-by: Xufeng Zhang
Reviewed-by: Vitaly Chikunov
---
crypto/asymmetric_keys/x509_cert_parser.c | 27 ++-
include/linux/oid_registry.h | 6
Hi Herbert,
Thanks for your patch, I will do a test later.
By the way, did you add special compilation parameters? I compile
normally without warnings in gcc 6.5 and 9.3.
Best regards,
Tianjia
On 9/25/20 4:19 PM, Herbert Xu wrote:
On Mon, Sep 21, 2020 at 12:20:55AM +0800, Tianjia Zhang
Hi Herbert,
Thanks for your patch, The changes look good.
I have tested this patch, so,
Tested-by: Tianjia Zhang
Best regards,
Tianjia
On 9/25/20 4:19 PM, Herbert Xu wrote:
On Mon, Sep 21, 2020 at 12:20:55AM +0800, Tianjia Zhang wrote:
Expand the mpi library based on libgcrypt, and the ECC
When memory allocation fails, an appropriate return value
should be set.
Fixes: 215525639631 ("X.509: support OSCCA SM2-with-SM3 certificate
verification")
Signed-off-by: Tianjia Zhang
---
crypto/asymmetric_keys/public_key_sm2.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletio
This is an algorithm optimization. The reset operation when
setting the public key is repeated and redundant, so remove it.
At the same time, `sm2_ecc_os2ec()` is optimized to make the
function more simpler and more in line with the Linux code style.
Signed-off-by: Tianjia Zhang
---
crypto/sm2
All templates and generic algorithms have been registered in
subsys_initcall instead of module_init. The ecrdsa algorithm
happened to be missed. Here is a fix for it.
Cc: Vitaly Chikunov
Signed-off-by: Tianjia Zhang
---
crypto/ecrdsa.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion
On 2020/4/16 14:01, Herbert Xu wrote:
On Thu, Apr 02, 2020 at 08:34:57PM +0800, Tianjia Zhang wrote:
Hello all,
This new module implement the OSCCA certificate and SM2 public key
algorithm. It was published by State Encryption Management Bureau, China.
List of specifications for OSCCA
standard elliptic curve public key, and the sm2
algorithm signs the hash generated by sm3.
Signed-off-by: Tianjia Zhang
---
crypto/asymmetric_keys/x509_cert_parser.c | 14 +-
include/linux/oid_registry.h | 6 ++
2 files changed, 19 insertions(+), 1 deletion(-)
diff
Both crypto_sm3_update and crypto_sm3_finup have been
exported, exporting crypto_sm3_final, to avoid having to
use crypto_sm3_finup(desc, NULL, 0, dgst) to calculate
the hash in some cases.
Signed-off-by: Tianjia Zhang
---
crypto/sm3_generic.c | 7 ---
include/crypto/sm3.h | 2 ++
2 files
Expand the mpi library based on libgcrypt, and the ECC algorithm of
mpi based on libgcrypt requires these functions.
Some other algorithms will be developed based on mpi ecc, such as SM2.
Signed-off-by: Tianjia Zhang
---
include/linux/mpi.h| 88 +++
lib/mpi/Makefile | 5
Asymmetric digsig supports SM2-with-SM3 algorithm combination,
so that IMA can also verify SM2's signature data.
Signed-off-by: Tianjia Zhang
---
security/integrity/digsig_asymmetric.c | 14 +++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/security/inte
achieve the test purpose.
Signed-off-by: Tianjia Zhang
---
crypto/testmgr.c | 7 ++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/crypto/testmgr.c b/crypto/testmgr.c
index 6863f911fcee..0dc94461c437 100644
--- a/crypto/testmgr.c
+++ b/crypto/testmgr.c
@@ -4025,7 +4025,7 @@ static
The implementation of EC is introduced from libgcrypt as the
basic algorithm of elliptic curve, which can be more perfectly
integrated with MPI implementation.
Some other algorithms will be developed based on mpi ecc, such as SM2.
Signed-off-by: Tianjia Zhang
---
include/linux/mpi.h | 105
calculate ZA. Finally calculate the digest of the
signature and complete the verification work. The calculation
process of ZA is declared in specifications GM/T 0009-2012
and GM/T 0003.2-2012.
Signed-off-by: Tianjia Zhang
---
crypto/asymmetric_keys/Makefile | 1 +
crypto
v3 changes:
1. integrity asymmetric digsig support sm2-with-sm3 algorithm.
2. remove unused sm2_set_priv_key().
3. rebase on mainline.
v2 changes:
1. simplify the sm2 algorithm and only retain the verify function.
2. extract the sm2 certificate code into a separate file.
Tianjia Zhang (8)
://tools.ietf.org/html/draft-shen-sm2-ecdsa-02
oscca: http://www.oscca.gov.cn/sca/xxgk/2010-12/17/content_1002386.shtml
scctc: http://www.gmbz.org.cn/main/bzlb.html
Signed-off-by: Tianjia Zhang
---
crypto/Kconfig | 17 ++
crypto/Makefile | 8 +
crypto/sm2.c | 473
On 2020/6/10 4:58, Vitaly Chikunov wrote:
Tianjia,
On Tue, Jun 09, 2020 at 09:48:47PM +0800, Tianjia Zhang wrote:
Hello all,
This new module implement the OSCCA certificate and SM2 public key
algorithm. It was published by State Encryption Management Bureau, China.
List of specifications
The akcipher.h header file was originally introduced in SM2, and
then the definition of SM2 was moved to the existing code. This
header file is left and should be removed.
Signed-off-by: Tianjia Zhang
---
include/crypto/public_key.h | 1 -
1 file changed, 1 deletion(-)
diff --git a/include
Hi Herbert,
On 10/15/20 8:05 PM, Herbert Xu wrote:
On Thu, Oct 15, 2020 at 07:02:41PM +0800, Tianjia Zhang wrote:
All templates and generic algorithms have been registered in
subsys_initcall instead of module_init. The ecrdsa algorithm
happened to be missed. Here is a fix for it.
That is
On 11/30/20 10:24 AM, Herbert Xu wrote:
On Mon, Nov 30, 2020 at 10:21:56AM +0800, Tianjia Zhang wrote:
That is true only if there are non-generic implementations of
the algorithms, which is not the case here. Please explain the
real reason why this is needed.
This is a generic algorithm
Hi,
Sorry, I just read this email. I will submit the fix patch as soon as
possible. Thanks for reporting.
Best regards,
Tianjia
On 1/7/21 3:27 PM, Tee Hao Wei wrote:
On 2/12/20 8:24 pm, Tobias Markus wrote:
Hi David,
I'm afraid I can't provide an exactly matching disassembly of the functi
ply check this situation and fixes the crash
caused by NULL pointer.
Fixes: 215525639631 ("X.509: support OSCCA SM2-with-SM3 certificate
verification")
Cc: sta...@vger.kernel.org # v5.10+
Reported-by: Tobias Markus
Signed-off-by: Tianjia Zhang
---
crypto/asymmetric_keys/public_key.c |
Hi,
I have fixed this problem last week. Still thanks for your fixing.
patch is here: https://lkml.org/lkml/2021/1/7/201
Best regards,
Tianjia
On 1/13/21 12:10 AM, Toke Høiland-Jørgensen wrote:
When public_key_verify_signature() is called from
asymmetric_key_verify_signature(), the pkey_algo f
On 1/7/21 6:58 PM, David Howells wrote:
Tianjia Zhang wrote:
On the following call path, `sig->pkey_algo` is not assigned
in asymmetric_key_verify_signature(), which causes runtime
crash in public_key_verify_signature().
keyctl_pkey_verify
asymmetric_key_verify_signat
keys, we change the selection
of the encoding type to be driven by the key's signature scheme rather
than by the hash type.
Signed-off-by: Stefan Berger
Reviewed-by: Vitaly Chikunov
Cc: Mimi Zohar
Cc: Dmitry Kasatkin
Cc: linux-integr...@vger.kernel.org
Cc: Vitaly Chikunov
Cc: Tianjia Zhan
);
+
/*
* sprint_OID - Print an Object Identifier into a buffer
* @data: The encoded OID to print
Great job, I'm just curious why we need to add a new function, this
seems unnecessary, if possible, please add
Reviewed-by: Tianjia Zhang
Best regards,
Tianjia
Sjd9GWIe98Ll9J0dquxgCktp9DrTAPBgNVHRMBAf8EBTADAQH/MAoG
CCqBHM9VAYN1A0cAMEQCIAvLWIfGFq85u/vVMLc5H1D/DnrNS0VhSkQA4daRO4tc
AiABbeWENcQZDZLWTuqG9P2KDPOoNqV/QV/+0XjMAVblhg==
-END CERTIFICATE-----
If you can, please add:
Tested-by: Tianjia Zhang
good luck!
Tianjia
-off-by: Stefan Berger
Reviewed-by: Tianjia Zhang
---
crypto/asymmetric_keys/x509_cert_parser.c | 12 +++-
include/linux/oid_registry.h | 1 +
lib/oid_registry.c| 13 +
3 files changed, 25 insertions(+), 1 deletion(-)
diff --git a/crypto
Hi,
On 3/5/21 11:04 PM, Stefan Berger wrote:
On 3/5/21 2:37 AM, Tianjia Zhang wrote:
Hi,
On 3/4/21 7:46 AM, Stefan Berger wrote:
Tianjia,
can you say whether SM2 support works for you before and after
applying this patch? I cannot verify it with an sm2 key I have
created using a
The kernel module signature supports the option to use the SM3
secure hash (OSCCA GM/T 0004-2012 SM3).
Signed-off-by: Tianjia Zhang
---
Documentation/admin-guide/module-signing.rst | 5 +++--
crypto/asymmetric_keys/pkcs7_parser.c| 7 +++
init/Kconfig
Hi,
On 3/24/21 12:43 AM, Randy Dunlap wrote:
On 3/23/21 1:35 AM, Tianjia Zhang wrote:
The kernel module signature supports the option to use the SM3
secure hash (OSCCA GM/T 0004-2012 SM3).
Signed-off-by: Tianjia Zhang
---
Documentation/admin-guide/module-signing.rst | 5 +++--
crypto
Hi,
On 3/24/21 6:14 AM, Ard Biesheuvel wrote:
On Tue, 23 Mar 2021 at 09:36, Tianjia Zhang
wrote:
The kernel module signature supports the option to use the SM3
secure hash (OSCCA GM/T 0004-2012 SM3).
Signed-off-by: Tianjia Zhang
A secure hash is not the same as a signature. Looking at
Support parsing the message signature of the SM2 and SM3 algorithm
combination. This group of algorithms has been well supported. One
of the main users is module signature verification.
Signed-off-by: Tianjia Zhang
---
crypto/asymmetric_keys/pkcs7_parser.c | 7 +++
1 file changed, 7
rithm
sign-file sm3 private.pem cert.pem test.ko test.ko.signed
At this point, we should built the CA certificate into the kernel, and
then we can load the SM2-with-SM3 signed module normally.
---
v2 change:
- split one patch into twos.
- richer commit log.
Tianjia Zhang (2):
pkcs7: make parse
cert.pem test.ko test.ko.signed
At this point, we should built the CA certificate into the kernel, and
then we can load the SM2-with-SM3 signed module normally.
Signed-off-by: Tianjia Zhang
---
Documentation/admin-guide/module-signing.rst | 5 +++--
init/Kconfig
In the process of calculating the hash, use the more accurate type
'u32' instead of the original 'unsigned int' to avoid ambiguity.
Signed-off-by: Tianjia Zhang
---
crypto/sm3_generic.c | 12 ++--
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/cr
On 3/26/21 5:38 PM, Gilad Ben-Yossef wrote:
Hi,
Thank you for the patch!
On Fri, Mar 26, 2021 at 5:21 AM Tianjia Zhang
wrote:
In the process of calculating the hash, use the more accurate type
'u32' instead of the original 'unsigned int' to avoid ambiguity.
I don&
ping.
Thanks,
Tianjia
On 3/24/21 8:15 PM, Tianjia Zhang wrote:
The kernel module signature supports the option to use the SM3 secure
hash (OSCCA GM/T 0004-2012 SM3). SM2 and SM3 always appear in pairs.
The former is used for signing and the latter is used for hash
calculation.
To sign a
80 matches
Mail list logo