Skip to content

RFC crypto: Introduce SM9 key exchange

GUO Zihua linux-crypto 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 RFC Latest3 patches 3 repliesIn review
  2. v2 RFC3 patches 0 repliesSuperseded
  3. v1 RFC3 patches 0 repliesSuperseded

Changes in v3 from the cover letter

Fixed cocci warnings.

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3MPI: Export mpi_add_ui and mpi_mod for SM9lib/mpi/mpi-add.c lib/mpi/mpi-mod.c+2 -10 replies
2/3crypto: Introduce SM9 key exchange algorithm librarycrypto/sm9_lib.c crypto/sm9_lib.h+1677 -00 replies
3/3crypto: Introduce SM9 key exchange algorithmcrypto/Kconfig crypto/Makefile crypto/sm9.c +1 more+1017 -03 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.

Read the v3 thread

Cover letter [PATCH RFC v3 0/3] crypto: Introduce SM9 key exchange

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.

v3:
Fixed cocci warnings.
v2:
Added crypto/sm9.h which fixes build error.

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         |  914 ++++++++++++++++++++++++
 crypto/sm9_lib.c     | 1585 ++++++++++++++++++++++++++++++++++++++++++
 crypto/sm9_lib.h     |   92 +++
 include/crypto/sm9.h |   84 +++
 lib/mpi/mpi-add.c    |    2 +-
 lib/mpi/mpi-mod.c    |    1 +
 8 files changed, 2696 insertions(+), 1 deletion(-)
 create mode 100644 crypto/sm9.c
 create mode 100644 crypto/sm9_lib.c
 create mode 100644 crypto/sm9_lib.h
 create mode 100644 include/crypto/sm9.h
Signature · 1 line
2.17.1