Thanks Herbert.
-Danny
On 10/5/24 12:35 AM, Herbert Xu wrote:
On Mon, Sep 23, 2024 at 09:30:37AM -0400, Danny Tsen wrote:
Fix data mismatch over ipsec tunnel encrypted/decrypted with ppc64le AES/GCM
module.
This patch is to fix an issue when simd is not usable that data mismatch
may occur
: fd0e9b3e2ee6 ("crypto: p10-aes-gcm - An accelerated AES/GCM stitched
implementation")
Fixes: cdcecfd9991f ("crypto: p10-aes-gcm - Glue code for AES/GCM stitched
implementation")
Fixes: 45a4672b9a6e2 ("crypto: p10-aes-gcm - Update Kconfig and Makefile")
Signed-off-
Added CRYPTO_SIMD for CRYPTO_AES_GCM_P10.
Fixes: 45a4672b9a6e ("crypto: p10-aes-gcm - Update Kconfig and Makefile")
Signed-off-by: Danny Tsen
---
arch/powerpc/crypto/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/powerpc/crypto/Kconfig b/arch/powe
added.
Fixes: cdcecfd9991f ("crypto: p10-aes-gcm - Glue code for AES/GCM stitched
implementation")
Signed-off-by: Danny Tsen
---
arch/powerpc/crypto/aes-gcm-p10-glue.c | 141 +
1 file changed, 118 insertions(+), 23 deletions(-)
diff --git a/arch/powerpc/cryp
value and
generate the final digest.
Fixes: fd0e9b3e2ee6 ("crypto: p10-aes-gcm - An accelerated AES/GCM stitched
implementation")
Signed-off-by: Danny Tsen
---
arch/powerpc/crypto/aes-gcm-p10.S | 2421 +
1 file changed, 1068 insertions(+), 1353 deletion
Thanks Herbert.
-Danny
On 9/21/24 4:31 AM, Herbert Xu wrote:
On Thu, Sep 19, 2024 at 07:36:37AM -0400, Danny Tsen wrote:
Data mismatch found when testing ipsec tunnel with AES/GCM crypto.
Disabling CRYPTO_AES_GCM_P10 in Kconfig for this feature.
Fixes: fd0e9b3e2ee6 ("crypto: p10-aes-gcm
ES/GCM stitched
implementation")
Fixes: 45a4672b9a6e2 ("crypto: p10-aes-gcm - Update Kconfig and Makefile")
Signed-off-by: Danny Tsen
---
arch/powerpc/crypto/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/powerpc/crypto/Kconfig b/arch/powerpc/crypto/Kconfig
index 09e
Thanks Michael.
On 9/18/24 11:55 PM, Michael Ellerman wrote:
Danny Tsen writes:
Removing CRYPTO_AES_GCM_P10 in Kconfig first so that we can apply the
subsequent patches to fix data mismatch over ipsec tunnel.
This change log needs to stand on its own. ie. it needs to explain what
the problem
Disabling CRYPTO_AES_GCM_P10 in Kconfig first so that we can apply the
subsequent patches to fix data mismatch over ipsec tunnel.
Signed-off-by: Danny Tsen
---
arch/powerpc/crypto/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/powerpc/crypto/Kconfig b/arch/powerpc/crypto
Got it. Thanks.
-Danny
On 9/13/24 8:55 AM, Christophe Leroy wrote:
Le 13/09/2024 à 14:30, Danny Tsen a écrit :
[Vous ne recevez pas souvent de courriers de dt...@linux.ibm.com.
Découvrez pourquoi ceci est important à
https://aka.ms/LearnAboutSenderIdentification ]
Removing
Removing CRYPTO_AES_GCM_P10 in Kconfig first so that we can apply the
subsequent patches to fix data mismatch over ipsec tunnel.
Signed-off-by: Danny Tsen
---
arch/powerpc/crypto/Kconfig | 32
1 file changed, 16 insertions(+), 16 deletions(-)
diff --git a/arch
Yes, checkpath was run.
Not sure what you mean by "some indentation changes.(This can't go with
fixes patch, will just add the noise)"
Thanks.
On 9/13/24 1:22 AM, Kamlesh Gurudasani wrote:
Michael Ellerman writes:
Danny Tsen writes:
This patch is to fix an issue when sim
Hi Michael,
I did think of that. I can try to remove the feature first and apply
the subsequent changes.
Thanks.
-Danny
On 9/12/24 10:00 PM, Michael Ellerman wrote:
Danny Tsen writes:
This patch is to fix an issue when simd is not usable that data mismatch
may occur over ipsec tunnel
smaller footprints and small performance gain.
This patch has been tested with the kernel crypto module tcrypt.ko and
has passed the selftest. The patch is also tested with
CONFIG_CRYPTO_MANAGER_EXTRA_TESTS enabled.
Signed-off-by: Danny Tsen
---
arch/powerpc/crypto/Kconfig|1
Thanks Herbert.
On 5/31/24 5:20 AM, Herbert Xu wrote:
On Thu, May 16, 2024 at 11:19:54AM -0400, Danny Tsen wrote:
This patch series provide X25519 support for ppc64le with a new module
curve25519-ppc64le.
The implementation is based on CRYPTOGAMs perl output from x25519-ppc64.pl.
(see https
Defined CRYPTO_CURVE25519_PPC64 to support X25519 for ppc64le.
Added new module curve25519-ppc64le for X25519.
Signed-off-by: Danny Tsen
---
arch/powerpc/crypto/Kconfig | 11 +++
arch/powerpc/crypto/Makefile | 2 ++
2 files changed, 13 insertions(+)
diff --git a/arch/powerpc/crypto
X25519 core functions to handle scalar multiplication for ppc64le.
Signed-off-by: Danny Tsen
---
arch/powerpc/crypto/curve25519-ppc64le-core.c | 299 ++
1 file changed, 299 insertions(+)
create mode 100644 arch/powerpc/crypto/curve25519-ppc64le-core.c
diff --git a/arch/powerpc
running modprobe
curve25519-ppc64le.
Danny Tsen (3):
X25519 low-level primitives for ppc64le.
X25519 core functions for ppc64le
Update Kconfig and Makefile for ppc64le x25519.
arch/powerpc/crypto/Kconfig | 11 +
arch/powerpc/crypto/Makefile | 2 +
arch
Use the perl output of x25519-ppc64.pl from CRYPTOGAMs
(see https://github.com/dot-asm/cryptogams/) and added four
supporting functions, x25519_fe51_sqr_times, x25519_fe51_frombytes,
x25519_fe51_tobytes and x25519_cswap.
Signed-off-by: Danny Tsen
---
arch/powerpc/crypto/curve25519-ppc64le_asm.S
Hi Andy,
I learned something here. Will fix this. Thanks.
-Danny
On 5/16/24 3:38 AM, Andy Polyakov wrote:
Hi,
+.abiversion 2
I'd prefer that was left to the compiler flags.
Problem is that it's the compiler that is responsible for providing
this directive in the intermediate .s pri
On 5/15/24 11:53 PM, Michael Ellerman wrote:
Hi Danny,
Danny Tsen writes:
Use the perl output of x25519-ppc64.pl from CRYPTOGAMs and added three
supporting functions, x25519_fe51_sqr_times, x25519_fe51_frombytes
and x25519_fe51_tobytes.
For other algorithms we have checked-in the perl
Hi Andy,
Thanks for the info. I should be able to do it. I was hoping an
assembly guru like you can show me some tricks here if there is :)
Thanks.
-Danny
On 5/15/24 8:33 AM, Andy Polyakov wrote:
+static void cswap(fe51 p, fe51 q, unsigned int bit)
+{
+ u64 t, i;
+ u64 c = 0 - (u64)
Hi Andy,
Points taken. And much appreciate for the help.
Thanks.
-Danny
On 5/15/24 3:29 AM, Andy Polyakov wrote:
Hi,
+static void cswap(fe51 p, fe51 q, unsigned int bit)
+{
+ u64 t, i;
+ u64 c = 0 - (u64) bit;
+
+ for (i = 0; i < 5; ++i) {
+ t = c & (p[i] ^ q[i]);
+
See inline.
On 5/15/24 4:06 AM, Andy Polyakov wrote:
Hi,
+SYM_FUNC_START(x25519_fe51_sqr_times)
...
+
+.Lsqr_times_loop:
...
+
+ std 9,16(3)
+ std 10,24(3)
+ std 11,32(3)
+ std 7,0(3)
+ std 8,8(3)
+ bdnz .Lsqr_times_loop
I see no reason for why the stores
Thank you Andy. Will fix this.
On 5/15/24 3:11 AM, Andy Polyakov wrote:
Hi,
Couple of remarks inline.
+# [1] https://www.openssl.org/~appro/cryptogams/
https://github.com/dot-asm/cryptogams/ is arguably better reference.
+SYM_FUNC_START(x25519_fe51_mul)
+.align 5
The goal is to alig
Defined CRYPTO_CURVE25519_PPC64 to support X25519 for ppc64le.
Added new module curve25519-ppc64le for X25519.
Signed-off-by: Danny Tsen
---
arch/powerpc/crypto/Kconfig | 11 +++
arch/powerpc/crypto/Makefile | 2 ++
2 files changed, 13 insertions(+)
diff --git a/arch/powerpc/crypto
X25519 core functions to handle scalar multiplication for ppc64le.
Signed-off-by: Danny Tsen
---
arch/powerpc/crypto/curve25519-ppc64le-core.c | 299 ++
1 file changed, 299 insertions(+)
create mode 100644 arch/powerpc/crypto/curve25519-ppc64le-core.c
diff --git a/arch/powerpc
This patch series provide X25519 support for ppc64le with a new module
curve25519-ppc64le.
The implementation is based on CRYPTOGAMs perl output from x25519-ppc64.pl.
Modified and added 3 supporting functions.
This patch has passed the selftest by running modprobe
curve25519-ppc64le.
Danny Tsen
Use the perl output of x25519-ppc64.pl from CRYPTOGAMs and added three
supporting functions, x25519_fe51_sqr_times, x25519_fe51_frombytes
and x25519_fe51_tobytes.
Signed-off-by: Danny Tsen
---
arch/powerpc/crypto/curve25519-ppc64le_asm.S | 648 +++
1 file changed, 648 insertions
Thanks Herbert.
-Danny
On 1/26/24 4:58 PM, Herbert Xu wrote:
On Tue, Jan 02, 2024 at 03:58:56PM -0500, Danny Tsen wrote:
Relocate all crypto files in vmx driver to arch/powerpc/crypto directory
and remove vmx directory.
drivers/crypto/vmx/aes.c rename to arch/powerpc/crypto/aes.c
drivers
tested
with
CONFIG_CRYPTO_MANAGER_EXTRA_TESTS enabled.
Signed-off-by: Danny Tsen
---
arch/powerpc/crypto/Kconfig | 20 ++
arch/powerpc/crypto/Makefile | 20 +-
.../crypto/vmx => arch/powerpc/crypto}/aes.c | 0
.../vmx => arch/powerpc/crypto}/aes
Still waiting for the CCLA to send to Openssl.
Thanks.
-Danny
On 9/15/23 8:29 AM, Michael Ellerman wrote:
Danny Tsen writes:
Improve AES/XTS performance of 6-way unrolling for PowerPC up
to 17% with tcrypt. This is done by using one instruction,
vpermxor, to replace xor and vsldoi.
The
Thanks Herbert.
-Danny
On 9/15/23 5:41 AM, Herbert Xu wrote:
On Wed, Aug 30, 2023 at 09:49:11AM -0400, Danny Tsen wrote:
Improve AES/XTS performance of 6-way unrolling for PowerPC up
to 17% with tcrypt. This is done by using one instruction,
vpermxor, to replace xor and vsldoi.
The same
Hi Michael,
I just submitted the v2 patch.
Thanks.
-Danny
On 8/29/23 11:37 PM, Michael Ellerman wrote:
Danny Tsen writes:
Improve AES/XTS performance of 6-way unrolling for PowerPC up
to 17% with tcrypt. This is done by using one instruction,
vpermxor, to replace xor and vsldoi.
This
tcrypt.ko and
has passed the selftest. The patch is also tested with
CONFIG_CRYPTO_MANAGER_EXTRA_TESTS enabled.
Signed-off-by: Danny Tsen
---
drivers/crypto/vmx/aesp8-ppc.pl | 141 +---
1 file changed, 92 insertions(+), 49 deletions(-)
diff --git a/drivers/crypto/vmx
CONFIG_CRYPTO_MANAGER_EXTRA_TESTS enabled.
Signed-off-by: Danny Tsen
---
drivers/crypto/vmx/aesp8-ppc.pl | 141 +---
1 file changed, 92 insertions(+), 49 deletions(-)
diff --git a/drivers/crypto/vmx/aesp8-ppc.pl b/drivers/crypto/vmx/aesp8-ppc.pl
index 50a0a18f35da..f729589d792e
Thanks.
-Danny
From: Herbert Xu
Sent: Friday, July 14, 2023 4:49 PM
To: Danny Tsen
Cc: linux-cry...@vger.kernel.org ;
lei...@debian.org ; na...@linux.ibm.com
; ap...@cryptogams.org ;
linux-ker...@vger.kernel.org ;
linuxppc-dev@lists.ozlabs.org ;
m
Defined CRYPTO_CHACHA20_P10 and CRYPTO POLY1305_P10 in Kconfig to
support optimized implementation for Power10 and later CPU.
Added new module driver chacha-p10-crypto and poly1305-p10-crypto.
Signed-off-by: Danny Tsen
---
arch/powerpc/crypto/Kconfig | 26 ++
arch
Signed-off-by: Danny Tsen
---
arch/powerpc/crypto/chacha-p10-glue.c | 221 ++
1 file changed, 221 insertions(+)
create mode 100644 arch/powerpc/crypto/chacha-p10-glue.c
diff --git a/arch/powerpc/crypto/chacha-p10-glue.c
b/arch/powerpc/crypto/chacha-p10-glue.c
new file
Improve overall performance of chacha20 encrypt and decrypt operations
for Power10 or later CPU.
Signed-off-by: Danny Tsen
---
arch/powerpc/crypto/chacha-p10le-8x.S | 842 ++
1 file changed, 842 insertions(+)
create mode 100644 arch/powerpc/crypto/chacha-p10le-8x.S
Signed-off-by: Danny Tsen
---
arch/powerpc/crypto/poly1305-p10-glue.c | 186
1 file changed, 186 insertions(+)
create mode 100644 arch/powerpc/crypto/poly1305-p10-glue.c
diff --git a/arch/powerpc/crypto/poly1305-p10-glue.c
b/arch/powerpc/crypto/poly1305-p10-glue.c
new
improvement for Chacha20/Poly1305
operation.
This patch has been tested with the kernel crypto module tcrypt.ko and
has passed the selftest. The patch is also tested with
CONFIG_CRYPTO_MANAGER_EXTRA_TESTS enabled.
Danny Tsen (5):
An optimized Chacha20 implementation with 8-way unrolling for
Improve overall performance of Poly1305 for Power10 or later CPU.
Signed-off-by: Danny Tsen
---
arch/powerpc/crypto/poly1305-p10le_64.S | 1075 +++
1 file changed, 1075 insertions(+)
create mode 100644 arch/powerpc/crypto/poly1305-p10le_64.S
diff --git a/arch/powerpc
Hi Michael,
It's in IBM repo.
Thanks.
-Danny
On 4/25/23 7:02 AM, Michael Ellerman wrote:
Danny Tsen writes:
This is recommended template to use for IBM copyright.
According to who?
The documentation I've seen specifies "IBM Corp." or "IBM Corporation".
cheers
I was not sure at the time when I use IS_REACHABLE. Will fix it in init
code.
Thanks.
-Danny
On 4/25/23 12:46 AM, Herbert Xu wrote:
On Mon, Apr 24, 2023 at 02:47:26PM -0400, Danny Tsen wrote:
+config CRYPTO_CHACHA20_P10
+ tristate "Ciphers: ChaCha20, XChacha20, XChacha12 (P
Did not notice that. Will do fix it.
Thanks.
-Danny
On 4/25/23 12:44 AM, Herbert Xu wrote:
On Mon, Apr 24, 2023 at 02:47:25PM -0400, Danny Tsen wrote:
+ if (likely(srclen >= POLY1305_BLOCK_SIZE)) {
+ bytes = round_down(srclen, POLY1305_BLOCK_SIZE);
+ u
Got it. Will fix it.
Thanks.
-Danny
On 4/25/23 12:41 AM, Herbert Xu wrote:
On Mon, Apr 24, 2023 at 02:47:23PM -0400, Danny Tsen wrote:
+static int chacha_p10_stream_xor(struct skcipher_request *req,
+const struct chacha_ctx *ctx, const u8 *iv
This is recommended template to use for IBM copyright.
Thanks.
-Danny
On 4/24/23 3:40 PM, Elliott, Robert (Servers) wrote:
+# Copyright 2023- IBM Inc. All rights reserved
I don't think any such entity exists - you probably mean IBM Corporation.
Defined CRYPTO_CHACHA20_P10 and CRYPTO POLY1305_P10 in Kconfig to
support optimized implementation for Power10 and later CPU.
Added new module driver chacha-p10-crypto and poly1305-p10-crypto.
Signed-off-by: Danny Tsen
---
arch/powerpc/crypto/Kconfig | 26 ++
arch
Signed-off-by: Danny Tsen
---
arch/powerpc/crypto/poly1305-p10-glue.c | 186
1 file changed, 186 insertions(+)
create mode 100644 arch/powerpc/crypto/poly1305-p10-glue.c
diff --git a/arch/powerpc/crypto/poly1305-p10-glue.c
b/arch/powerpc/crypto/poly1305-p10-glue.c
new
Signed-off-by: Danny Tsen
---
arch/powerpc/crypto/chacha-p10-glue.c | 223 ++
1 file changed, 223 insertions(+)
create mode 100644 arch/powerpc/crypto/chacha-p10-glue.c
diff --git a/arch/powerpc/crypto/chacha-p10-glue.c
b/arch/powerpc/crypto/chacha-p10-glue.c
new file
Improve overall performance of Poly1305 for Power10 or later CPU.
Signed-off-by: Danny Tsen
---
arch/powerpc/crypto/poly1305-p10le_64.S | 1075 +++
1 file changed, 1075 insertions(+)
create mode 100644 arch/powerpc/crypto/poly1305-p10le_64.S
diff --git a/arch/powerpc
Improve overall performance of chacha20 encrypt and decrypt operations
for Power10 or later CPU.
Signed-off-by: Danny Tsen
---
arch/powerpc/crypto/chacha-p10le-8x.S | 842 ++
1 file changed, 842 insertions(+)
create mode 100644 arch/powerpc/crypto/chacha-p10le-8x.S
improvement for Chacha20/Poly1305
operation.
This patch has been tested with the kernel crypto module tcrypt.ko and
has passed the selftest. The patch is also tested with
CONFIG_CRYPTO_MANAGER_EXTRA_TESTS enabled.
Danny Tsen (5):
An optimized Chacha20 implementation with 8-way unrolling for
Thanks Michael.
-Danny
On 4/14/23 8:08 AM, Michael Ellerman wrote:
Danny Tsen writes:
Remove Power10 dependency in Kconfig and detect Power10 feature at runtime.
... using the existing call to module_cpu_feature_match() :)
Signed-off-by: Danny Tsen
---
arch/powerpc/crypto/Kconfig | 2
Move Power10 feature, PPC_MODULE_FEATURE_P10, definition to be in
arch/powerpc/include/asm/cpufeature.h.
Signed-off-by: Danny Tsen
---
arch/powerpc/crypto/aes-gcm-p10-glue.c | 1 -
arch/powerpc/include/asm/cpufeature.h | 1 +
2 files changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch
Remove Power10 dependency in Kconfig and detect Power10 feature at runtime.
Move PPC_MODULE_FEATURE_P10 definition to be in
arch/powerpc/include/asm/cpufeature.h.
Signed-off-by: Danny Tsen
Danny Tsen (2):
Kconfig: Remove POWER10_CPU dependency.
aes-gcm-p10-glue.c, cpufeature.h: Move Power10
Remove Power10 dependency in Kconfig and detect Power10 feature at runtime.
Signed-off-by: Danny Tsen
---
arch/powerpc/crypto/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/powerpc/crypto/Kconfig b/arch/powerpc/crypto/Kconfig
index 1f8f02b494e1..7113f9355165
On 4/13/23 8:18 AM, Danny Tsen wrote:
Hi Michael,
If I do separate patch for moving PPC_MODULE_FEATURE_P10, this will
break the build since it is currently defined in aes-gcm-p10-glue.c.
And the p10 will be detected when loading the module in
module_cpu_feature_match
it's not P10.
Thanks.
-Danny
On 4/13/23 8:12 AM, Michael Ellerman wrote:
Danny Tsen writes:
Remove Power10 dependency in Kconfig and detect Power10 feature at runtime.
Move PPC_MODULE_FEATURE_P10 definition to be in
arch/powerpc/include/asm/cpufeature.h.
This should be two patches, o
Remove Power10 dependency in Kconfig and detect Power10 feature at runtime.
Move PPC_MODULE_FEATURE_P10 definition to be in
arch/powerpc/include/asm/cpufeature.h.
Signed-off-by: Danny Tsen
---
arch/powerpc/crypto/Kconfig| 2 +-
arch/powerpc/crypto/aes-gcm-p10-glue.c | 1 -
arch
61 matches
Mail list logo