LEA (cipher)

{{short description|Republic of Korea national standard block cipher}}

{{Infobox block cipher

| name = LEA

| image = LEA_enc_round_function.png

| caption = LEA encryption round function

| designers = Deukjo Hong, Jung-Keun Lee, Dong-Chan Kim, Daesung Kwon, Kwon Ho Ryu, Dong-Geon Lee

| publish date = 2013

| derived to =

| related to =

| key size = 128, 192, or 256 bits

| block size = 128 bits

| structure = ARX (modular Addition, bitwise Rotation, and bitwise XOR)

| rounds = 24, 28, or 32 (depending on key size)

| cryptanalysis = As of 2019, no successful attack on full-round LEA is known.

}}

The Lightweight Encryption Algorithm (also known as LEA) is a 128-bit block cipher developed by South Korea in 2013 to provide confidentiality in high-speed environments such as big data and cloud computing, as well as lightweight environments such as IoT devices and mobile devices.{{cite book |last1=Hong |first1=Deukjo |last2=Lee |first2=Jung-Keun |last3=Kim |first3=Dong-Chan |last4=Kwon |first4=Daesung |last5=Ryu |first5=Kwon Ho |last6=Lee |first6=Dong-Geon |title=Information Security Applications |chapter=LEA: A 128-Bit Block Cipher for Fast Encryption on Common Processors |series=Lecture Notes in Computer Science |date=2014 |volume=8267 |publisher=Springer International Publishing |isbn=978-3-319-05149-9 |pages=3–27 |doi=10.1007/978-3-319-05149-9_1 |chapter-url=https://link.springer.com/chapter/10.1007/978-3-319-05149-9_1 |language=en}} LEA has three different key lengths: 128, 192, and 256 bits. LEA encrypts data about 1.5 to 2 times faster than AES, the most widely used block cipher in various software environments.

LEA is one of the cryptographic algorithms approved by the Korean Cryptographic Module Validation Program (KCMVP) and is the national standard of Republic of Korea (KS X 3246). LEA is included in the ISO/IEC 29192-2:2019 standard (Information security - Lightweight cryptography - Part 2: Block ciphers).

Specification

The block cipher LEA consisting of ARX operations (modular Addition: \boxplus, bitwise Rotation: \lll, \ggg, and bitwise XOR \oplus) for 32-bit words processes data blocks of 128 bits and has three different key lengths: 128, 192, and 256 bits.

LEA with a 128-bit key, LEA with a 192-bit key, and LEA with a 256-bit key are referred to as “LEA-128”, “LEA-192”, and “LEA-256”, respectively.

The number of rounds is 24 for LEA-128, 28 for LEA-192, and 32 for LEA-256.

=Encryption=

Let P = P[0] \| P[1] \| P[2] \| P[3] be a 128-bit block of plaintext and C = C[0] \| C[1] \| C[2] \| C[3] be a 128-bit block of ciphertext, where P[i] and C[i] ( 0 \le i < 4 ) are 32-bit blocks.

Let K_{i} = K_{i}[0] \| K_{i}[1] \| K_{i}[2] \| K_{i}[3] \| K_{i}[4] \| K_{i}[5] ( 0 \le i < Nr ) be 192-bit round keys, where K_{i}[j] ( 0 \le j < 6 ) are 32-bit blocks.

Here Nr is the number of rounds for the LEA algorithm.

The encryption operation is described as follows:

  1. X_{0}[0] \| X_{0}[1] \| X_{0}[2] \| X_{0}[3] \leftarrow P[0] \| P[1] \| P[2] \| P[3]
  2. for i=0 to Nr - 1
  3. X_{i+1}[0] \leftarrow \left( \left( X_{i}[0] \oplus K_{i}[0] \right) \boxplus \left( X_{i}[1] \oplus K_{i}[1] \right) \right) \lll 9
  4. X_{i+1}[1] \leftarrow \left( \left( X_{i}[1] \oplus K_{i}[2] \right) \boxplus \left( X_{i}[2] \oplus K_{i}[3] \right) \right) \ggg 5
  5. X_{i+1}[2] \leftarrow \left( \left( X_{i}[2] \oplus K_{i}[4] \right) \boxplus \left( X_{i}[3] \oplus K_{i}[5] \right) \right) \ggg 3
  6. X_{i+1}[3] \leftarrow X_{i}[0]
  7. C[0] \| C[1] \| C[2] \| C[3] \leftarrow X_{Nr}[0] \| X_{Nr}[1] \| X_{Nr}[2] \| X_{Nr}[3]

=Decryption=

The decryption operation is as follows:

  1. X_{Nr}[0] \| X_{Nr}[1] \| X_{Nr}[2] \| X_{Nr}[3] \leftarrow C[0] \| C[1] \| C[2] \| C[3]
  2. for i=(Nr-1) down to 0
  3. X_{i}[0] \leftarrow X_{i+1}[3]
  4. X_{i}[1] \leftarrow \left( \left( X_{i+1}[0] \ggg 9 \right) \boxminus \left( X_{i}[0] \oplus K_{i}[0] \right) \right) \oplus K_{i}[1]
  5. X_{i}[2] \leftarrow \left( \left( X_{i+1}[1] \lll 5 \right) \boxminus \left( X_{i}[1] \oplus K_{i}[2] \right) \right) \oplus K_{i}[3]
  6. X_{i}[3] \leftarrow \left( \left( X_{i+1}[2] \lll 3 \right) \boxminus \left( X_{i}[2] \oplus K_{i}[4] \right) \right) \oplus K_{i}[5]
  7. P[0] \| P[1] \| P[2] \| P[3] \leftarrow X_{0}[0] \| X_{0}[1] \| X_{0}[2] \| X_{0}[3]

= Key schedule =

The key schedule of LEA supports 128, 192, and 256-bit keys and outputs 192-bit round keys K_{i} ( 0 \le i < Nr ) for the data processing part.

== Key schedule for LEA-128 ==

Let K = K[0] \| K[1] \| K[2] \| K[3] be a 128-bit key, where K[i] ( 0 \le i < 4 ) are 32-bit blocks.

The key schedule for LEA-128 takes K and four 32-bit constants \delta[i] ( 0 \le i < 4 ) as inputs and outputs twenty-four 192-bit round keys K_{i} ( 0 \le i < 24 ).

The key schedule operation for LEA-128 is as follows:

  1. T[0] \| T[1] \| T[2] \| T[3] \leftarrow K[0] \| K[1] \| K[2] \| K[3]
  2. for i=0 to 23
  3. T[0] \leftarrow \left( T[0] \boxplus \left( \delta[i \mod 4] \lll i \right) \right) \lll 1
  4. T[1] \leftarrow \left( T[1] \boxplus \left( \delta[i \mod 4] \lll \left( i + 1 \right) \right) \right) \lll 3
  5. T[2] \leftarrow \left( T[2] \boxplus \left( \delta[i \mod 4] \lll \left( i + 2 \right) \right) \right) \lll 6
  6. T[3] \leftarrow \left( T[3] \boxplus \left( \delta[i \mod 4] \lll \left( i + 3 \right) \right) \right) \lll 11
  7. K_{i} \leftarrow T[0] \| T[1] \| T[2] \| T[1] \| T[3] \| T[1]

== Key schedule for LEA-192 ==

Let K = K[0] \| K[1] \| K[2] \| K[3] \| K[4] \| K[5] be a 192-bit key, where K[i] ( 0 \le i < 6 ) are 32-bit blocks.

The key schedule for LEA-192 takes K and six 32-bit constants \delta[i] ( 0 \le i < 6 ) as inputs and outputs twenty-eight 192-bit round keys K_{i} ( 0 \le i < 28 ).

The key schedule operation for LEA-192 is as follows:

  1. T[0] \| T[1] \| T[2] \| T[3] \| T[4] \| T[5] \leftarrow K[0] \| K[1] \| K[2] \| K[3] \| K[4] \| K[5]
  2. for i=0 to 27
  3. T[0] \leftarrow \left( T[0] \boxplus \left( \delta[i \mod 6] \lll i \right) \right) \lll 1
  4. T[1] \leftarrow \left( T[1] \boxplus \left( \delta[i \mod 6] \lll \left( i + 1 \right) \right) \right) \lll 3
  5. T[2] \leftarrow \left( T[2] \boxplus \left( \delta[i \mod 6] \lll \left( i + 2 \right) \right) \right) \lll 6
  6. T[3] \leftarrow \left( T[3] \boxplus \left( \delta[i \mod 6] \lll \left( i + 3 \right) \right) \right) \lll 11
  7. T[4] \leftarrow \left( T[4] \boxplus \left( \delta[i \mod 6] \lll \left( i + 4 \right) \right) \right) \lll 13
  8. T[5] \leftarrow \left( T[5] \boxplus \left( \delta[i \mod 6] \lll \left( i + 5 \right) \right) \right) \lll 17
  9. K_{i} \leftarrow T[0] \| T[1] \| T[2] \| T[3] \| T[4] \| T[5]

== Key schedule for LEA-256 ==

Let K = K[0] \| K[1] \| K[2] \| K[3] \| K[4] \| K[5] \| K[6] \| K[7] be a 256-bit key, where K[i] ( 0 \le i < 8 ) are 32-bit blocks.

The key schedule for LEA-192 takes K and eight 32-bit constants \delta[i] ( 0 \le i < 8 ) as inputs and outputs thirty-two 192-bit round keys K_{i} ( 0 \le i < 32 ).

The key schedule operation for LEA-256 is as follows:

  1. T[0] \| T[1] \| T[2] \| T[3] \| T[4] \| T[5] \| T[6] \| T[7] \leftarrow K[0] \| K[1] \| K[2] \| K[3] \| K[4] \| K[5] \| K[6] \| K[7]
  2. for i=0 to 31
  3. T[6i \mod 8] \leftarrow \left( T[6i \mod 8] \boxplus \left( \delta[i \mod 8] \lll i \right) \right) \lll 1
  4. T[6i + 1 \mod 8] \leftarrow \left( T[6i + 1 \mod 8] \boxplus \left( \delta[i \mod 8] \lll \left( i + 1 \right) \right) \right) \lll 3
  5. T[6i + 2 \mod 8] \leftarrow \left( T[6i + 2 \mod 8] \boxplus \left( \delta[i \mod 8] \lll \left( i + 2 \right) \right) \right) \lll 6
  6. T[6i + 3 \mod 8] \leftarrow \left( T[6i + 3 \mod 8] \boxplus \left( \delta[i \mod 8] \lll \left( i + 3 \right) \right) \right) \lll 11
  7. T[6i + 4 \mod 8] \leftarrow \left( T[6i + 4 \mod 8] \boxplus \left( \delta[i \mod 8] \lll \left( i + 4 \right) \right) \right) \lll 13
  8. T[6i + 5 \mod 8] \leftarrow \left( T[6i + 5 \mod 8] \boxplus \left( \delta[i \mod 8] \lll \left( i + 5 \right) \right) \right) \lll 17
  9. K_{i} \leftarrow T[6i \mod 8] \| T[6i + 1 \mod 8] \| T[6i + 2 \mod 8] \| T[6i + 3 \mod 8] \| T[6i + 4 \mod 8] \| T[6i + 5 \mod 8]

== Constant values ==

The eight 32-bit constant values \delta[i] ( 0 \le i < 8 ) used in the key schedule are given in the following table.

class="wikitable" style="margin-left: auto; margin-right:auto; border: none;"

|+Constant values used in the key schedule

i

| style="text-align:center;" | 0

| style="text-align:center;" | 1

| style="text-align:center;" | 2

| style="text-align:center;" | 3

| style="text-align:center;" | 4

| style="text-align:center;" | 5

| style="text-align:center;" | 6

| style="text-align:center;" | 7

\delta[i]

| 0xc3efe9db

| 0x44626b02

| 0x79e27c8a

| 0x78df30ec

| 0x715ea49e

| 0xc785da0a

| 0xe04ef22a

| 0xe5c40957

Security

As of 2019, no successful attack on full-round LEA is known.

As is typical for iterated block ciphers, reduced-round variants have been attacked.

The best published attacks on LEA in the standard attack model (CPA/CCA with unknown key) are boomerang attacks and differential linear attacks.

The security margin to the whole rounds ratio is greater than 37% against various existing cryptanalytic techniques for block ciphers.

class="wikitable" style="margin-left: auto; margin-right:auto; border: none;"

|+Security of LEA-128 (24 rounds)

Attack type

! Attacked rounds

Differential{{cite book |last1=Song |first1=Ling |last2=Huang |first2=Zhangjie |last3=Yang |first3=Qianqian |title=Information Security and Privacy |chapter=Automatic Differential Analysis of ARX Block Ciphers with Application to SPECK and LEA |series=Lecture Notes in Computer Science |date=2016 |volume=9723 |publisher=Springer International Publishing |isbn=978-3-319-40367-0 |pages=379–394 |doi=10.1007/978-3-319-40367-0_24 |chapter-url=https://link.springer.com/chapter/10.1007/978-3-319-40367-0_24 |language=en}}

| style="text-align:center;" | 14

Truncated differential

| style="text-align:center;" | 14

Linear

| style="text-align:center;" | 13

Zero correlation

| style="text-align:center;" | 10

Boomerang

| style="text-align:center;" | 15

Impossible differential

| style="text-align:center;" | 12

Integral

| style="text-align:center;" | 9

Differential linear

| style="text-align:center;" | 15

Related-key differential

| style="text-align:center;" | 13

class="wikitable" style="margin-left: auto; margin-right:auto; border: none;"

|+Security margins of LEA

Block ciphers

! Rounds (Attacked / Total)

! Security margins

style="text-align:center;" | LEA-128

| style="text-align:center;" | 15 / 24

| style="text-align:center;" | 37.50%

style="text-align:center;" | LEA-192

| style="text-align:center;" | 16 / 28

| style="text-align:center;" | 42.85%

style="text-align:center;" | LEA-256

| style="text-align:center;" | 18 / 32

| style="text-align:center;" | 43.75%

Performance

LEA has very good performance in a general-purpose software environment.

In particular, it is possible to encrypt at a rate of about 1.5 to 2 times on average, compared to AES, the most widely used block cipher in various software environments.

The tables below compare the performance of LEA and AES using FELICS (Fair Evaluation of Lightweight Cryptographic Systems),{{cite journal |last1=Dinu |first1=Daniel |last2=Corre |first2=Yann Le |last3=Khovratovich |first3=Dmitry |last4=Perrin |first4=Léo |last5=Großschädl |first5=Johann |last6=Biryukov |first6=Alex |title=Triathlon of lightweight block ciphers for the Internet of things |journal=Journal of Cryptographic Engineering |date=14 July 2018 |volume=9 |issue=3 |pages=283–302 |doi=10.1007/s13389-018-0193-x |s2cid=1578215 |url=https://eprint.iacr.org/2015/209.pdf}} a benchmarking framework for evaluation of software implementations of lightweight cryptographic primitives.

class="wikitable" style="margin-left: auto; margin-right:auto; border: none;"

|+FELICS scenario 1 – Enc. + Dec. + KeySetup / 128-byte CBC-Encryption{{Cite web|url=https://www.cryptolux.org/index.php/FELICS|title=CryptoLUX > FELICS|website=cryptolux.org}} (Code: bytes, RAM: bytes, Time: cycles)

colspan="2" | Platform

! LEA-128

! LEA-192

! LEA-256

! AES-128

rowspan="3" | AVR

| Code

| align="right" | 1,684

| align="right" | 2,010

| align="right" | 2,150

| align="right" | 3,010

RAM

| align="right" | 631

| align="right" | 943

| align="right" | 1,055

| align="right" | 408

Time

| align="right" | 61,020

| align="right" | 80,954

| align="right" | 92,194

| align="right" | 58,248

rowspan="3" | MSP

| Code

| align="right" | 1,130

| align="right" | 1,384

| align="right" | 1,468

| align="right" | 2,684

RAM

| align="right" | 626

| align="right" | 942

| align="right" | 1,046

| align="right" | 408

Time

| align="right" | 47,339

| align="right" | 56,540

| align="right" | 64,001

| align="right" | 86,506

rowspan="3" | ARM

| Code

| align="right" | 472

| align="right" | 536

| align="right" | 674

| align="right" | 3,050

RAM

| align="right" | 684

| align="right" | 968

| align="right" | 1,080

| align="right" | 452

Time

| align="right" | 17,417

| align="right" | 20,640

| align="right" | 24,293

| align="right" | 83,868

class="wikitable" style="margin-left: auto; margin-right:auto; border: none;"

|+FELICS scenario 2 – Enc. / 128-bit CTR-Encryption (Code: bytes, RAM: bytes, Time: cycles)

colspan="2" | Platform

! LEA-128

! LEA-192

! LEA-256

! AES-128

rowspan="3" | AVR

| Code

| align="right" | 906

| align="right" | 1,210

| align="right" | 1,306

| align="right" | 1,246

RAM

| align="right" | 80

| align="right" | 80

| align="right" | 80

| align="right" | 81

Time

| align="right" | 4,023

| align="right" | 4,630

| align="right" | 5,214

| align="right" | 3,408

rowspan="3" | MSP

| Code

| align="right" | 722

| align="right" | 1,014

| align="right" | 1,110

| align="right" | 1,170

RAM

| align="right" | 78

| align="right" | 78

| align="right" | 78

| align="right" | 80

Time

| align="right" | 2,814

| align="right" | 3,242

| align="right" | 3,622

| align="right" | 4,497

rowspan="3" | ARM

| Code

| align="right" | 628

| align="right" | 916

| align="right" | 1,012

| align="right" | 1,348

RAM

| align="right" | 92

| align="right" | 100

| align="right" | 100

| align="right" | 124

Time

| align="right" | 906

| align="right" | 1,108

| align="right" | 1,210

| align="right" | 4,044

Test vectors

Test vectors for LEA for each key length are as follows.

All values are expressed in hexadecimal form.

  • LEA-128
  • Key: 0f 1e 2d 3c 4b 5a 69 78 87 96 a5 b4 c3 d2 e1 f0
  • Plaintext: 10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f
  • Ciphertext: 9f c8 4e 35 28 c6 c6 18 55 32 c7 a7 04 64 8b fd
  • LEA-192
  • Key: 0f 1e 2d 3c 4b 5a 69 78 87 96 a5 b4 c3 d2 e1 f0 f0 e1 d2 c3 b4 a5 96 87
  • Plaintext: 20 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f
  • Ciphertext: 6f b9 5e 32 5a ad 1b 87 8c dc f5 35 76 74 c6 f2
  • LEA-256
  • Key: 0f 1e 2d 3c 4b 5a 69 78 87 96 a5 b4 c3 d2 e1 f0 f0 e1 d2 c3 b4 a5 96 87 78 69 5a 4b 3c 2d 1e 0f
  • Plaintext: 30 31 32 33 34 35 36 37 38 39 3a 3b 3c 3d 3e 3f
  • Ciphertext: d6 51 af f6 47 b1 89 c1 3a 89 00 ca 27 f9 e1 97

Implementations

LEA is free for any use: public or private, commercial or non-commercial.

The source code for distribution of LEA implemented in C, Java, and Python can be downloaded from KISA's website.{{Cite web|url=https://seed.kisa.or.kr/kisa/Board/20/detailView.do|title=KISA 암호이용활성화 - 암호알고리즘 소스코드|website=seed.kisa.or.kr}}

In addition, LEA is contained in Crypto++ library, a free C++ class library of cryptographic schemes.{{Cite web|url=https://www.cryptopp.com/|title=Crypto++ Library 8.2 | Free C++ Class Library of Cryptographic Schemes|website=www.cryptopp.com}}

KCMVP

LEA is one of the cryptographic algorithms approved by the Korean Cryptographic Module Validation Program (KCMVP).{{Cite web|url=https://seed.kisa.or.kr/kisa/kcmvp/EgovSummary.do|title=KISA 암호이용활성화 - 개요|website=seed.kisa.or.kr}}

Standardization

LEA is included in the following standards.

  • KS X 3246, 128-bit block cipher LEA (in Korean){{cite web

|url = https://rra.go.kr/ko/reference/kcsList_view.do?nb_seq=1923&cpage=4&nb_type=6&searchCon=&searchTxt=&sortOrder=

|title = KS X 3246, 128-bit block cipher LEA (in Korean)

|url-status =

|archiveurl =

|archivedate =

}}

  • ISO/IEC 29192-2:2019, Information security - Lightweight cryptography - Part 2: Block ciphers{{cite web

|url = https://www.iso.org/standard/78477.html

|title = ISO/IEC 29192-2:2019, Information security - Lightweight cryptography - Part 2: Block ciphers

|url-status =

|archiveurl =

|archivedate =

}}

References

{{Reflist}}

{{cryptography navbox|block}}

Category:Block ciphers