All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net 0/2] net: tls: cover all ciphers with tests
@ 2021-12-06 21:39 Vadim Fedorenko
  2021-12-06 21:39 ` [PATCH net 1/2] selftests: tls: add missing AES-CCM cipher tests Vadim Fedorenko
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Vadim Fedorenko @ 2021-12-06 21:39 UTC (permalink / raw)
  To: David S. Miller, Jakub Kicinski; +Cc: Vadim Fedorenko, netdev

Recent patches to Kernel TLS showed that some ciphers are not covered
with tests. Let's cover missed.

Vadim Fedorenko (2):
  selftests: tls: add missing AES-CCM cipher tests
  selftests: tls: add missing AES256-GCM cipher

 tools/testing/selftests/net/tls.c | 36 +++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)

-- 
2.18.4


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

* [PATCH net 1/2] selftests: tls: add missing AES-CCM cipher tests
  2021-12-06 21:39 [PATCH net 0/2] net: tls: cover all ciphers with tests Vadim Fedorenko
@ 2021-12-06 21:39 ` Vadim Fedorenko
  2021-12-06 21:39 ` [PATCH net 2/2] selftests: tls: add missing AES256-GCM cipher Vadim Fedorenko
  2021-12-08  4:30 ` [PATCH net 0/2] net: tls: cover all ciphers with tests patchwork-bot+netdevbpf
  2 siblings, 0 replies; 4+ messages in thread
From: Vadim Fedorenko @ 2021-12-06 21:39 UTC (permalink / raw)
  To: David S. Miller, Jakub Kicinski; +Cc: Vadim Fedorenko, netdev

Add tests for TLSv1.2 and TLSv1.3 with AES-CCM cipher.

Signed-off-by: Vadim Fedorenko <vfedorenko@novek.ru>
---
 tools/testing/selftests/net/tls.c | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/tools/testing/selftests/net/tls.c b/tools/testing/selftests/net/tls.c
index 8a22db0cca49..fb1bb402ee10 100644
--- a/tools/testing/selftests/net/tls.c
+++ b/tools/testing/selftests/net/tls.c
@@ -31,6 +31,7 @@ struct tls_crypto_info_keys {
 		struct tls12_crypto_info_chacha20_poly1305 chacha20;
 		struct tls12_crypto_info_sm4_gcm sm4gcm;
 		struct tls12_crypto_info_sm4_ccm sm4ccm;
+		struct tls12_crypto_info_aes_ccm_128 aesccm128;
 	};
 	size_t len;
 };
@@ -61,6 +62,11 @@ static void tls_crypto_info_init(uint16_t tls_version, uint16_t cipher_type,
 		tls12->sm4ccm.info.version = tls_version;
 		tls12->sm4ccm.info.cipher_type = cipher_type;
 		break;
+	case TLS_CIPHER_AES_CCM_128:
+		tls12->len = sizeof(struct tls12_crypto_info_aes_ccm_128);
+		tls12->aesccm128.info.version = tls_version;
+		tls12->aesccm128.info.cipher_type = cipher_type;
+		break;
 	default:
 		break;
 	}
@@ -261,6 +267,18 @@ FIXTURE_VARIANT_ADD(tls, 13_sm4_ccm)
 	.cipher_type = TLS_CIPHER_SM4_CCM,
 };
 
