From: Dongsoo Lee <letrhee@nsr.re.kr>
To: 'David Laight' <David.Laight@ACULAB.COM>,
'Herbert Xu' <herbert@gondor.apana.org.au>,
"'David S. Miller'" <davem@davemloft.net>,
'Jens Axboe' <axboe@kernel.dk>,
'Eric Biggers' <ebiggers@kernel.org>,
"'Theodore Y. Ts'o'" <tytso@mit.edu>,
'Jaegeuk Kim' <jaegeuk@kernel.org>,
'Thomas Gleixner' <tglx@linutronix.de>,
'Ingo Molnar' <mingo@redhat.com>,
'Borislav Petkov' <bp@alien8.de>,
'Dave Hansen' <dave.hansen@linux.intel.com>,
x86@kernel.org, "'H. Peter Anvin'" <hpa@zytor.com>
Cc: linux-crypto@vger.kernel.org, linux-block@vger.kernel.org,
linux-fscrypt@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: RE: [PATCH v6 RESEND 5/5] crypto: LEA block cipher x86_64 optimization
Date: Mon, 15 Jan 2024 14:17:43 +0900 [thread overview]
Message-ID: <000e01da4772$2b2c5360$8184fa20$@nsr.re.kr> (raw)
In-Reply-To: <cbd8de6ff70849a98faf2fd25b065a94@AcuMS.aculab.com>
On Fri, 12 Jan 2024 12:59:56 +0000, David Laight <David.Laight@ACULAB.COM> wrote:
> From: Dongsoo Lee
>> Sent: 12 January 2024 02:29
>>
>> For the x86_64 environment, we use AVX-512F/AVX2/SSE2 instructions.
>> Since LEA uses 128-bit blocks of four 32-bit integers, for optimization,
>> SSE2 encrypts 4 blocks, AVX2 encrypts 4/8 blocks, and AVX-512F encrypts
>> 4/8/16 blocks at a time.
>>
>> Our submission provides a optimized implementation of ECB, CBC
>> decryption, CTR, and XTS cipher operation modes on x86_64 CPUs
>> supporting.
>
> Given you say in 0/0:
>
> The LEA algorithm is a lightweight block cipher that processes data blocks of 128-bits and has three different key lengths, each with a different number of rounds:
>
> Just how big is it ?
> Doesn't look 'lightweight' to me.
>
> David
>
> -
> Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
> Registration No: 1397386 (Wales)
>
Firstly, it's worth mentioning that LEA is an encryption algorithm designed to ensure 128-bit security.
The LEA cipher provides a balance between code size and required memory, allowing for trade-offs with performance. The implementation of LEA that we have submitted is oriented towards achieving optimal performance.
While it's difficult to compare to the most recent implementations of cryptographic algorithms because the test is out of date, you can see the results of a previous FELICS test [1] that implemented LEA for a smaller code size.
For example, a detailed example of skipping the key schedule to reduce memory usage and minimize code size can be found in [2].
Thank you for your interest.
Dongsoo Lee
[1] https://www.cryptolux.org/index.php/FELICS#Results
[2] https://github.com/cryptolu/FELICS/blob/master/block_ciphers/source/ciphers/LEA_128_128_v03/source/encrypt.c
prev parent reply other threads:[~2024-01-15 5:18 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-12 2:28 [PATCH v6 RESEND 0/5] crypto: LEA block cipher implementation Dongsoo Lee
2024-01-12 2:28 ` [PATCH v6 RESEND 1/5] " Dongsoo Lee
2024-01-12 2:28 ` [PATCH v6 RESEND 2/5] crypto: add LEA testmgr tests Dongsoo Lee
2024-01-12 2:28 ` [PATCH v6 RESEND 3/5] blk-crypto: Add LEA-256-XTS blk-crypto support Dongsoo Lee
2024-01-12 2:28 ` [PATCH v6 RESEND 4/5] fscrypt: Add LEA-256-XTS, LEA-256-CTS support Dongsoo Lee
2024-01-12 2:28 ` [PATCH v6 RESEND 5/5] crypto: LEA block cipher x86_64 optimization Dongsoo Lee
2024-01-12 12:59 ` David Laight
2024-01-15 5:17 ` Dongsoo Lee [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='000e01da4772$2b2c5360$8184fa20$@nsr.re.kr' \
--to=letrhee@nsr.re.kr \
--cc=David.Laight@ACULAB.COM \
--cc=axboe@kernel.dk \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=davem@davemloft.net \
--cc=ebiggers@kernel.org \
--cc=herbert@gondor.apana.org.au \
--cc=hpa@zytor.com \
--cc=jaegeuk@kernel.org \
--cc=linux-block@vger.kernel.org \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-fscrypt@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=tytso@mit.edu \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox