Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp5768153rwd; Sun, 18 Jun 2023 19:19:05 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ51VXkEUtibBjgZPRpb1CUDfbInSrbPBc36e+gac7ZCwxArmlZ2cC1hKeAusIHTIu+zIHB9 X-Received: by 2002:a17:902:dac6:b0:1ac:656f:a68d with SMTP id q6-20020a170902dac600b001ac656fa68dmr10676818plx.4.1687141145542; Sun, 18 Jun 2023 19:19:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687141145; cv=none; d=google.com; s=arc-20160816; b=yFDZ+SEWwhq+TFpadVsKn0fwrBba7/2Klqww7b7YJiHFtPV7GTVUKjbldHBDvHq1lP QJfdCWPyEWkhIdfQ8rlUi5v+rNBxQ6sD7krJa7EI5ppiTw4yvPUlU8qouQ6NdSXG09YJ /lvX7IrUXr90Lwj/rbhViF1QQnUYasouhpoIZl9fkRQNGHB7gS0RYa+LtQ+9cyybYoD2 /VrmUYlskRGTx4hQLGoeKTiwCBXGzNR4HsxlYfn4/IpY2ZRR0q9Zia9IJ+qnhMtAxx5u EfKpvuNIDUBCiYdeIH9m7QtORbcKrOb9posLwee0tE7F+gWUIh7EA4QgCgURHEhW9QWW M6eg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=ioXnpkn0Oar+uYD2kW5o7l+YruB02nAhyHh0/XWbjBM=; b=y8R0WEPJvcBET2XNSLDp9YfgX3NZIQzHrHp5gXVyhu9EjkPOpNQXMjVqBB3MLZWnST AN303PDMYJivi/k2jPbbM+SJ3I5uRCmHEh5HCopkSLt77osKXVunXErZwoNR4/44xr4u itOywrs8obH/6DDtqivcPWuM9ioIH01AO+mJ07kPtqh8Q9nbidLRYIP/GfgBp3HQyJcU lmO8e6gz6idr5UjPer2iJa84/wQPmfitXpz1W71O7kY/hBBUVEn+F51Yaed/3/3Qqdml QKVf5siYzchVSLXoJwylLE6y1301hRynziG9UsT7uozhToomVdFAkdBELgiW7GVxdGl4 15vA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m13-20020a170902db0d00b001b3e073e157si13337061plx.125.2023.06.18.19.18.53; Sun, 18 Jun 2023 19:19:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229639AbjFSCQQ (ORCPT + 99 others); Sun, 18 Jun 2023 22:16:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46060 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229566AbjFSCQP (ORCPT ); Sun, 18 Jun 2023 22:16:15 -0400 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5196FE56 for ; Sun, 18 Jun 2023 19:16:05 -0700 (PDT) Received: from dggpemm500024.china.huawei.com (unknown [172.30.72.55]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4Qktdl5QcqzTjvF; Mon, 19 Jun 2023 10:15:23 +0800 (CST) Received: from huawei.com (10.67.175.31) by dggpemm500024.china.huawei.com (7.185.36.203) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Mon, 19 Jun 2023 10:16:01 +0800 From: GUO Zihua To: , CC: Subject: [PATCH RFC v2 0/3] crypto: Introduce SM9 key exchange Date: Mon, 19 Jun 2023 10:15:00 +0800 Message-ID: <20230619021503.29814-1-guozihua@huawei.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.67.175.31] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To dggpemm500024.china.huawei.com (7.185.36.203) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org 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