All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH RFC v2 0/3] crypto: Introduce SM9 key exchange
@ 2023-06-19  2:15 GUO Zihua
  2023-06-19  2:15 ` [PATCH RFC v2 1/3] MPI: Export mpi_add_ui and mpi_mod for SM9 GUO Zihua
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: GUO Zihua @ 2023-06-19  2:15 UTC (permalink / raw)
  To: herbert, davem; +Cc: linux-crypto

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.

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         |  916 ++++++++++++++++++++++++
 crypto/sm9_lib.c     | 1584 ++++++++++++++++++++++++++++++++++++++++++
 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, 2697 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

-- 
2.17.1


^ permalink raw reply	[flat|nested] 6+ messages in thread
* Re: [PATCH RFC v2 3/3] crypto: Introduce SM9 key exchange algorithm
@ 2023-06-24  4:00 kernel test robot
  0 siblings, 0 replies; 6+ messages in thread
From: kernel test robot @ 2023-06-24  4:00 UTC (permalink / raw)
  To: oe-kbuild; +Cc: lkp, Julia Lawall

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
In-Reply-To: <20230619021503.29814-4-guozihua@huawei.com>
References: <20230619021503.29814-4-guozihua@huawei.com>
TO: GUO Zihua <guozihua@huawei.com>

Hi GUO,

[This is a private test report for your RFC patch.]
kernel test robot noticed the following build warnings:

[auto build test WARNING on herbert-cryptodev-2.6/master]
[also build test WARNING on herbert-crypto-2.6/master linus/master v6.4-rc7 next-20230623]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/GUO-Zihua/MPI-Export-mpi_add_ui-and-mpi_mod-for-SM9/20230619-101828
base:   https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master
patch link:    https://lore.kernel.org/r/20230619021503.29814-4-guozihua%40huawei.com
patch subject: [PATCH RFC v2 3/3] crypto: Introduce SM9 key exchange algorithm
:::::: branch date: 5 days ago
:::::: commit date: 5 days ago
config: sparc-randconfig-c041-20230623 (https://download.01.org/0day-ci/archive/20230624/202306241100.4kgwh1o4-lkp@intel.com/config)
compiler: sparc64-linux-gcc (GCC) 12.3.0
reproduce: (https://download.01.org/0day-ci/archive/20230624/202306241100.4kgwh1o4-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Julia Lawall <julia.lawall@inria.fr>
| Closes: https://lore.kernel.org/r/202306241100.4kgwh1o4-lkp@intel.com/

cocci warnings: (new ones prefixed by >>)
>> crypto/sm9_lib.c:496:12-15: ERROR: reference preceded by free on line 494
--
>> crypto/sm9.c:257:10-11: WARNING opportunity for kfree_sensitive/kvfree_sensitive (memset at line 256)
   crypto/sm9.c:224:13-14: WARNING opportunity for kfree_sensitive/kvfree_sensitive (memset at line 210)
--
>> crypto/sm9.c:454:11-18: WARNING opportunity for kmemdup
--
>> crypto/sm9_lib.c:975:5-7: Unneeded variable: "rc". Return "  0" on line 981
--
>> crypto/sm9.c:121:8-15: WARNING: kzalloc should be used for 
    
>> 	 data  , instead of kmalloc/memset

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-06-24  4:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-19  2:15 [PATCH RFC v2 0/3] crypto: Introduce SM9 key exchange GUO Zihua
2023-06-19  2:15 ` [PATCH RFC v2 1/3] MPI: Export mpi_add_ui and mpi_mod for SM9 GUO Zihua
2023-06-19  2:15 ` [PATCH RFC v2 2/3] crypto: Introduce SM9 key exchange algorithm library GUO Zihua
2023-06-19  2:15 ` [PATCH RFC v2 3/3] crypto: Introduce SM9 key exchange algorithm GUO Zihua
2023-06-23  7:49   ` kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2023-06-24  4:00 kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.