Thread (59 messages) 59 messages, 11 authors, 2022-09-06

Re: [PATCH 00/31] net/tcp: Add TCP-AO support

From: Leonard Crestez <hidden>
Date: 2022-08-27 08:55:34
Also in: linux-crypto, lkml


On 8/24/22 15:46, Andrew Lunn wrote:
quoted
I think it would make sense to push key validity times and the key selection
policy entirely in the kernel so that it can handle key rotation/expiration
by itself. This way userspace only has to configure the keys and doesn't
have to touch established connections at all.
I know nothing aobut TCP-AO, nor much about kTLS. But doesn't kTLS
have the same issue? Is there anything which can be learnt from kTLS?
Maybe the same mechanisms can be used? No point inventing something
new if you can copy/refactor working code?
quoted
My series has a "flags" field on the key struct where it can filter by IP,
prefix, ifindex and so on. It would be possible to add additional flags for
making the key only valid between certain times (by wall time).
What out for wall clock time, it jumps around in funny ways. Plus the
kernel has no idea what time zone the wall the wall clock is mounted
on is in.
A close equivalent seems to exist in ipsec in the "xfrm_lifetime_cfg" 
struct, specifically the soft/hard expires timers. These are optional 
validity times for each xfrm_state which is equivalent to a "key".

I'm not familiar with how those are used but ipsec usually relies on 
complex userspace daemons for managing xfrm states and policies and 
those daemons should be capable of adding and removing keys based on 
internal timers. Still, the linux kernel supports checking for key 
validity on it's own.

--
Regards,
Leonard
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help