Netdev List
 help / color / mirror / Atom feed
* [PATCH ipsec-next v3 0/2] xfrm: add ARIA algorithm support
@ 2026-11-27  2:04 Hong In-su
  2026-11-27  2:04 ` [PATCH ipsec-next v3 1/2] xfrm: add ARIA CBC and CTR support Hong In-su
  2026-11-27  2:04 ` [PATCH ipsec-next v3 2/2] xfrm: add ARIA GCM support Hong In-su
  0 siblings, 2 replies; 3+ messages in thread
From: Hong In-su @ 2026-11-27  2:04 UTC (permalink / raw)
  To: steffen.klassert, herbert
  Cc: davem, edumazet, kuba, pabeni, horms, sd, netdev, ipsec,
	linux-kernel, his1415

The kernel crypto API already provides ARIA implementations, but XFRM
does not have the corresponding algorithm descriptors.

This series adds support for ARIA CBC, RFC3686 CTR and GCM modes in
XFRM, allowing them to be used for ESP.

Following the feedback on v2, the CBC compatibility alias has been
removed. ARIA GCM support has also been added as a separate patch
after completing testing with strongSwan.

CBC and CTR have been tested with strongSwan. GCM has been tested
with 256-bit ARIA keys and all three ICV lengths (64, 96 and 128 bits).

Both patches pass checkpatch with --strict, and xfrm_algo.o builds
successfully against ipsec-next.

Changes in v3:
- Rebase onto ipsec-next.
- Change the patch prefix from net-next to ipsec-next.
- Remove the CBC compatibility alias.
- Add ARIA GCM support as a separate patch.

Changes in v2:
- Remove the CTR compatibility alias.
- Change the CBC default key length to 128 bits.
- Add a comment explaining the 32-bit nonce in the CTR key length.

v2: https://lore.kernel.org/netdev/20260916023135.26043-1-his1415@pribit.com/
v1: https://lore.kernel.org/netdev/20260909054530.7861-1-his1415@pribit.com/

Hong In-su (2):
  xfrm: add ARIA CBC and CTR support
  xfrm: add ARIA GCM support

 net/xfrm/xfrm_algo.c | 62 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 62 insertions(+)


base-commit: 4d12fa4df5c15cebc587644e84b8f972874e66f1
-- 
2.43.0




^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH ipsec-next v3 1/2] xfrm: add ARIA CBC and CTR support
  2026-11-27  2:04 [PATCH ipsec-next v3 0/2] xfrm: add ARIA algorithm support Hong In-su
@ 2026-11-27  2:04 ` Hong In-su
  2026-11-27  2:04 ` [PATCH ipsec-next v3 2/2] xfrm: add ARIA GCM support Hong In-su
  1 sibling, 0 replies; 3+ messages in thread
From: Hong In-su @ 2026-11-27  2:04 UTC (permalink / raw)
  To: steffen.klassert, herbert
  Cc: davem, edumazet, kuba, pabeni, horms, sd, netdev, ipsec,
	linux-kernel, his1415

The kernel crypto API already provides ARIA implementations, but XFRM
does not have algorithm descriptors for them. Consequently, ARIA cannot
be selected for ESP through XFRM.

Add XFRM algorithm descriptors for CBC and RFC3686 CTR modes using the
existing cbc(aria) and rfc3686(ctr(aria)) crypto algorithms.

The CBC and CTR modes have been tested with IPsec using strongSwan.

Signed-off-by: Hong In-su <his1415@pribit.com>
---
 net/xfrm/xfrm_algo.c | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/net/xfrm/xfrm_algo.c b/net/xfrm/xfrm_algo.c
index 70434495f23f..98ef2c48982a 100644
--- a/net/xfrm/xfrm_algo.c
+++ b/net/xfrm/xfrm_algo.c
@@ -512,6 +512,32 @@ static struct xfrm_algo_desc ealg_list[] = {
 		.sadb_alg_maxbits = 256
 	}
 },
+{
+	.name = "cbc(aria)",
+
+	.uinfo = {
+		.encr = {
+			.geniv = "echainiv",
+			.blockbits = 128,
+			.defkeybits = 128,
+		}
+	},
+
+	.pfkey_supported = 0,
+},
+{
+	.name = "rfc3686(ctr(aria))",
+
+	.uinfo = {
+		.encr = {
+			.geniv = "seqiv",
+			.blockbits = 128,
+			.defkeybits = 160, /* 128-bit key + 32-bit nonce */
+		}
+	},
+
+	.pfkey_supported = 0,
+},
 {
 	.name = "cbc(twofish)",
 	.compat = "twofish",
-- 
2.43.0




^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH ipsec-next v3 2/2] xfrm: add ARIA GCM support
  2026-11-27  2:04 [PATCH ipsec-next v3 0/2] xfrm: add ARIA algorithm support Hong In-su
  2026-11-27  2:04 ` [PATCH ipsec-next v3 1/2] xfrm: add ARIA CBC and CTR support Hong In-su
@ 2026-11-27  2:04 ` Hong In-su
  1 sibling, 0 replies; 3+ messages in thread
From: Hong In-su @ 2026-11-27  2:04 UTC (permalink / raw)
  To: steffen.klassert, herbert
  Cc: davem, edumazet, kuba, pabeni, horms, sd, netdev, ipsec,
	linux-kernel, his1415

The kernel crypto API already supports rfc4106(gcm(aria)), but XFRM
does not have the corresponding algorithm descriptors.

Add XFRM AEAD algorithm descriptors for ARIA GCM with 64-bit, 96-bit
and 128-bit ICV lengths.

Tested with strongSwan using 256-bit ARIA keys and all three
supported ICV lengths.

Signed-off-by: Hong In-su <his1415@pribit.com>
---
 net/xfrm/xfrm_algo.c | 36 ++++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)

diff --git a/net/xfrm/xfrm_algo.c b/net/xfrm/xfrm_algo.c
index 98ef2c48982a..d74f86d4e672 100644
--- a/net/xfrm/xfrm_algo.c
+++ b/net/xfrm/xfrm_algo.c
@@ -82,6 +82,42 @@ static struct xfrm_algo_desc aead_list[] = {
 		.sadb_alg_maxbits = 256
 	}
 },
+{
+	.name = "rfc4106(gcm(aria))",
+
+	.uinfo = {
+		.aead = {
+			.geniv = "seqiv",
+			.icv_truncbits = 64,
+		}
+	},
+
+	.pfkey_supported = 0,
+},
+{
+	.name = "rfc4106(gcm(aria))",
+
+	.uinfo = {
+		.aead = {
+			.geniv = "seqiv",
+			.icv_truncbits = 96,
+		}
+	},
+
+	.pfkey_supported = 0,
+},
+{
+	.name = "rfc4106(gcm(aria))",
+
+	.uinfo = {
+		.aead = {
+			.geniv = "seqiv",
+			.icv_truncbits = 128,
+		}
+	},
+
+	.pfkey_supported = 0,
+},
 {
 	.name = "rfc4309(ccm(aes))",
 
-- 
2.43.0




^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-11-27  2:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-27  2:04 [PATCH ipsec-next v3 0/2] xfrm: add ARIA algorithm support Hong In-su
2026-11-27  2:04 ` [PATCH ipsec-next v3 1/2] xfrm: add ARIA CBC and CTR support Hong In-su
2026-11-27  2:04 ` [PATCH ipsec-next v3 2/2] xfrm: add ARIA GCM support Hong In-su

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox