LEA (암호) 문서 원본 보기
←
LEA (암호)
둘러보기로 이동
검색으로 이동
문서 편집 권한이 없습니다. 다음 이유를 확인해주세요:
요청한 명령은 다음 권한을 가진 사용자에게 제한됩니다:
사용자
.
문서의 원본을 보거나 복사할 수 있습니다.
{{위키데이터 속성 추적}} {{Infobox block cipher | name = LEA | image = LEA_enc_round_function.png | caption = LEA 암호화 라운드 함수 | designers = 홍득조, 이정근, 김동찬, 권대성, 유권호, 이동건 | publish date = 2013 | derived to = | related to = | certification = 대한민국 국가 표준(KS X 3246) <br> ISO/IEC 국제 표준(ISO/IEC 29192-2:2019) | structure = ARX(Addition, Rotation, eXclusive-or) 구조 | block size = 128 비트 | key size = 128/192/256 비트 | rounds = 24/28/32 | cryptanalysis = }} '''LEA'''(Lightweight Encryption Algorithm, 리아)는 빅데이터, 클라우드 등 고속 환경 뿐만 아니라 IoT기기, 모바일기기 등 경량환경에서도 기밀성을 제공하기 위해 2013년에 대한민국이 개발한 128비트 대칭 키 블록 암호 알고리즘으로, 세 종류의 키 길이(128/192/256비트)를 지원한다.<ref name="HLK+13">{{서적 인용 |title=International Workshop on Information Security Applications - WISA 2013 |volume=8267 |chapter=LEA: A 128-bit Block Cipher for Fast Encryption on Common Processors |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 |date=2013 |publisher=Springer/Heidelberg |isbn= |pages=3-27 |doi= |series=Lecture Notes in Computer Science }}</ref> LEA는 범용 컴퓨팅 환경에서 매우 우수한 성능을 보유하고 있다. 특히, 다양한 소프트웨어 환경에서 가장 널리 사용되는 블록 암호인 AES 대비 평균적으로 약 1.5배에서 2배의 속도로 암호화가 가능하다. LEA는 대한민국 국가 표준(KS X 3246)으로 제정된 암호 알고리즘으로 대한민국 암호모듈 검증제도 검증대상 알고리즘 목록에 포함되어 있다. 또한, LEA는 2019년 ISO/IEC의 경량 블록 암호 분야 표준(ISO/IEC 29192-2:2019)으로 제정되었다. == 알고리즘 == LEA는 ARX 구조로 이루어진 블록 암호이다. 블록 길이는 128비트로 고정되어 있으며, 128/192/256비트의 키 길이를 지원한다. LEA는 동일한 라운드 함수를 반복하여 암호화를 하는데, 라운드 수는 키 길이에 따라 24/28/32이다. === 암호화 === 128비트 평문 블록을 <math> P = P[0] \| P[1] \| P[2] \| P[3] </math>, 128비트 암호문 블록을 <math> C = C[0] \| C[1] \| C[2] \| C[3] </math>라 한다. 이때, <math> P[i] </math>와 <math> C[i] </math>(<math> 0 \le i < 4 </math>)는 32비트 블록이다. 그리고 <math> i </math>(<math> 0 \le i < Nr </math>)번째 192비트 라운드 키를 <math> K_{i} = K_{i}[0] \| K_{i}[1] \| K_{i}[2] \| K_{i}[3] \| K_{i}[4] \| K_{i}[5]</math>라 한다. 이때, <math> Nr </math>은 키 길이에 따른 라운드 수이고, <math> K_{i}[j] </math>(<math> 0 \le j < 6 </math>)는 32비트 블록이다. 암호화 과정은 다음과 같다. # <math> X_{0}[0] \| X_{0}[1] \| X_{0}[2] \| X_{0}[3] \leftarrow P[0] \| P[1] \| P[2] \| P[3] </math> # for <math> i=0 </math> to <math> Nr - 1 </math> ## <math> 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 </math> ## <math> 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 </math> ## <math> 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 </math> ## <math> X_{i+1}[3] \leftarrow X_{i}[0] </math> # <math> C[0] \| C[1] \| C[2] \| C[3] \leftarrow X_{Nr}[0] \| X_{Nr}[1] \| X_{Nr}[2] \| X_{Nr}[3] </math> === 복호화 === 복호화 과정은 다음과 같다. # <math> X_{Nr}[0] \| X_{Nr}[1] \| X_{Nr}[2] \| X_{Nr}[3] \leftarrow C[0] \| C[1] \| C[2] \| C[3] </math> # for <math> i=(Nr-1) </math> down to <math> 0 </math> ## <math> X_{i}[0] \leftarrow X_{i+1}[3] </math> ## <math> 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] </math> ## <math> 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] </math> ## <math> 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] </math> # <math> P[0] \| P[1] \| P[2] \| P[3] \leftarrow X_{0}[0] \| X_{0}[1] \| X_{0}[2] \| X_{0}[3] </math> === 키 스케줄 === LEA의 키 스케줄은 128/192/256비트 키를 입력으로 받아 암/복호화에 사용되는 <math> Nr </math>개의 192비트 라운드 키 <math> K_{i} </math>(<math> 0 \le i < Nr </math>)를 출력한다. ==== 128비트 키 스케줄 ==== 128비트 키를 <math> K = K[0] \| K[1] \| K[2] \| K[3] </math>라 한다. 이때, <math> K[i] </math>(<math> 0 \le i < 4 </math>)는 32비트 블록이다. LEA의 128비트 키 스케줄은 128비트 키 <math> K </math>와 네 개의 32비트 상수 <math> \delta[i] </math>(<math> 0 \le i < 4 </math>)를 입력으로 받아 24개의 192비트 라운드 키 <math> K_{i} </math>(<math> 0 \le i < 24 </math>)를 출력한다. 128비트 키 스케줄은 다음과 같다. # <math> T[0] \| T[1] \| T[2] \| T[3] \leftarrow K[0] \| K[1] \| K[2] \| K[3] </math> # for <math> i=0 </math> to <math> 23 </math> ## <math> T[0] \leftarrow \left( T[0] \boxplus \left( \delta[i \mod 4] \lll i \right) \right) \lll 1 </math> ## <math> T[1] \leftarrow \left( T[1] \boxplus \left( \delta[i \mod 4] \lll \left( i + 1 \right) \right) \right) \lll 3 </math> ## <math> T[2] \leftarrow \left( T[2] \boxplus \left( \delta[i \mod 4] \lll \left( i + 2 \right) \right) \right) \lll 6 </math> ## <math> T[3] \leftarrow \left( T[3] \boxplus \left( \delta[i \mod 4] \lll \left( i + 3 \right) \right) \right) \lll 11 </math> ## <math> K_{i} \leftarrow T[0] \| T[1] \| T[2] \| T[1] \| T[3] \| T[1] </math> ==== 192비트 키 스케줄 ==== 192비트 키를 <math> K = K[0] \| K[1] \| K[2] \| K[3] \| K[4] \| K[5] </math>라 한다. 이때, <math> K[i] </math>(<math> 0 \le i < 6 </math>)는 32비트 블록이다. LEA의 192비트 키 스케줄은 192비트 키 <math> K </math>와 여섯 개의 32비트 상수 <math> \delta[i] </math>(<math> 0 \le i < 6 </math>)를 입력으로 받아 28개의 192비트 라운드 키 <math> K_{i} </math>(<math> 0 \le i < 28 </math>)를 출력한다. 192비트 키 스케줄은 다음과 같다. # <math> 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] </math> # for <math> i=0 </math> to <math> 27 </math> ## <math> T[0] \leftarrow \left( T[0] \boxplus \left( \delta[i \mod 6] \lll i \right) \right) \lll 1 </math> ## <math> T[1] \leftarrow \left( T[1] \boxplus \left( \delta[i \mod 6] \lll \left( i + 1 \right) \right) \right) \lll 3 </math> ## <math> T[2] \leftarrow \left( T[2] \boxplus \left( \delta[i \mod 6] \lll \left( i + 2 \right) \right) \right) \lll 6 </math> ## <math> T[3] \leftarrow \left( T[3] \boxplus \left( \delta[i \mod 6] \lll \left( i + 3 \right) \right) \right) \lll 11 </math> ## <math> T[4] \leftarrow \left( T[4] \boxplus \left( \delta[i \mod 6] \lll \left( i + 4 \right) \right) \right) \lll 13 </math> ## <math> T[5] \leftarrow \left( T[5] \boxplus \left( \delta[i \mod 6] \lll \left( i + 5 \right) \right) \right) \lll 17 </math> ## <math> K_{i} \leftarrow T[0] \| T[1] \| T[2] \| T[3] \| T[4] \| T[5] </math> ==== 256비트 키 스케줄 ==== 256비트 키를 <math> K = K[0] \| K[1] \| K[2] \| K[3] \| K[4] \| K[5] \| K[6] \| K[7] </math>라 한다. 이때, <math> K[i] </math>(<math> 0 \le i < 8 </math>)는 32비트 블록이다. LEA의 256비트 키 스케줄은 256비트 키 <math> K </math>와 여덟 개의 32비트 상수 <math> \delta[i] </math>(<math> 0 \le i < 8 </math>)를 입력으로 받아 32개의 192비트 라운드 키 <math> K_{i} </math>(<math> 0 \le i < 32 </math>)를 출력한다. 256비트 키 스케줄은 다음과 같다. # <math> 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] </math> # for <math> i=0 </math> to <math> 31 </math> ## <math> T[6i \mod 8] \leftarrow \left( T[6i \mod 8] \boxplus \left( \delta[i \mod 8] \lll i \right) \right) \lll 1 </math> ## <math> 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 </math> ## <math> 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 </math> ## <math> 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 </math> ## <math> 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 </math> ## <math> 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 </math> ## <math> 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] </math> ==== 키 스케줄 상수 ==== 키 스케줄에서 사용되는 여덟 개의 상수 <math> \delta[i] </math>(<math> 0 \le i < 8 </math>)는 다음과 같다. {| class="wikitable" style="margin-left: auto; margin-right:auto; border: none;" |+키 스케줄 상수 |- ! <math> i </math> | 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 |- ! <math> \delta[i] </math> | <span style="font-family: courier;"> 0xc3efe9db </span> | <span style="font-family: courier;"> 0x44626b02 </span> | <span style="font-family: courier;"> 0x79e27c8a </span> | <span style="font-family: courier;"> 0x78df30ec </span> | <span style="font-family: courier;"> 0x715ea49e </span> | <span style="font-family: courier;"> 0xc785da0a </span> | <span style="font-family: courier;"> 0xe04ef22a </span> | <span style="font-family: courier;"> 0xe5c40957 </span> |} == 안전성 == 2019년까지 전체 라운드 LEA에 대한 공격은 알려진 것이 없고 부분 라운드에 대한 공격만 알려져 있다. 알려진 공격 중에는 boomerang 공격과 differential linear 공격이 가장 효율적인 공격이다. 가장 효율적인 공격에 대해서도 LEA는 모든 키 길이에 대해 37% 이상의 안전성 마진을 가진다. {| class="wikitable" style="margin-left: auto; margin-right:auto; border: none;" |+Security of LEA-128 (24 rounds) |- ! Attack type ! Attacked rounds |- | Differential<ref name="SHY16">{{서적 인용 |title=Australasian Conference on Information Security and Privacy - ACISP 2016 |volume=9723 |chapter=Automatic Differential Analysis of ARX Block Ciphers with Application to SPECK and LEA |last1=Song |first1=Ling |last2=Huang |first2=Zhangjie |last3=Yang |first3=Qianqian |date=2016 |publisher=Springer/Heidelberg |isbn= |pages=379-394 |doi= |series=Lecture Notes in Computer Science }}</ref> | style="text-align:center;" | 14 |- | Truncated differential<ref name=SHY16 /> | style="text-align:center;" | 14 |- | Linear<ref name=HLK+13 /> | style="text-align:center;" | 13 |- | Zero correlation<ref name=HLK+13 /> | style="text-align:center;" | 10 |- | Boomerang<ref name=HLK+13 /> | style="text-align:center;" | 15 |- | Impossible differential<ref name=HLK+13 /> | style="text-align:center;" | 12 |- | Integral<ref name=HLK+13 /> | style="text-align:center;" | 9 |- | Differential linear<ref name=HLK+13 /> | style="text-align:center;" | 15 |- | Related-key differential<ref name=HLK+13 /> | 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% |} == 구현 성능 == LEA는 소프트웨어 환경에서 매우 효율적이다. LEA는 다양한 플랫폼에서 현재 가장 널리 사용되는 블록 암호 중 하나인 AES 대비 평균적으로 약 1.5배에서 2배의 속도로 암호화가 가능하다. 아래 표는 경량 암호 성능 측정 프레임워크 FELICS(Fair Evaluation of Lightweight Cryptographic Systems)<ref name="FELICS">{{서적 인용 |title=Journal of Cryptographic Engineering |volume=9(3) |chapter=Triathlon of lightweight block ciphers for the Internet of things |last1=Dinu |first1=Daniel |last2=Le Corre |first2=Yann |last3=Khovratovich |first3=Dmitry |last4=Perrin |first4=Léo |last5=Großschädl |first5=Johann |last6=Biryukov |first6=Alex |date=2019 |publisher=Springer/Heidelberg |isbn= |pages=283-302 |doi= |series= }}</ref> 에서 LEA와 AES의 성능을 비교한 결과이다. {| class="wikitable" style="margin-left: auto; margin-right:auto; border: none;" |+FELICS scenario 1 – Enc. + Dec. + KeySetup / 128-byte CBC-Encryption<ref name="FELICS_web">{{웹 인용|title=FELICS website|url=https://www.cryptolux.org/index.php/FELICS}}</ref> (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<ref name="FELICS_web" /> (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 |} == 테스트 벡터 == LEA의 암호화 테스트 벡터는 다음과 같다.<ref name="KS_X_3246" /> 모든 값은 16진수로 표현되어 있다. * LEA-128 ** 키: <span style="font-family: courier;"> 0f 1e 2d 3c 4b 5a 69 78 87 96 a5 b4 c3 d2 e1 f0 </span> ** 평문: <span style="font-family: courier;"> 10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f </span> ** 암호문: <span style="font-family: courier;"> 9f c8 4e 35 28 c6 c6 18 55 32 c7 a7 04 64 8b fd </span> * LEA-192 ** 키: <span style="font-family: courier;"> 0f 1e 2d 3c 4b 5a 69 78 87 96 a5 b4 c3 d2 e1 f0 f0 e1 d2 c3 b4 a5 96 87 </span> ** 평문: <span style="font-family: courier;"> 20 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f </span> ** 암호문: <span style="font-family: courier;"> 6f b9 5e 32 5a ad 1b 87 8c dc f5 35 76 74 c6 f2 </span> * LEA-256 ** 키: <span style="font-family: courier;"> 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 </span> ** 평문: <span style="font-family: courier;"> 30 31 32 33 34 35 36 37 38 39 3a 3b 3c 3d 3e 3f </span> ** 암호문: <span style="font-family: courier;"> d6 51 af f6 47 b1 89 c1 3a 89 00 ca 27 f9 e1 97 </span> == 구현 == C, Java, Python으로 구현된 LEA의 배포용 소스코드는 KISA 암호이용활성화 웹페이지에서 다운받을 수 있다.<ref name="LEA_source">{{웹 인용|title=LEA 소스코드|url=https://seed.kisa.or.kr/kisa/Board/20/detailView.do}}</ref> 또한, LEA는 C++ 기반 암복호화 라이브러리 Crypto++에 포함되어 있다.<ref name="LEA_cryptopp">{{웹 인용|title=Crypto++ Library 8.2|url=https://www.cryptopp.com/|확인날짜=2020-06-18|archive-date=2022-05-22|archive-url=https://web.archive.org/web/20220522124553/https://cryptopp.com/|url-status=}}</ref> == 암호모듈 검증제도 == LEA는 2015년 대한민국 암호모듈 검증제도 검증대상 암호알고리즘 목록에 포함되었다.<ref name="KCMVP">{{웹 인용|title=암호모듈검증|url=https://seed.kisa.or.kr/kisa/kcmvp/EgovSummary.do}}</ref> == 표준 == LEA는 아래 표준으로 제정되어 있다. * KS X 3246, 128비트 블록 암호 LEA<ref name="KS_X_3246">{{웹 인용 |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비트 블록 암호 LEA |url-status = |archiveurl = |archivedate = }}</ref> * ISO/IEC 29192-2:2019, ''Information security - Lightweight cryptography - Part 2: Block ciphers''<ref name="ISO_IEC_29192-2">{{웹 인용 |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 = }}</ref> == 각주 == {{각주}} {{블록 암호}} [[분류:블록 암호]]
이 문서에서 사용한 틀:
틀:Infobox block cipher
(
원본 보기
)
틀:각주
(
원본 보기
)
틀:블록 암호
(
원본 보기
)
틀:서적 인용
(
원본 보기
)
틀:웹 인용
(
원본 보기
)
틀:위키데이터 속성 추적
(
원본 보기
)
LEA (암호)
문서로 돌아갑니다.
둘러보기 메뉴
개인 도구
로그인
이름공간
문서
토론
한국어
보기
읽기
원본 보기
역사 보기
더 보기
검색
둘러보기
대문
최근 바뀜
임의의 문서로
미디어위키 도움말
특수 문서 목록
도구
여기를 가리키는 문서
가리키는 글의 최근 바뀜
문서 정보