Skip to contentSkip to conversation

crypto: Introduce ARIA symmetric cipher algorithm

PATCH In review Taehee Yoo 4 participants 10 messages Jul 4, 2022 – Jul 15, 2022

Subsystems (5)
lore
Share & tools
lore

Taehee Yoo

author
#0 lore raw

v2 cover crypto: Introduce ARIA symmetric cipher algorithm

This patchset adds a new ARIA(RFC 5794) symmetric cipher algorithm.

Like SEED, the ARIA is a standard cipher algorithm in South Korea. Especially Government and Banking industry have been using this algorithm. So the implementation of ARIA will be useful for them and network vendors.

Usecases of this algorithm are TLS[1], and IPSec.

It is tested in x86 and MIPS with the tcrypt module.

The first patch is an implementation of ARIA algorithm. The second patch adds tests for ARIA.
The third patch adds ARIA-kTLS feature.

ARIA128-kTLS Benchmark results:
openssl-3.0-dev and iperf-ssl are used.
TLS

[  3]  0.0- 1.0 sec   185 MBytes  1.55 Gbits/sec
[  3]  1.0- 2.0 sec   186 MBytes  1.56 Gbits/sec
[  3]  2.0- 3.0 sec   186 MBytes  1.56 Gbits/sec
[  3]  3.0- 4.0 sec   186 MBytes  1.56 Gbits/sec
[  3]  4.0- 5.0 sec   186 MBytes  1.56 Gbits/sec
[  3]  0.0- 5.0 sec   927 MBytes  1.56 Gbits/sec
  kTLS
[  3]  0.0- 1.0 sec   198 MBytes  1.66 Gbits/sec
[  3]  1.0- 2.0 sec   194 MBytes  1.62 Gbits/sec
[  3]  2.0- 3.0 sec   194 MBytes  1.63 Gbits/sec
[  3]  3.0- 4.0 sec   194 MBytes  1.63 Gbits/sec
[  3]  4.0- 5.0 sec   194 MBytes  1.62 Gbits/sec
[  3]  0.0- 5.0 sec   974 MBytes  1.63 Gbits/sec

The previous patch version[2].

[1] https://datatracker.ietf.org/doc/html/rfc6209
[2] https://www.spinics.net/lists/linux-crypto/msg64704.html

v2:
- Add ARIA-kTLS feature.

Taehee Yoo (3):
crypto: Implement ARIA symmetric cipher algorithm
crypto: add ARIA testmgr tests
net: tls: Add ARIA-GCM algorithm

 crypto/Kconfig           |   15 +
 crypto/Makefile          |    1 +
 crypto/aria.c            |  288 ++++
 crypto/tcrypt.c          |   38 +-
 crypto/testmgr.c         |   31 +
 crypto/testmgr.h         | 2860 ++++++++++++++++++++++++++++++++++++++
 include/crypto/aria.h    |  461 ++++++
 include/uapi/linux/tls.h |   30 +
 net/tls/tls_main.c       |   62 +
 net/tls/tls_sw.c         |   34 +
 10 files changed, 3819 insertions(+), 1 deletion(-)
 create mode 100644 crypto/aria.c
 create mode 100644 include/crypto/aria.h
Signature · 1 line
2.17.1
author
#1 lore raw

PATCH v2 1/3 crypto: Implement ARIA symmetric cipher algorithm

ARIA(RFC 5794) is a symmetric block cipher algorithm.
This algorithm is being used widely in South Korea as a standard cipher algorithm.
This code is written based on the ARIA implementation of OpenSSL. The OpenSSL code is based on the distributed source code[1] by KISA.

ARIA has three key sizes and corresponding rounds.
ARIA128: 12 rounds.
ARIA192: 14 rounds.
ARIA245: 16 rounds.

[1] https://seed.kisa.or.kr/kisa/Board/19/detailView.do (Korean)

---

