Import initial code for the SM2 cipher
authortb <tb@openbsd.org>
Wed, 18 Aug 2021 16:04:32 +0000 (16:04 +0000)
committertb <tb@openbsd.org>
Wed, 18 Aug 2021 16:04:32 +0000 (16:04 +0000)
commit51892d90bfcefb54f7395f2f97f2099daa1c609c
tree7eea09707f5f0e0bc7fc4686ed24cb6bf3780739
parent4e67fe4c502e68981bcfc9301802524999bcf454
Import initial code for the SM2 cipher

This adds the SM2 algorithm defined in the Chinese standards
GB/T 32918.1-2016, GB/T 32918.2-2016, GB/T 32918.3-2016,
GB/T 32918.4-2016 and GB/T 32918.5-2017.

This is an ISC licensed implementation contributed by Ribose.inc, based
on the same code that was contributed to OpenSSL by Jack Lloyd. The port
to LibreSSL was done by Ronald Tse and Nickolay Olshevsky.

Github PR #105

I made quite a few cleanup passes on this, but more is needed, some
of which will happen in-tree before this is linked to the build.

ok deraadt inoguchi (a long time ago), jsing
lib/libcrypto/sm2/sm2.h [new file with mode: 0644]
lib/libcrypto/sm2/sm2_crypt.c [new file with mode: 0644]
lib/libcrypto/sm2/sm2_err.c [new file with mode: 0644]
lib/libcrypto/sm2/sm2_locl.h [new file with mode: 0644]
lib/libcrypto/sm2/sm2_pmeth.c [new file with mode: 0644]
lib/libcrypto/sm2/sm2_sign.c [new file with mode: 0644]
lib/libcrypto/sm2/sm2_za.c [new file with mode: 0644]