[git] GCRYPT - branch, master, updated. libgcrypt-1.8.1-19-g94b8436
by NIIBE Yutaka
cvs at cvs.gnupg.org
Wed Oct 25 05:06:27 CEST 2017
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "The GNU crypto library".
The branch, master has been updated
via 94b84360ca55c407222a3eb8222d8b1816fc617f (commit)
from 4423bf3cc4432b9bfe801ff74cb05e6f0dd3eccd (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 94b84360ca55c407222a3eb8222d8b1816fc617f
Author: NIIBE Yutaka <gniibe at fsij.org>
Date: Wed Oct 25 12:04:30 2017 +0900
Add OID information for SM3.
* cipher/sm3.c (asn_sm3, oid_spec_sm3): New.
(_gcry_digest_spec_sm3): Add asn_sm3, oid_spec_sm3.
Signed-off-by: NIIBE Yutaka <gniibe at fsij.org>
diff --git a/cipher/sm3.c b/cipher/sm3.c
index f0c574a..ee5daf2 100644
--- a/cipher/sm3.c
+++ b/cipher/sm3.c
@@ -444,10 +444,23 @@ run_selftests (int algo, int extended, selftest_report_func_t report)
return ec;
}
+static byte asn_sm3[] = /* Object ID is 1.2.156.10197.401 */
+ { 0x30, 0x2F, 0x30, 0x0B, 0x06, 0x07, 0x2A, 0x81,
+ 0x1C, 0xCF, 0x55, 0x83, 0x11, 0x05, 0x00, 0x04,
+ 0x20 };
+
+static gcry_md_oid_spec_t oid_spec_sm3[] =
+ {
+ /* China Electronics Standardization Instutute,
+ OID White paper (2015), Table 6 */
+ { "1.2.156.10197.401" },
+ { NULL },
+ };
+
gcry_md_spec_t _gcry_digest_spec_sm3 =
{
GCRY_MD_SM3, {0, 1},
- "SM3", NULL, 0, NULL, 32,
+ "SM3", asn_sm3, DIM (asn_sm3), oid_spec_sm3, 32,
sm3_init, _gcry_md_block_write, sm3_final, sm3_read, NULL,
sizeof (SM3_CONTEXT),
run_selftests
-----------------------------------------------------------------------
Summary of changes:
cipher/sm3.c | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
hooks/post-receive
--
The GNU crypto library
http://git.gnupg.org
_______________________________________________
Gnupg-commits mailing list
Gnupg-commits at gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-commits
More information about the Gcrypt-devel
mailing list