v2:
- No changed

 crypto/Kconfig        |  15 ++
 crypto/Makefile       |   1 +
 crypto/aria.c         | 288 ++++++++++++++++++++++++++
 include/crypto/aria.h | 461 ++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 765 insertions(+)
 create mode 100644 crypto/aria.c
 create mode 100644 include/crypto/aria.h
crypto/Kconfig +15 -0
index 1d44893a997b..03cc8a9e8908 100644
@@ -1489,6 +1489,21 @@ config CRYPTO_SEED
 	  See also:
 	  <http://www.kisa.or.kr/kisa/seed/jsp/seed_eng.jsp>
 
+config CRYPTO_ARIA
+	tristate "ARIA cipher algorithm"
+	select CRYPTO_ALGAPI
+	help
+	  ARIA cipher algorithm (RFC5794).
+
+	  ARIA is a standard encryption algorithm of the Republic of Korea.
+	  The ARIA specifies three key sizes and rounds.
+	  128-bit: 12 rounds.
+	  192-bit: 14 rounds.
+	  256-bit: 16 rounds.
+
+	  See also:
+	  <https://seed.kisa.or.kr/kisa/algorithm/EgovAriaInfo.do>
+
 config CRYPTO_SERPENT
 	tristate "Serpent cipher algorithm"
 	select CRYPTO_ALGAPI
crypto/Makefile +1 -0
index ceaaa9f34145..dfa3e1cdd30c 100644
@@ -147,6 +147,7 @@ obj-$(CONFIG_CRYPTO_TEA) += tea.o
 obj-$(CONFIG_CRYPTO_KHAZAD) += khazad.o
 obj-$(CONFIG_CRYPTO_ANUBIS) += anubis.o
 obj-$(CONFIG_CRYPTO_SEED) += seed.o
+obj-$(CONFIG_CRYPTO_ARIA) += aria.o
 obj-$(CONFIG_CRYPTO_CHACHA20) += chacha_generic.o
 obj-$(CONFIG_CRYPTO_POLY1305) += poly1305_generic.o
 obj-$(CONFIG_CRYPTO_DEFLATE) += deflate.o
crypto/aria.c new file +288 -0

288 lines not on this page · raw message

include/crypto/aria.h new file +461 -0

461 lines not on this page · raw message

Signature · 1 line
2.17.1
author
#2 lore raw

PATCH v2 2/3 crypto: add ARIA testmgr tests

In reply to Taehee Yoo

It contains ARIA ecb(aria), cbc(aria), cfb(aria), ctr(aria), and gcm(aria). ecb testvector is from RFC standard.
cbc, cfb, and ctr testvectors are from KISA[1], who developed ARIA algorithm.
gcm(aria) is from openssl test vector.

[1] https://seed.kisa.or.kr/kisa/kcmvp/EgovVerification.do (Korean)

---

v2:
- No changed

 crypto/tcrypt.c  |   38 +-
 crypto/testmgr.c |   31 +
 crypto/testmgr.h | 2860 ++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 2928 insertions(+), 1 deletion(-)
