From: Hannes Reinecke <hare@suse.de>
To: martin.nvme.dev@gmail.com,
John Fastabend <john.fastabend@gmail.com>,
Jakub Kicinski <kuba@kernel.org>,
Sabrina Dubroca <sd@queasysnail.net>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@kernel.org>,
Paolo Abeni <pabeni@redhat.com>, Simon Horman <horms@kernel.org>,
Jonathan Corbet <corbet@lwn.net>,
Shuah Khan <skhan@linuxfoundation.org>,
Randy Dunlap <rdunlap@infradead.org>,
Shuah Khan <shuah@kernel.org>
Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
linux-doc@vger.kernel.org, linux-kselftest@vger.kernel.org,
Hannes Reinecke <hare@kernel.org>, Chuck Lever <cel@kernel.org>,
kernel-tls-handshake@lists.linux.dev,
linux-nvme@lists.infradead.org,
Alistair Francis <alistair.francis@wdc.com>,
Martin Belanger <martin.belanger@dell.com>
Subject: Re: [PATCH net-next v4 4/5] tls: send a KeyUpdate at the record limit and on request
Date: Tue, 3 Nov 2026 08:17:54 +0100 [thread overview]
Message-ID: <3798994b-f252-45d9-80ad-e98932d9c2c0@suse.de> (raw)
In-Reply-To: <20261102-keyupdate-rfc-v4-4-f17419972b9f@gmail.com>
On 11/2/26 5:58 PM, Martin Belanger via B4 Relay wrote:
> From: Martin Belanger <martin.belanger@dell.com>
>
> RFC 9846 section 5.5 requires a key update before the key reaches its
> usage limit, 2^24.5 full-size records for AES-GCM. The limit counts
> records, and only the record layer knows where records start and end.
> Section 4.7.3 also requires a reply to a KeyUpdate with
> update_requested, sent before the next Application Data record. Both
> need a KeyUpdate at an exact position in the record stream.
>
> For a socket with a registered TX secret, send a KeyUpdate before the
> next Application Data record when the key has protected 2^24 records, as
> GnuTLS does, or when the peer asked for one. ChaCha20-Poly1305 has no
> record limit. The KeyUpdate is sent as a handshake record, which closes
> the open data record first. Pending encryptions are then completed, and
> only then is the next key installed.
>
> Add TLS_TX_KEY_UPDATE to send a KeyUpdate now, optionally asking the
> peer to update too. It can only bring a KeyUpdate forward: the record
> limit is enforced either way. Following section 4.7.3, a new request
> to the peer waits for the answer to the previous one, and no more than
> 2^48-1 epochs are used.
>
> Signed-off-by: Martin Belanger <martin.belanger@dell.com>
> ---
> Documentation/networking/tls.rst | 17 +++++
> include/net/tls.h | 5 +-
> include/uapi/linux/tls.h | 1 +
> net/tls/tls.h | 1 +
> net/tls/tls_keyupdate.c | 5 ++
> net/tls/tls_main.c | 38 +++++++++-
> net/tls/tls_sw.c | 160 +++++++++++++++++++++++++++++++++++++++
> 7 files changed, 225 insertions(+), 2 deletions(-)
>
Reviewed-by: Hannes Reinecke <hare@kernel.org>
Cheers,
Hannes
--
Dr. Hannes Reinecke Kernel Storage Architect
hare@suse.de +49 911 74053 688
SUSE Software Solutions GmbH, Frankenstr. 146, 90461 Nürnberg
HRB 36809 (AG Nürnberg), GF: I. Totev, A. McDonald, W. Knoblich
next prev parent reply other threads:[~2026-11-03 7:17 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-02 16:57 [PATCH net-next v4 0/5] tls: perform TLS 1.3 KeyUpdate in the kernel Martin Belanger via B4 Relay
2026-11-02 16:57 ` [PATCH net-next v4 1/5] tls: add HKDF-Expand-Label for the TLS 1.3 key schedule Martin Belanger via B4 Relay
2026-11-02 16:57 ` [PATCH net-next v4 2/5] tls: add socket options to register the traffic secrets Martin Belanger via B4 Relay
2026-11-02 16:58 ` [PATCH net-next v4 3/5] tls: update the RX key when a KeyUpdate is received Martin Belanger via B4 Relay
2026-11-03 7:15 ` Hannes Reinecke
2026-11-03 11:23 ` Martin Belanger
2026-11-02 16:58 ` [PATCH net-next v4 4/5] tls: send a KeyUpdate at the record limit and on request Martin Belanger via B4 Relay
2026-11-03 7:17 ` Hannes Reinecke [this message]
2026-11-02 16:58 ` [PATCH net-next v4 5/5] selftests/tls: add KeyUpdate tests Martin Belanger via B4 Relay
2026-11-02 18:24 ` [PATCH net-next v4 0/5] tls: perform TLS 1.3 KeyUpdate in the kernel Chuck Lever
2026-11-02 19:26 ` Martin Belanger
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=3798994b-f252-45d9-80ad-e98932d9c2c0@suse.de \
--to=hare@suse.de \
--cc=alistair.francis@wdc.com \
--cc=cel@kernel.org \
--cc=corbet@lwn.net \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=hare@kernel.org \
--cc=horms@kernel.org \
--cc=john.fastabend@gmail.com \
--cc=kernel-tls-handshake@lists.linux.dev \
--cc=kuba@kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=martin.belanger@dell.com \
--cc=martin.nvme.dev@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=rdunlap@infradead.org \
--cc=sd@queasysnail.net \
--cc=shuah@kernel.org \
--cc=skhan@linuxfoundation.org \
/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
all inboxes | Powered by JetHome®