Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp46910pxb; Wed, 29 Sep 2021 20:43:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyi3a3RN+dGHR68WJ/Ye7rvq635+WgXtN/IHGCrybDkphhGfH2GoFz1Nxgoq4Rx34pRtHlS X-Received: by 2002:a17:906:3699:: with SMTP id a25mr4050728ejc.452.1632973405211; Wed, 29 Sep 2021 20:43:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632973405; cv=none; d=google.com; s=arc-20160816; b=gPgHS9UrdkUQ7/Eijwdgs9RgLeaShmtiRoM5He/f/HdLfkk+yRi3AmD797g3C9R8C3 64GyQ1Xwh71b9/4eiN1iBKb7j5QLfb4rSQsmUfnZN1OWxOANgekNPF6EdwIO6yUZJxL+ TdSQRvwUkXfn5O4cVODxbGLwHZh56QE0/etDpq6NG52jb5kLb+Z+2XRY3C8t/qdXSqE8 TbbTNq4vK/O/8vLjUc7YZcedgDcg3JhZAoqTIYCQHAb9UBx26T8R+Vc6h9ONgzj1CSHD EUH0wKwhriO68/3W8cExjv5XPUeUHA4o9T0D78O5pR9F7Lf8rsLVA2L7yPJbyEVWSinG 2HPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :to:subject; bh=+rBw0/b1T6tNVH4XtnKrxCHkUHK1kOV7qGtHuDxG0CA=; b=QxHIfdDBuOh2M+HdPte6MEzWY6jODv4zOBTaLI17ipnVikFx169FsAuHihRpYFw0bA 8JIz3q8tbVbKM8MdJCOrQwRa2D2S4XNu0WVSe933Ub3gqubhaH5e1lmkII8SQ4FIkSca Iu7xl6Lp74ZnV9FqhBmCD9+ilmq/1IZfidEj6udC/iUubr1ZDwpfLgBzTPnnOaKtf2Z6 m82U9cj2HtrKYIIvLrH0cGf84RAPLFCgvygCoM1bwbQzlb5USrFeUkEADbLX/qNjrFol 6QD8MAzvA5qoBtW4cMZsCpOXAOW8Y33o85DlZ7Wni0p72n0n9qVgyC2ATtsMuLgpG28f zOog== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 5si1991854ejq.398.2021.09.29.20.43.01; Wed, 29 Sep 2021 20:43:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347830AbhI3DgZ (ORCPT + 99 others); Wed, 29 Sep 2021 23:36:25 -0400 Received: from out30-132.freemail.mail.aliyun.com ([115.124.30.132]:39219 "EHLO out30-132.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347601AbhI3DgY (ORCPT ); Wed, 29 Sep 2021 23:36:24 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R191e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e01424;MF=tianjia.zhang@linux.alibaba.com;NM=1;PH=DS;RN=8;SR=0;TI=SMTPD_---0Uq59mav_1632972878; Received: from B-455UMD6M-2027.local(mailfrom:tianjia.zhang@linux.alibaba.com fp:SMTPD_---0Uq59mav_1632972878) by smtp.aliyun-inc.com(127.0.0.1); Thu, 30 Sep 2021 11:34:39 +0800 Subject: Re: [PATCH] net/tls: support SM4 CCM algorithm To: Vadim Fedorenko , "David S. Miller" , Jakub Kicinski , Boris Pismenny , John Fastabend , Daniel Borkmann , netdev@vger.kernel.org, linux-kernel@vger.kernel.org References: <20210928062843.75283-1-tianjia.zhang@linux.alibaba.com> <1761d06d-0958-7872-04de-cde6ddf8a948@novek.ru> From: Tianjia Zhang Message-ID: <1195374a-a9d4-0431-015b-60d986e29881@linux.alibaba.com> Date: Thu, 30 Sep 2021 11:34:33 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: <1761d06d-0958-7872-04de-cde6ddf8a948@novek.ru> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Vadim, On 9/29/21 5:24 AM, Vadim Fedorenko wrote: > On 28.09.2021 07:28, Tianjia Zhang wrote: >> The IV of CCM mode has special requirements, this patch supports CCM >> mode of SM4 algorithm. >> > Have you tried to connect this implementation to application with > user-space implementation of CCM mode? I wonder just because I have an > issue with AES-CCM Kernel TLS implementation when it's connected to > OpenSSL-driven server, but still have no time to fix it correctly. I did not encounter any issue when using KTLS with AES-CCM algorithm, but the KTLS RX mode on the OpenSSL side does not seem to be supported. I encountered some problems when using the SM4-CCM algorithm of KTLS. Follow the RFC8998 specification, the handshake has been successful, and the first data transmission can be successful. After that, I will encounter the problem of MAC verification failure, but this is issue on the OpenSSL side. because the problem is still being investigated, I have not opened the code for the time being. Cheers, Tianjia