crypto/tcrypt.c +37 -1
index 2bacf8384f59..835159555e69 100644
@@ -71,7 +71,7 @@ static const char *check[] = {
 	"blowfish", "twofish", "serpent", "sha384", "sha512", "md4", "aes",
 	"cast6", "arc4", "michael_mic", "deflate", "crc32c", "tea", "xtea",
 	"khazad", "wp512", "wp384", "wp256", "xeta",  "fcrypt",
-	"camellia", "seed", "rmd160",
+	"camellia", "seed", "rmd160", "aria",
 	"lzo", "lzo-rle", "cts", "sha3-224", "sha3-256", "sha3-384",
 	"sha3-512", "streebog256", "streebog512",
 	NULL
@@ -1729,6 +1729,10 @@ static int do_test(const char *alg, u32 type, u32 mask, int m, u32 num_mb)
 		ret += tcrypt_test("ccm(sm4)");
 		break;
 
+	case 57:
+		ret += tcrypt_test("gcm(aria)");
+		break;
+
 	case 100:
 		ret += tcrypt_test("hmac(md5)");
 		break;
@@ -1865,6 +1869,12 @@ static int do_test(const char *alg, u32 type, u32 mask, int m, u32 num_mb)
 		ret += tcrypt_test("cfb(sm4)");
 		ret += tcrypt_test("ctr(sm4)");
 		break;
+	case 192:
+		ret += tcrypt_test("ecb(aria)");
+		ret += tcrypt_test("cbc(aria)");
+		ret += tcrypt_test("cfb(aria)");
+		ret += tcrypt_test("ctr(aria)");
+		break;
 	case 200:
 		test_cipher_speed("ecb(aes)", ENCRYPT, sec, NULL, 0,
 				speed_template_16_24_32);
@@ -2186,6 +2196,32 @@ static int do_test(const char *alg, u32 type, u32 mask, int m, u32 num_mb)
 				   16, 16, aead_speed_template_19, num_mb);
 		break;
 
