netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vadim Fedorenko <vfedorenko@novek.ru>
To: Tianjia Zhang <tianjia.zhang@linux.alibaba.com>,
	"David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	Boris Pismenny <borisp@nvidia.com>,
	John Fastabend <john.fastabend@gmail.com>,
	Daniel Borkmann <daniel@iogearbox.net>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] net/tls: support SM4 CCM algorithm
Date: Thu, 30 Sep 2021 23:56:13 +0100	[thread overview]
Message-ID: <16a76d3e-910f-4fdf-5b2d-9f3355cce4ca@novek.ru> (raw)
In-Reply-To: <1195374a-a9d4-0431-015b-60d986e29881@linux.alibaba.com>

On 30.09.2021 04:34, Tianjia Zhang wrote:
> 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.
> 
Are you sure that this is an issue on the OpenSSL side? Because absolutely the 
same problem is reported for AES-CCM algo and only when it's offloaded to 
kernel. Looks like encryption of CCM could be broken somehow.

I will try to investigate it a bit later from the AES-CCM side.


  reply	other threads:[~2021-09-30 22:56 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-28  6:28 [PATCH] net/tls: support SM4 CCM algorithm Tianjia Zhang
2021-09-28 12:30 ` patchwork-bot+netdevbpf
2021-09-28 21:24 ` Vadim Fedorenko
2021-09-30  3:34   ` Tianjia Zhang
2021-09-30 22:56     ` Vadim Fedorenko [this message]
2021-10-08  3:24       ` Tianjia Zhang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=16a76d3e-910f-4fdf-5b2d-9f3355cce4ca@novek.ru \
    --to=vfedorenko@novek.ru \
    --cc=borisp@nvidia.com \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=john.fastabend@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=tianjia.zhang@linux.alibaba.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).