+FIXTURE_VARIANT_ADD(tls, 12_aes_ccm)
+{
+	.tls_version = TLS_1_2_VERSION,
+	.cipher_type = TLS_CIPHER_AES_CCM_128,
+};
+
+FIXTURE_VARIANT_ADD(tls, 13_aes_ccm)
+{
+	.tls_version = TLS_1_3_VERSION,
+	.cipher_type = TLS_CIPHER_AES_CCM_128,
+};
+
 FIXTURE_SETUP(tls)
 {
 	struct tls_crypto_info_keys tls12;
-- 
2.18.4


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

* [PATCH net 2/2] selftests: tls: add missing AES256-GCM cipher
  2021-12-06 21:39 [PATCH net 0/2] net: tls: cover all ciphers with tests Vadim Fedorenko
  2021-12-06 21:39 ` [PATCH net 1/2] selftests: tls: add missing AES-CCM cipher tests Vadim Fedorenko
@ 2021-12-06 21:39 ` Vadim Fedorenko
  2021-12-08  4:30 ` [PATCH net 0/2] net: tls: cover all ciphers with tests patchwork-bot+netdevbpf
  2 siblings, 0 replies; 4+ messages in thread
From: Vadim Fedorenko @ 2021-12-06 21:39 UTC (permalink / raw)
  To: David S. Miller, Jakub Kicinski; +Cc: Vadim Fedorenko, netdev

Add tests for TLSv1.2 and TLSv1.3 with AES256-GCM cipher

Signed-off-by: Vadim Fedorenko <vfedorenko@novek.ru>
---
 tools/testing/selftests/net/tls.c | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/tools/testing/selftests/net/tls.c b/tools/testing/selftests/net/tls.c
index fb1bb402ee10..6e468e0f42f7 100644
--- a/tools/testing/selftests/net/tls.c
+++ b/tools/testing/selftests/net/tls.c
@@ -32,6 +32,7 @@ struct tls_crypto_info_keys {
 		struct tls12_crypto_info_sm4_gcm sm4gcm;
 		struct tls12_crypto_info_sm4_ccm sm4ccm;
 		struct tls12_crypto_info_aes_ccm_128 aesccm128;
+		struct tls12_crypto_info_aes_gcm_256 aesgcm256;
 	};
 	size_t len;
 };
@@ -67,6 +68,11 @@ static void tls_crypto_info_init(uint16_t tls_version, uint16_t cipher_type,
 		tls12->aesccm128.info.version = tls_version;
 		tls12->aesccm128.info.cipher_type = cipher_type;
 		break;
+	case TLS_CIPHER_AES_GCM_256:
+		tls12->len = sizeof(struct tls12_crypto_info_aes_gcm_256);
+		tls12->aesgcm256.info.version = tls_version;
+		tls12->aesgcm256.info.cipher_type = cipher_type;
+		break;
 	default:
 		break;
 	}
@@ -279,6 +285,18 @@ FIXTURE_VARIANT_ADD(tls, 13_aes_ccm)
 	.cipher_type = TLS_CIPHER_AES_CCM_128,
 };
 
+FIXTURE_VARIANT_ADD(tls, 12_aes_gcm_256)
+{
+	.tls_version = TLS_1_2_VERSION,
+	.cipher_type = TLS_CIPHER_AES_GCM_256,
+};
+
+FIXTURE_VARIANT_ADD(tls, 13_aes_gcm_256)
+{
+	.tls_version = TLS_1_3_VERSION,
+	.cipher_type = TLS_CIPHER_AES_GCM_256,
+};
+
 FIXTURE_SETUP(tls)
 {
 	struct tls_crypto_info_keys tls12;
-- 
2.18.4


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

* Re: [PATCH net 0/2] net: tls: cover all ciphers with tests
  2021-12-06 21:39 [PATCH net 0/2] net: tls: cover all ciphers with tests Vadim Fedorenko
  2021-12-06 21:39 ` [PATCH net 1/2] selftests: tls: add missing AES-CCM cipher tests Vadim Fedorenko
  2021-12-06 21:39 ` [PATCH net 2/2] selftests: tls: add missing AES256-GCM cipher Vadim Fedorenko
@ 2021-12-08  4:30 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-12-08  4:30 UTC (permalink / raw)
  To: Vadim Fedorenko; +Cc: davem, kuba, netdev

Hello:

This series was applied to netdev/net.git (master)
by Jakub Kicinski <kuba@kernel.org>:

On Tue,  7 Dec 2021 00:39:30 +0300 you wrote:
> Recent patches to Kernel TLS showed that some ciphers are not covered
> with tests. Let's cover missed.
> 
> Vadim Fedorenko (2):
>   selftests: tls: add missing AES-CCM cipher tests
>   selftests: tls: add missing AES256-GCM cipher
> 
> [...]

Here is the summary with links:
  - [net,1/2] selftests: tls: add missing AES-CCM cipher tests
    https://git.kernel.org/netdev/net/c/d76c51f976ed
  - [net,2/2] selftests: tls: add missing AES256-GCM cipher
    https://git.kernel.org/netdev/net/c/13bf99ab2130

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



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

end of thread, other threads:[~2021-12-08  4:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-06 21:39 [PATCH net 0/2] net: tls: cover all ciphers with tests Vadim Fedorenko
2021-12-06 21:39 ` [PATCH net 1/2] selftests: tls: add missing AES-CCM cipher tests Vadim Fedorenko
2021-12-06 21:39 ` [PATCH net 2/2] selftests: tls: add missing AES256-GCM cipher Vadim Fedorenko
2021-12-08  4:30 ` [PATCH net 0/2] net: tls: cover all ciphers with tests patchwork-bot+netdevbpf

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.