+	case 226:
+		test_cipher_speed("ecb(aria)", ENCRYPT, sec, NULL, 0,
+				  speed_template_16_24_32);
+		test_cipher_speed("ecb(aria)", DECRYPT, sec, NULL, 0,
+				  speed_template_16_24_32);
+		test_cipher_speed("cbc(aria)", ENCRYPT, sec, NULL, 0,
+				  speed_template_16_24_32);
+		test_cipher_speed("cbc(aria)", DECRYPT, sec, NULL, 0,
+				  speed_template_16_24_32);
+		test_cipher_speed("cfb(aria)", ENCRYPT, sec, NULL, 0,
+				  speed_template_16_24_32);
+		test_cipher_speed("cfb(aria)", DECRYPT, sec, NULL, 0,
+				  speed_template_16_24_32);
+		test_cipher_speed("ctr(aria)", ENCRYPT, sec, NULL, 0,
+				  speed_template_16_24_32);
+		test_cipher_speed("ctr(aria)", DECRYPT, sec, NULL, 0,
+				  speed_template_16_24_32);
+		break;
+
+	case 227:
+		test_aead_speed("gcm(aria)", ENCRYPT, sec,
+				NULL, 0, 16, 8, speed_template_16_24_32);
+		test_aead_speed("gcm(aria)", DECRYPT, sec,
+				NULL, 0, 16, 8, speed_template_16_24_32);
+		break;
+
 	case 300:
 		if (alg) {
 			test_hash_speed(alg, sec, generic_hash_speed_template);
crypto/testmgr.c +31 -0
index 5801a8f9f713..14bb5fa6adc5 100644
@@ -4412,6 +4412,12 @@ static const struct alg_test_desc alg_test_descs[] = {
 		.suite = {
 			.cipher = __VECS(anubis_cbc_tv_template)
 		},
+	}, {
+		.alg = "cbc(aria)",
+		.test = alg_test_skcipher,
+		.suite = {
+			.cipher = __VECS(aria_cbc_tv_template)
+		},
 	}, {
 		.alg = "cbc(blowfish)",
 		.test = alg_test_skcipher,
@@ -4529,6 +4535,12 @@ static const struct alg_test_desc alg_test_descs[] = {
 		.suite = {
 			.cipher = __VECS(aes_cfb_tv_template)
 		},
+	}, {
+		.alg = "cfb(aria)",
+		.test = alg_test_skcipher,
+		.suite = {
+			.cipher = __VECS(aria_cfb_tv_template)
+		},
 	}, {
 		.alg = "cfb(sm4)",
 		.test = alg_test_skcipher,
@@ -4598,6 +4610,12 @@ static const struct alg_test_desc alg_test_descs[] = {
 		.suite = {
 			.cipher = __VECS(aes_ctr_tv_template)
 		}
+	}, {
+		.alg = "ctr(aria)",
+		.test = alg_test_skcipher,
+		.suite = {
+			.cipher = __VECS(aria_ctr_tv_template)
+		}
 	}, {
 		.alg = "ctr(blowfish)",
 		.test = alg_test_skcipher,
@@ -4858,6 +4876,12 @@ static const struct alg_test_desc alg_test_descs[] = {
 		.suite = {
 			.cipher = __VECS(arc4_tv_template)
 		}
+	}, {
+		.alg = "ecb(aria)",
+		.test = alg_test_skcipher,
+		.suite = {
+			.cipher = __VECS(aria_tv_template)
+		}
 	}, {
 		.alg = "ecb(blowfish)",
 		.test = alg_test_skcipher,
@@ -5074,6 +5098,13 @@ static const struct alg_test_desc alg_test_descs[] = {
 		.suite = {
 			.aead = __VECS(aes_gcm_tv_template)
 		}
+	}, {
+		.alg = "gcm(aria)",
+		.generic_driver = "gcm_base(ctr(aria-generic),ghash-generic)",
+		.test = alg_test_aead,
+		.suite = {
+			.aead = __VECS(aria_gcm_tv_template)
+		}
 	}, {
 		.alg = "gcm(sm4)",
 		.generic_driver = "gcm_base(ctr(sm4-generic),ghash-generic)",
crypto/testmgr.h +2860 -0

2,866 lines not on this page · raw message

Signature · 1 line
2.17.1
author
#3 lore raw

PATCH v2 3/3 net: tls: Add ARIA-GCM algorithm

In reply to Taehee Yoo

RFC 6209 describes ARIA for TLS 1.2. ARIA-128-GCM and ARIA-256-GCM are defined in RFC 6209.

This patch would offer performance increment and an opportunity for hardware offload.

Benchmark results:
openssl-3.0-dev and iperf-ssl are used.
TLS

[  3]  0.0- 1.0 sec   185 MBytes  1.55 Gbits/sec
[  3]  1.0- 2.0 sec   186 MBytes  1.56 Gbits/sec
[  3]  2.0- 3.0 sec   186 MBytes  1.56 Gbits/sec
[  3]  3.0- 4.0 sec   186 MBytes  1.56 Gbits/sec
[  3]  4.0- 5.0 sec   186 MBytes  1.56 Gbits/sec
[  3]  0.0- 5.0 sec   927 MBytes  1.56 Gbits/sec
  kTLS
[  3]  0.0- 1.0 sec   198 MBytes  1.66 Gbits/sec
[  3]  1.0- 2.0 sec   194 MBytes  1.62 Gbits/sec
[  3]  2.0- 3.0 sec   194 MBytes  1.63 Gbits/sec
[  3]  3.0- 4.0 sec   194 MBytes  1.63 Gbits/sec
[  3]  4.0- 5.0 sec   194 MBytes  1.62 Gbits/sec
[  3]  0.0- 5.0 sec   974 MBytes  1.63 Gbits/sec

---

v2:
- patch added.

 include/uapi/linux/tls.h | 30 +++++++++++++++++++
 net/tls/tls_main.c       | 62 ++++++++++++++++++++++++++++++++++++++++
 net/tls/tls_sw.c         | 34 ++++++++++++++++++++++
 3 files changed, 126 insertions(+)
include/uapi/linux/tls.h +30 -0
index ac39328eabe7..de3cdfaecf78 100644
@@ -99,6 +99,20 @@
 #define TLS_CIPHER_SM4_CCM_TAG_SIZE		16
 #define TLS_CIPHER_SM4_CCM_REC_SEQ_SIZE		8
 
+#define TLS_CIPHER_ARIA_GCM_128				57
+#define TLS_CIPHER_ARIA_GCM_128_IV_SIZE			8
+#define TLS_CIPHER_ARIA_GCM_128_KEY_SIZE		16
+#define TLS_CIPHER_ARIA_GCM_128_SALT_SIZE		4
+#define TLS_CIPHER_ARIA_GCM_128_TAG_SIZE		16
+#define TLS_CIPHER_ARIA_GCM_128_REC_SEQ_SIZE		8
+
+#define TLS_CIPHER_ARIA_GCM_256				58
+#define TLS_CIPHER_ARIA_GCM_256_IV_SIZE			8
+#define TLS_CIPHER_ARIA_GCM_256_KEY_SIZE		32
+#define TLS_CIPHER_ARIA_GCM_256_SALT_SIZE		4
+#define TLS_CIPHER_ARIA_GCM_256_TAG_SIZE		16
+#define TLS_CIPHER_ARIA_GCM_256_REC_SEQ_SIZE		8
+
 #define TLS_SET_RECORD_TYPE	1
 #define TLS_GET_RECORD_TYPE	2
 
@@ -155,6 +169,22 @@ struct tls12_crypto_info_sm4_ccm {
 	unsigned char rec_seq[TLS_CIPHER_SM4_CCM_REC_SEQ_SIZE];
 };
 
+struct tls12_crypto_info_aria_gcm_128 {
+	struct tls_crypto_info info;
+	unsigned char iv[TLS_CIPHER_ARIA_GCM_128_IV_SIZE];
+	unsigned char key[TLS_CIPHER_ARIA_GCM_128_KEY_SIZE];
+	unsigned char salt[TLS_CIPHER_ARIA_GCM_128_SALT_SIZE];
+	unsigned char rec_seq[TLS_CIPHER_ARIA_GCM_128_REC_SEQ_SIZE];
+};
+
+struct tls12_crypto_info_aria_gcm_256 {
+	struct tls_crypto_info info;
+	unsigned char iv[TLS_CIPHER_ARIA_GCM_256_IV_SIZE];
+	unsigned char key[TLS_CIPHER_ARIA_GCM_256_KEY_SIZE];
+	unsigned char salt[TLS_CIPHER_ARIA_GCM_256_SALT_SIZE];
+	unsigned char rec_seq[TLS_CIPHER_ARIA_GCM_256_REC_SEQ_SIZE];
+};
+
 enum {
 	TLS_INFO_UNSPEC,
 	TLS_INFO_VERSION,
net/tls/tls_main.c +62 -0

74 lines not on this page · raw message

net/tls/tls_sw.c +34 -0
index 0513f82b8537..5094371f8f09 100644
@@ -2417,6 +2417,40 @@ int tls_set_sw_offload(struct sock *sk, struct tls_context *ctx, int tx)
 		cipher_name = "ccm(sm4)";
 		break;
 	}
+	case TLS_CIPHER_ARIA_GCM_128: {
+		struct tls12_crypto_info_aria_gcm_128 *aria_gcm_128_info;
+
+		aria_gcm_128_info = (void *)crypto_info;
+		nonce_size = TLS_CIPHER_ARIA_GCM_128_IV_SIZE;
+		tag_size = TLS_CIPHER_ARIA_GCM_128_TAG_SIZE;
+		iv_size = TLS_CIPHER_ARIA_GCM_128_IV_SIZE;
+		iv = aria_gcm_128_info->iv;
+		rec_seq_size = TLS_CIPHER_ARIA_GCM_128_REC_SEQ_SIZE;
+		rec_seq = aria_gcm_128_info->rec_seq;
+		keysize = TLS_CIPHER_ARIA_GCM_128_KEY_SIZE;
+		key = aria_gcm_128_info->key;
+		salt = aria_gcm_128_info->salt;
+		salt_size = TLS_CIPHER_ARIA_GCM_128_SALT_SIZE;
+		cipher_name = "gcm(aria)";
+		break;
+	}
+	case TLS_CIPHER_ARIA_GCM_256: {
+		struct tls12_crypto_info_aria_gcm_256 *gcm_256_info;
+
+		gcm_256_info = (void *)crypto_info;
+		nonce_size = TLS_CIPHER_ARIA_GCM_256_IV_SIZE;
+		tag_size = TLS_CIPHER_ARIA_GCM_256_TAG_SIZE;
+		iv_size = TLS_CIPHER_ARIA_GCM_256_IV_SIZE;
+		iv = gcm_256_info->iv;
+		rec_seq_size = TLS_CIPHER_ARIA_GCM_256_REC_SEQ_SIZE;
+		rec_seq = gcm_256_info->rec_seq;
+		keysize = TLS_CIPHER_ARIA_GCM_256_KEY_SIZE;
+		key = gcm_256_info->key;
+		salt = gcm_256_info->salt;
+		salt_size = TLS_CIPHER_ARIA_GCM_256_SALT_SIZE;
+		cipher_name = "gcm(aria)";
+		break;
+	}
 	default:
 		rc = -EINVAL;
 		goto free_priv;
Signature · 1 line
2.17.1
maintainer
#4 lore raw

Re: [PATCH v2 3/3] net: tls: Add ARIA-GCM algorithm

Quoted 5 lines · On Mon, 4 Jul 2022 09:42:50 +0000 Taehee Yoo wrote:

RFC 6209 describes ARIA for TLS 1.2. ARIA-128-GCM and ARIA-256-GCM are defined in RFC 6209.

This patch would offer performance increment and an opportunity for hardware offload.

Is it okay if you send the crypto patches now and the TLS support after the merge window? They go via different trees and we can't take the TLS patches until we get the crypto stuff in net-next. We could work something out and create a stable branch that both Herbert and us would pull but we're getting close to the merge window, perhaps we can just wait?

maintainer
#5 lore raw

Re: [PATCH v2 3/3] net: tls: Add ARIA-GCM algorithm

Quoted 7 lines · Jakub Kicinski

Is it okay if you send the crypto patches now and the TLS support after the merge window? They go via different trees and we can't take the TLS patches until we get the crypto stuff in net-next. We could work something out and create a stable branch that both Herbert and us would pull but we're getting close to the merge window, perhaps we can just wait?

I need to know that you guys will take the network part of the patch in order to accept the crypto part. We don't add algorithms with no in-kernel users.

As long as you are happy to take the TLS part later, we can add the crypto parts right now.

Thanks,

Signature · 3 lines
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
maintainer
#6 lore raw

Re: [PATCH v2 3/3] net: tls: Add ARIA-GCM algorithm

Quoted 3 lines · On Tue, 5 Jul 2022 12:29:02 +0800 Herbert Xu wrote:

I need to know that you guys will take the network part of the patch in order to accept the crypto part. We don't add algorithms with no in-kernel users.

GTK, I thought maybe using crypto sockets is enough of a reason.

Quoted 2 lines

As long as you are happy to take the TLS part later, we can add the crypto parts right now.

Yup, can confirm. I haven't heard of this algo before but the IETF RFC looks legit so we'll take the TLS part.

#7 lore raw
In reply to Taehee Yoo
Quoted 7 lines · Taehee Yoo

This patchset adds a new ARIA(RFC 5794) symmetric cipher algorithm.

Like SEED, the ARIA is a standard cipher algorithm in South Korea. Especially Government and Banking industry have been using this algorithm. So the implementation of ARIA will be useful for them and network vendors.

Usecases of this algorithm are TLS[1], and IPSec.

Is this actually going to be used in the real world, or is this just a PhD thesis sort of thing? There are already way too many random crypto algorithms that are supported in the kernel, and many have been removed due to lack of users -- implying that they should never have been accepted in the first place.

- Eric

author
#8 lore raw

Hi Eric,
Thanks a lot for your review!

Quoted 7 lines · Eric Biggers
Quoted 6 lines · Taehee Yoo

This patchset adds a new ARIA(RFC 5794) symmetric cipher algorithm.

Like SEED, the ARIA is a standard cipher algorithm in South Korea. Especially Government and Banking industry have been using this algorithm. So the implementation of ARIA will be useful for them and network vendors.

Quoted 8 lines
Quoted 1 line

Usecases of this algorithm are TLS[1], and IPSec.

Is this actually going to be used in the real world, or is this just a PhD thesis sort of thing? There are already way too many random crypto algorithms that are supported in the kernel, and many have been removed due to lack of users -- implying that they should never have been accepted in the first place.

- Eric

The ARIA is used as the standard cipher algorithm in South Korea. Therefore the government and companies who want to work with the government should use this algorithm.
The specific usecase is the e-government standard framework[1] in South Korea, which is a standard framework that helps to develop software for the government, It uses ARIA cipher.

Also, the OpenSSL already supports ARIA cipher for TLS so I think we can use ARIA-kTLS with a simple PR.

I think these are good usecases.
This is not just an idea/thesis without usecases.

[1] https://www.egovframe.go.kr/eng/main.do

Thanks a lot!
Taehee Yoo

maintainer
#9 lore raw
In reply to Taehee Yoo
Quoted 44 lines · Taehee Yoo

This patchset adds a new ARIA(RFC 5794) symmetric cipher algorithm.

Like SEED, the ARIA is a standard cipher algorithm in South Korea. Especially Government and Banking industry have been using this algorithm. So the implementation of ARIA will be useful for them and network vendors.

Usecases of this algorithm are TLS[1], and IPSec.

It is tested in x86 and MIPS with the tcrypt module.

The first patch is an implementation of ARIA algorithm. The second patch adds tests for ARIA.
The third patch adds ARIA-kTLS feature.

ARIA128-kTLS Benchmark results:
openssl-3.0-dev and iperf-ssl are used.
TLS

[  3]  0.0- 1.0 sec   185 MBytes  1.55 Gbits/sec
[  3]  1.0- 2.0 sec   186 MBytes  1.56 Gbits/sec
[  3]  2.0- 3.0 sec   186 MBytes  1.56 Gbits/sec
[  3]  3.0- 4.0 sec   186 MBytes  1.56 Gbits/sec
[  3]  4.0- 5.0 sec   186 MBytes  1.56 Gbits/sec
[  3]  0.0- 5.0 sec   927 MBytes  1.56 Gbits/sec
  kTLS
[  3]  0.0- 1.0 sec   198 MBytes  1.66 Gbits/sec
[  3]  1.0- 2.0 sec   194 MBytes  1.62 Gbits/sec
[  3]  2.0- 3.0 sec   194 MBytes  1.63 Gbits/sec
[  3]  3.0- 4.0 sec   194 MBytes  1.63 Gbits/sec
[  3]  4.0- 5.0 sec   194 MBytes  1.62 Gbits/sec
[  3]  0.0- 5.0 sec   974 MBytes  1.63 Gbits/sec

The previous patch version[2].

[1] https://datatracker.ietf.org/doc/html/rfc6209
[2] https://www.spinics.net/lists/linux-crypto/msg64704.html

v2:
- Add ARIA-kTLS feature.

Taehee Yoo (3):
crypto: Implement ARIA symmetric cipher algorithm
crypto: add ARIA testmgr tests
net: tls: Add ARIA-GCM algorithm

Quoted 13 lines
 crypto/Kconfig           |   15 +
 crypto/Makefile          |    1 +
 crypto/aria.c            |  288 ++++
 crypto/tcrypt.c          |   38 +-
 crypto/testmgr.c         |   31 +
 crypto/testmgr.h         | 2860 ++++++++++++++++++++++++++++++++++++++
 include/crypto/aria.h    |  461 ++++++
 include/uapi/linux/tls.h |   30 +
 net/tls/tls_main.c       |   62 +
 net/tls/tls_sw.c         |   34 +
 10 files changed, 3819 insertions(+), 1 deletion(-)
 create mode 100644 crypto/aria.c
 create mode 100644 include/crypto/aria.h

Patches 1-2 applied. Thanks.

Note that I adjusted the tcrypt test numbers to accommodate for other additions.

Cheers,

Signature · 3 lines
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt