mbox series

[RFC,0/3] crypto: Introduce SM9 key exchange

Message ID 20230617101443.6083-1-guozihua@huawei.com (mailing list archive)
Headers show
Series crypto: Introduce SM9 key exchange | expand

Message

Guozihua (Scott) June 17, 2023, 10:14 a.m. UTC
ID-based key exchange algorithms provides the capability of using a
human-readable ID as the public key and generate corresponding private
key base on that ID. With a pre-defined pattern, the ID could be
generated with openly known knowledge of the opponent, eliminating the
need of a certificate and avoiding the whole verification chain.

Instead of CAs, ID-based crypto algorithm relies on a KGC (Key
Generation Center) for generating and distrubuting of private keys.
Unlike CAs, KGC is not directly involved in any of the crypto
procedures.

SM9 is an ID-based crypto algorithm within the ShangMi family. The key
exchange part of it was accepted in ISO/IEC 11770-3:2021. This patchset
introduces key exchange capability of SM9.

ID-based crypto algorithms are widely accepted as the next gen
asymmetric cryptography for various fileds including telecommunication,
emails, IoT etc..

You can find the technical details in the last two patch.

v4:
  Fixed typo in commit message; Marked non-exported function as static.

v3:
  Fixed memleaks.

v2:
  Updated the identification of initiator, changed function name for
getting sk; Split the patchset into 3 patches in order to ease code
review.

GUO Zihua (3):
  MPI: Export mpi_add_ui and mpi_mod for SM9
  crypto: Introduce SM9 key exchange algorithm library
  crypto: Introduce SM9 key exchange algorithm

 crypto/Kconfig    |   15 +
 crypto/Makefile   |    4 +
 crypto/sm9.c      |  916 ++++++++++++++++++++++++++
 crypto/sm9_lib.c  | 1584 +++++++++++++++++++++++++++++++++++++++++++++
 crypto/sm9_lib.h  |   92 +++
 lib/mpi/mpi-add.c |    2 +-
 lib/mpi/mpi-mod.c |    1 +
 7 files changed, 2613 insertions(+), 1 deletion(-)
 create mode 100644 crypto/sm9.c
 create mode 100644 crypto/sm9_lib.c
 create mode 100644 crypto/sm9_lib.h