Chapter 2 암호 기초.

Slides:



Advertisements
Similar presentations
★질문 1: Pai 가 원하는 것은 할아 버지의 ( ) 과 ( ) 이 다. ★질문 2: Maori 족 선조의 이름과 직업은 ?? ( ), ( ) Attention 관심 Love 사랑 이름 Paikea 직업 the whale rider.
Advertisements

Where God Wants Me 나를 항상 인도해주시는 하나님 Sit back and let the show run by clicking ‘slide show’
Lesson 2 A Caring Friend. Making true friends is hard. Keeping them is even harder. To keep a good friendship, you need to care about others. Then, how.
김예슬 김원석 김세환. Info Northcutt Bikes Northcutt Bikes The Forecasting problem The Forecasting problem The solution 1~6 The.
1 Chap 3. 관용 암호 방식 현대적 기법. 2
2009 년 6 월 28 일 영어 연합예배 설교 English Joint Service: June 28, 2009 성경 : 마 28:16-20 Bible: Mt. 28:16-20 제목 : 삼위일체 하나님의 초청 Title: The God who is the Holy Trinity.
Lesson 11 What’s Your Type? 여러분의 유형은 무엇인가요 ?. What job do you want to have in the future? 여러분은 미래에 어떤 직업을 갖고 싶은가 ? p.218.
이력서 작성법 서강대학교 전자공학과. 이력서 이력서란 ? ◦ 이력서 ( 履歷書 ) a rsum 《미》 ;a personal history[statement];a curriculum vitae 《라》 ;a record of one’s life ◦ 이력 [ 履歷 ] [ 명사.
Chapter 8 현대 대칭키 암호를 이용한 암호화 기법
A: Could you tell me how to make a call from this phone
번역관련 자격증 소개 및 시험 대비 안내 정 윤 희.
부정사의 의미상의 주어 It's more blessed (for people) to give than to receive.
C++ Tutorial 1 서강대학교 데이터베이스 연구실.
Unit 2. No Time for Exercise?
English Communication R/W
소프트웨어란?.
Chapter 7 ARP and RARP.
한반도 정세와 동북아 안보.
플라톤과 유가의 법사상 비교 학기 법제사 발표수업 정호철 (법학전공 4학년).
암호 이야기 - 보이지 않는 전쟁 -.
자바 암호 프로그래밍 Java Cryptography Programming
LISTEN AND UNDERSTAND LISTEN AND SING
Chapter 2 암호 기초.
7장 : 캐시와 메모리.
발표제목 발표제목 둘째 줄 2000년 11월 송 홍 엽 연세대학교 전기전자공학과 송 홍 엽
Chapter 10 네트워크 보안.
제 14 장 < 조 동 사 >.
외국인과 대화를~~ 대학에서 교환학생을~~
08장 암호의 이해: 숨기고자 하는 이들의 싸움.
Chapter 3 Symmetric Key Crypto
외국인과 대화를~~ 대학에서 교환학생을~~
제 14 장 거시경제학의 개관 PowerPoint® Slides by Can Erbil
Chapter 2. Finite Automata Exercises
숭실대학교 마이닝연구실 김완섭 2009년 2월 8일 아이디어  - 상관분석에 대한 연구
계수와 응용 (Counting and Its Applications)
KMS 구현 및 활용사례 경쟁력 강화를 위한 2002년 5월 28일(화) 김 연 홍 상무 / 기술사
Student A Say “I’m going to ask you some questions about The Internet and Technology.” Are you ready?
I부 암호.
진대제 장관이 말하는 '100점짜리 인생의 조건' ▲ 진대제 정보통신부 장관    `인생을 100점짜리로 만들기 위한 조건은 무엇일까요`  진대제 정보통신부 장관이 대한상의 초청 조찬 간담회를 시작하며 참석자 들에게 던진 `조크성` 질문이다. 진 장관은 "제가 재미있는 얘기하나 하겠습니다"고 말하고, 
조동사 must can will would may should.
제5장 조동사 must can will would may should.
이산수학(Discrete Mathematics)  증명 전략 (Proof Strategy)
Write and say bye to friends,
7. Korea in the World One more step, DIY reading 영어 8-b단계
2. CONCEPTS 컴퓨터 네트워크 실험실 석사 1학기 강 동 호.
: 부정(negative)의 의미를 나타내는 접두사
McGraw-Hill Technology Education
Chapter 1 개요.
CEO가 가져야 할 품질 혁신 마인드.
Operating System Multiple Access Chatting Program using Multithread
현상이 아니라 말씀이 때를 알려준다!! Melbourne City Church The Acts of Paul 06
1&2 PETER I 세상소망이 아니라 하늘소망으로 살라!! Melbourne City Church
암호-2장. 암호 기초 ㅎㅎ 정보보호 기능의 가장 핵심적 기술인 암호를 다룬다. 흥미로운 암호의 역사를 소개하고, 고전적인 암호체계로부터 현대적인 디지털 암호체계에 이르는 기술의 발전을 살펴보고 현대의 고급 암호분석 기법을 소개한다. 한빛미디어(주)
평생 간직할 멋진 말 Excellent thought applicable through our whole life
The World of English by George E.K. Whitehead.
Chapter 1 개요.
물질(Matter)의 이론 (사물의 본질에 대한 의문)
1. 관계 데이터 모델 (1) 관계 데이터 모델 정의 ① 논리적인 데이터 모델에서 데이터간의 관계를 기본키(primary key) 와 이를 참조하는 외래키(foreign key)로 표현하는 데이터 모델 ② 개체 집합에 대한 속성 관계를 표현하기 위해 개체를 테이블(table)
• I was touched by my friends’ effort.
이산수학(Discrete Mathematics)  증명 전략 (Proof Strategy)
Presentation by Timothy Kane
Hongik Univ. Software Engineering Laboratory Jin Hyub Lee
Peer-to-Peer SIP Network Using Distributed Hash Table
A SMALL TRUTH TO MAKE LIFE 100%
암호 이야기 수학과 채 갑병.
A SMALL TRUTH TO MAKE LIFE 100%
6.1 Changing the View Point
빈칸에 알맞은 것을 [보기]에서 골라 문장을 완성하시오
Ⓒ Copyright CARROT Global. All Rights Reserved.
Speaking -여섯 번째 강의 (Review ) RACHEL 선생님
Presentation transcript:

Chapter 2 암호 기초

Crypto 암호학(Cryptology) Cryptography 암호 분석(Cryptanalysis) Crypto “비밀 코드”를 만들거나 해독하는 기술과 과학 Cryptography “비밀 코드”를 만드는 법 암호 분석(Cryptanalysis) “비밀 코드”를 해독하는 법 Crypto 위의 모든 것(과 그 이상)을 지칭한다. 암호학(Cryptology) “비밀코드”를 만들거나 해독하는 과학 암호생산(Cryptography) “비밀코드”를 만드는 것 암호분석(Cryptanalysis) “비밀코드”를 해독하는 것 암호(Crypto) 상기한 모든 것 또는 그 이상 Chapter 2 Crypto Basics

암호 체계(Crypto) Key (암호화 키) key Plaintext (평문) plaintext Encrypt (암호화) Decrypt (복호화) Ciphertext (암호문) Chapter 2 Crypto Basics

Crypto에서의 용어들 암호 체계(cipher or cryptosystem) 암호문(ciphertext) 평문 (plaintext)을 암호화(encrypt)하는데 사용 암호문(ciphertext) 암호화된 결과 복호화(decrypt) 암호문을 평문으로 복원 키(key) 암호체계를 만드는데 사용 대칭키(symmetric key) 같은 키를 암호화와 복호화를 위해 사용 공개키(public key) 공개키(public key) 는 암호화, 개인키( private key) 는 복화화에 사용 암호체계는 평문을 암호화 하는데 사용 암호화 결과는 암호문 암호문을 평문으로 복원하는 것은 복호화 키는 암호체계를 만드는데 사용 대칭키 암호체계는 같은 키를 암호화와 복호화를 위해 사용 공개키 암호체계는 공개키는 암호화, 개인키는 복호화(서명)에 사용 Chapter 2 Crypto Basics

Crypto 기본 가정 커크호프의 원칙( Kerckhoffs Principle) 왜 이런 가정을 하는가? 암호체계는 완전히 공격자에게 알려져 있고, 오직 키(Key)만이 유일한 비밀이다. 커크호프의 원칙( Kerckhoffs Principle) 암호 알고리즘은 비밀이 아니다. 왜 이런 가정을 하는가? 경험적으로 볼 때, 비밀 알고리즘들은(공개되었을 때) 알고리즘 자체는 강력하지 않을 경우가 많다. 비밀 알고리즘은 결국 공개된다. 사전에 취약점을 발견하는 것이 유리하다. http://en.wikipedia.org/wiki/Kerckhoffs'_principle In cryptography, Kerckhoffs' principle (also called Kerckhoffs' assumption, axiom or law) was stated by Auguste Kerckhoffs in the 19th century: a cryptosystem should be secure even if everything about the system, except the key, is public knowledge. It was reformulated (perhaps independently) by Claude Shannon as "the enemy knows the system". In that form it is called Shannon's maxim. In contrast to security through obscurity, it is widely embraced by cryptographers. In accordance with Kerckhoffs' principle, the majority of civilian cryptography makes use of publicly-known algorithms. By contrast, ciphers used to protect classified government or military information are often kept secret (see Type 1 encryption). The law was one of six design principles laid down by Kerckhoffs for military ciphers. Translated from French, they are: The system must be practically, if not mathematically, indecipherable; It must not be required to be secret, and it must be able to fall into the hands of the enemy without inconvenience; Its key must be communicable and retainable without the help of written notes, and changeable or modifiable at the will of the correspondents; It must be applicable to telegraphic correspondence; It must be portable, and its usage and function must not require the concourse of several people; Finally, it is necessary, given the circumstances that command its application, that the system be easy to use, requiring neither mental strain nor the knowledge of a long series of rules to observe. Bruce Schneier ties it in with a belief that all security systems must be designed to fail as gracefully as possible: "Kerckhoffs' principle applies beyond codes and ciphers to security systems in general: every secret creates a potential failure point. Secrecy, in other words, is a prime cause of brittleness—and therefore something likely to make a system prone to catastrophic collapse. Conversely, openness provides ductility."[1] It is worth expanding on what Schneier means by brittleness: after all, any security system depends crucially on keeping some things secret. What Schneier means is that the things which are kept secret ought to be those which are least costly to change should they be inadvertently disclosed. A cryptographic algorithm may be implemented by hardware and software which is widely distributed among its users; if security depended on keeping that secret, then disclosure would lead to major logistic headaches in developing, testing and distributing implementations of a new algorithm. Whereas if the secrecy of the algorithm were not important, but only that of the keys used with the algorithm, then disclosure of the keys would require the much less arduous process of generating and distributing new keys. Or in other words, the fewer and simpler the things one needs to keep secret in order to ensure the security of the system, the easier it is to maintain that security. Eric Raymond extends this principle in support of open source software, saying "Any security software design that doesn't assume the enemy possesses the source code is already untrustworthy; therefore, *never trust closed source*. [2] The controversial idea that open-source software is inherently more secure than closed-source is promoted by the concept of security through transparency. It's possible to have a secret cryptosystem while still reaping the benefits of public cryptography research: make a non-weakening change to a public algorithm, like changing the Nothing up my sleeve numbers, or, in the case of Symmetric-key algorithms, chaining the public cipher with an unrelated secret cipher. An example of technology which relies upon a secret cryptosystem is WAPI, the wireless LAN security standard the Chinese government has proposed to encompass civilian uses on a global scale. Chapter 2 Crypto Basics

고전적인 암호 알고리즘 치환 이중 전위(double transposition) 일회성 암호(one-time pad) 코드북(codebook)

단순 치환(Simple Substitution) Plaintext: fourscoreandsevenyearsago Key: Plaintext Ciphertext a b c d e f g h i j k l m n o p q r s t u v w x y z D E F G H I J K L M N O P Q R S T U V W X Y Z A B C Ciphertext: IRXUVFRUHDAGVHYHABHDUVDIR 시저 암호(Caesar’s cipher): 세자리 만큼 이동 Chapter 2 Crypto Basics

시저 암호의 복호화(Decryption) Ciphertext: VSRQJHEREVTXDUHSDQWU Plaintext Ciphertext a b c d e f g h i j k l m n o p q r s t u v w x y z D E F G H I J K L M N O P Q R S T U V W X Y Z A B C Plaintext: spongebobsquarepants Chapter 2 Crypto Basics

단순하지 않은 치환 n 만큼 이동, n  {0,1,2,…,25} 키(key)는 n 예: key = 7 Plaintext Ciphertext a b c d e f g h i j k l m n o p q r s t u v w x y z H I J K L M N O P Q R S T U V W X Y Z A B C D E F G Chapter 2 Crypto Basics

암호 분석(Cryptanalysis) I: 모든 경우를 시도한다 주어진 조건 단순 치환 사용 (n만큼 이동) 그러나 키는 알려져 있지 않다. 주어진 암호문: meqefscerhcsyeviekmvp 어떻게 키를 찾을 것인가? Exhaustive key search 가능한 키는 오직 26가지  모두 시도해 본다! 해답: key = 4 IAMABOYANDYOUAREAGIRL Chapter 2 Crypto Basics

문자열의 순열에 의한 치환 Key는 문자의 어떤 순열이다. 문자를 이동( shift)할 필요가 없다. 예 Plaintext Ciphertext a b c d e f g h i j k l m n o p q r s t u v w x y z J I C A X S E Y V D K W B Q T Z R H F M P N U L G O 그러면 26! > 288 개의 가능한 키가 존재한다! 이 방법은 처음 1000년간 비밀 코드를 만드는 기술을 지배하였다. Chapter 2 Crypto Basics

암호분석 II: 잘 생각하자! 단순 치환이 사용되었다는 것을 알고 있다. 그러나 n 자리수의 이동일 필요는 없다. 다음의 암호문의 키를 찾아낼 수 있는가: PBFPVYFBQXZTYFPBFEQJHDXXQVAPTPQJKTOYQWIPBVWLXTOXBTFXQWAXBVCXQWAXFQJVWLEQNTOZQGGQLFXQWAKVWLXQWAEBIPBFXFQVXGTVJVWLBTPQWAEBFPBFHCVLXBQUFEVWLXGDPEQVPQGVPPBFTIXPFHXZHVFAGFOTHFEFBQUFTDHZBQPOTHXTYFTODXQHFTDPTOGHFQPBQWAQJJTODXQHFOQPWTBDHHIXQVAPBFZQHCFWPFHPBFIPBQWKFABVYYDZBOTHPBQPQJTQOTOGHFQAPBFEQJHDXXQVAVXEBQPEFZBVFOJIWFFACFCCFHQWAUVWFLQHGFXVAFXQHFUFHILTTAVWAFFAWTEVOITDHFHFQAITIXPFHXAFQHEFZQWGFLVWPTOFFA Chapter 2 Crypto Basics

암호분석 II 모든 288 가지의 치환될 수 있는 키를 고려할 필요는 없다. 좀 더 현명할 수는 없을까? 영어 알파벳의 빈도수… Chapter 2 Crypto Basics

암호분석 II Ciphertext: 다음의 정보를 기반으로 복호화를 한다. 암호문에서의 알파벳 빈도수: PBFPVYFBQXZTYFPBFEQJHDXXQVAPTPQJKTOYQWIPBVWLXTOXBTFXQWAXBVCXQWAXFQJVWLEQNTOZQGGQLFXQWAKVWLXQWAEBIPBFXFQVXGTVJVWLBTPQWAEBFPBFHCVLXBQUFEVWLXGDPEQVPQGVPPBFTIXPFHXZHVFAGFOTHFEFBQUFTDHZBQPOTHXTYFTODXQHFTDPTOGHFQPBQWAQJJTODXQHFOQPWTBDHHIXQVAPBFZQHCFWPFHPBFIPBQWKFABVYYDZBOTHPBQPQJTQOTOGHFQAPBFEQJHDXXQVAVXEBQPEFZBVFOJIWFFACFCCFHQWAUVWFLQHGFXVAFXQHFUFHILTTAVWAFFAWTEVOITDHFHFQAITIXPFHXAFQHEFZQWGFLVWPTOFFA 다음의 정보를 기반으로 복호화를 한다. 암호문에서의 알파벳 빈도수: A B C D E F G H I J K L M N O P Q R S T U V W X Y Z 21 26 6 10 12 51 25 9 3 1 15 28 42 27 4 24 22 8 Chapter 2 Crypto Basics

빈도수 분석(Frequency analysis)의 역사 아랍인에 의해서 발견 빈도수 분석에 대한 최초의 기록은 9세기 과학자 Al Kindi의 책에서 찾아볼 수 있다. (Abū Yūsuf Yaqūb ibn Isḥāq al-Kindī, Arabic: أبو يوسف يعقوب إبن إسحاق الكندي‎) (c. 801–873 CE), (Alkindus) 르네상스 때 아랍인에 의해서 유럽에 소개 빈도수 분석으로 치환 방법은 더 이상 안전한 암호화 알고리즘이 되지 않았다. Chapter 2 Crypto Basics

암호체계가 안전하다는 말의 뜻은? 암호를 해석하기 위해서 알려진 최선의 공격 방법은 모든 키를 다 시도해 보는 것일 때 이 암호 체계는 안전하다고 한다. (Cryptosystem is secure) 암호를 해석하는데 어떤 지름길이 있다면 그 암호체계는 불안전하다고 한다. (Cryptosystem is insecure) 이 정의에 의하면 불안전한 암호체계가 안전한 암호체계 보다도 해석하기 더 어려울 수도 있다! Chapter 2 Crypto Basics

이중 전위(Double Transposition) Plaintext: attackxatxdawn Permute rows and columns  Ciphertext: xtawxnattxadakc Key: 행렬의 크기와 순열 (3,5,1,4,2) and (1,3,2) Chapter 2 Crypto Basics

일회성 암호(One-time Pad) Vernam cipher 증명된 안전한(provably secure) 암호 체계 그러나 실제 세계에서 사용하기에는 현실성이 없다. 일회성 키는 랜덤하게 선택된 메시지와 동일한 길이의 스트링 비트로 구성된다. Chapter 2 Crypto Basics

일회성 암호의 암호화 P C Encryption: Plaintext  Key = Ciphertext h e i l t r K 오직 8개의 알파벳이 있다고 가정하자. e=000 h=001 i=010 k=011 l=100 r=101 s=110 t=111 Encryption: Plaintext  Key = Ciphertext P h e i l t r 001 000 010 100 111 101 K 110 C s Chapter 2 Crypto Basics

일회성 암호의 복호화 C P Decryption: Ciphertext  Key = Plaintext s r l h t K e e=000 h=001 i=010 k=011 l=100 r=101 s=110 t=111 Decryption: Ciphertext  Key = Plaintext C s r l h t 110 101 100 001 111 K 000 P 010 e i Chapter 2 Crypto Basics

일회성 암호(One-time Pad) 이중 첩자는 송신자가 다음의 “키”를 사용했다고 주장한다. C P s r l h t K 110 101 100 001 111 K 000 P 011 010 k i e e=000 h=001 i=010 k=011 l=100 r=101 s=110 t=111 Chapter 2 Crypto Basics

일회성 암호(One-time Pad) 체포된 송신자는 “키”는 다음과 같다고 주장한다. C P s r l h t K e i k 110 101 100 001 111 K 000 011 P 010 e i k e=000 h=001 i=010 k=011 l=100 r=101 s=110 t=111 Chapter 2 Crypto Basics

일회성 암호 정리 증명된 안전성(Provably secure), (올바로 사용될 때) 암호문은 평문에 대한 어떤 정보도 제공하지 않는다. 모든 평문이 만들어질 가능성은 동일하다. 키(Pad)는 임의의 값이며 단지 한번만 사용된다. 키(Pad)는 오직 송신자와 수신자만 알고 있다. 키(Pad)는 메시지와 동일한 크기이다. 메시지의 무결성을 제공하지 않는다. 의문: 키(pad)를 안전하게 전달할 수 있다면 메시지 자체를 전달하면 되지 않겠는가? Chapter 2 Crypto Basics

실제 세계에서의 일회성 암호 예 프로젝트 VENONA 스파이는 미국에 일회성 암호 반입 US와 UK의 정보기관 간에 오랫동안 지속된 고도의 비밀 협력(1943년부터 1980년까지 지속) 1940년대 미국으로부터 전송된 소련 스파이의 메시지의 암호 해석을 목적으로 함 핵무기에 대한 첩자 행위 등 수천의 메시지 전송 스파이는 미국에 일회성 암호 반입 스파이는 키를 비밀 메시지를 암호화하는데 사용 일회성 키의 반복 사용이 암호 해석이 가능하도록 했다. espionage [éspienà:¥|èspien:¥] n. (타인R타국에 대한) 스파이 행위, 첩보 활동, 정찰. a novel of intrigue and ∼ 음모 및 스파이 소설. political[military] ∼ 정치[군사] 정보 활동 1943년 시작, 소련이 독일과 협력할 것을 염려하여 소련 외교관의 메시지를 해독하고자 함 Chapter 2 Crypto Basics

VENONA 암호 해석 (1944) “Ruth” == Ruth Greenglass Julius Rosenberg (1918-1953/6/19), Ethel Greenglass Rosenberg(1915-1953/6/19) 유대인, 공산주의자, 미국의 원자탄 개발에 관련된 정보를 소련에 전해 줌. “Ruth” == Ruth Greenglass “Liberal” == Julius Rosenberg “Enormous” == the atomic bomb Chapter 2 Crypto Basics

코드북(Codebook) 말 그대로 “코드 워드”로 채워진 책이다. Zimmerman Telegram 은 5-digit 코드워드로 이루어진 코드북으로 암호화되었다. Februar 13605 fest 13732 finanzielle 13850 folgender 13918 Frieden 17142 Friedenschluss 17149 : : 현대의 블록 암호들은 코드북이다. Zimmerman Telegram 독일 제국의 외교 장관인 Arthur Zimmermann이 1917년 1월 16일 워싱토의 독일 대사 Johan von Bernstorff에게 보낸 암호화된 전보 Bernstorff는 독일의 미국대사에게 전보를 보냈다. 독일은 무제한의 잠수함 공격을 전개하면서 이것이 당시 중립을 지키고 있던 미국의 참전을 초래할 것으로 예상하고 멕시코로 하여금 독일과의 연맹에 참여하게 만들려고 했다. 독일과의 연맹을 통해서 멕시코가 미국에 빼았겼던 영토를 회복시켜 주겠다는 약속을 하였다. 이 전보는 영국의 암호 전문가에 의해 해석되었다. 멕시코는 독일의 제안을 검토하고 거절하였다. 거절한 날 미국은 독일에 선전 포고하였다. 전보는 라디오 신호로 전송되는 데 당시 외교 메시지는 두 중립국 스웨덴과 미국의 전보 채널을 통해서 전송되었다. 영국은 대서양의 독일 케이블을 절단하고 중립국의 독일 스테이션을 폐쇄하였기 때문에 당시 독일은 서반구를 가로지르는 독자적인 전보 케이블은 갖고 있지 못했다. 미국의 윌슨 대통령은 미국의 케이블을 사용할 수 있도록 허락했다. 독일은 할 수 없이 도청의 위험을 감수하고 미국과 영국의 케이블을 사용하고 있었다. 소련은 독일의 손상된 코드북을 복원하였고 일부 코드북을 영국에게 전해 주었다. Chapter 2 Crypto Basics

Zimmerman Telegram 현재까지 알려진 가장 유명한 코드북의 하나 독일의 외상이 멕시코 대사에게 보낸 전문으로 멕시코를 우방으로 회유할 목적 미국이 1차세계대전에 참여하도록 했다. 우측에 있는 것이 암호문이다. Chapter 2 Crypto Basics

해석된 Zimmerman Telegram 러시아는 코드북을 부분적으로 복원하여 영국에 넘겨줌. 영국은 빠진 부분을 보충하여 해독 Chapter 2 Crypto Basics

몇 가지 역사적인 사례들 Crypto 연대기 Answers.com Wikipedia 전위 암호기(Transposition cypher) Spartan Scytale[saiteil] 치환 암호기(Substitution cipher) Caesar’s cipher Poe’s The Gold Bug: 미국의 1876년 선거 http://100.naver.com/100.nhn?docid=183115 풍뎅이 [The Gold-Bug] 요약 미국의 시인 E.A.포의 단편소설. 저자 포 장르 소설 발표 1843년 본문 1843년 발표. 1845년 《단편집》에 수록되었다. 남(南)캐롤라이나주의 새리번섬에 사는 르글란드는 어느 날 우연히 바닷가에서 희귀한 풍뎅이와 한 조각의 양피지(羊皮紙)를 발견하고 그 양피지를 불에 쬐어서 나타난 암호를 단서로 섬에 숨겨진 보물의 소재를 알아낸다. 밤중에 반신반의하는 친구와 하인을 데리고 숲으로 들어가 암호에 있는 대로 마른가지 끝에 달린 해골의 한쪽 눈에서 실로 맨 풍뎅이를 늘어뜨렸더니 그 땅속에서 예의 보석이 나온다. 유명한 해적 선장 키드의 보물전설과 포가 특기로 하는 암호 해독을 결부시킨 독특한 추리소설이다. Chapter 2 Crypto Basics

미국의 1876년 선거 1876년 대통령 선거는 미국 역사상 가장 논쟁의 선거 중 하나이다. 민주당의 “Swindling” Samuel J. Tilden은 공화당의 “Rutherfraud” Rutherford B Hayes에게 전국 투표에서 근소한 차이로 승리하였다. 3개 주(Florida, Lousiana, South Carolina)의 선거인단의 표(19표)가 미결정 상태였다. 위원회는 최종적으로 19표를 Hayes에게 인정하였다. Tilden은 Hayes가 위원회 위원들을 매수하였다고 주장했다. delegation [dèlegéiòen] n.1 대표 파견[임명]; (권한R임무 등의) 위임, 위촉. Chapter 2 Crypto Basics

1876년 선거 Tilden의 지지자들의 암호화된 메시지가 드러나게 되었다. 암호화: 부분적으로 코드북을 사용하고 단어 간에 전이(transposition)를 사용하였다. Codebook의 주요 단어 암호 예: ciphertext plaintext Copenhagen Greenbacks Greece Hayes Rochester votes Russia Tilden Warsaw telegram : : Chapter 2 Crypto Basics

1876년 선거 원래 메시지에 코드북을 적용 5개의 단어의 배수로 메시지를 구성(총 길이, 10,15,20,25 or 30 단어) 각 길이의 메시지에 대해서 고정된 순서의 전위를 적용하였다. 동일한 길이의 많은 메시지를 비교한 결과 적용된 전위의 순서를 찾아 내었다. 즉, 이것은 동일한 길이의 메시지에 같은 키를 적용한 것이다. Chapter 2 Crypto Basics

1876년 선거 Ciphertext: 코드북: 전위 순서 Plaintext: “Warsaw they read all unchanged last are idiots can’t situation” 코드북: Warsaw  telegram 전위 순서 9,3,6,1,10,5,2,7,4,8 Plaintext: “Can’t read last telegram. Situation unchanged. They are all idiots.” 취약한 암호화 방법은 키의 재사용으로 더욱 취약해 졌다. 교훈: 키를 재사용하거나 남용하지 말자! Chapter 2 Crypto Basics

1876 선거: 암호 이외의 의미 1877의 타협(compromise) 재건(reconstruction) 시대의 종말 Hayes를 대통령으로 인정하는 대신 남부 3주(South Carolina, Louisiana, Florida)에서 연방 정부의 군대를 철수 하고 Hayes 정부 내각에 남부 출신 각료를 1명 선임 남부의 산업화에 남부의 이권을 인정한다. 재건(reconstruction) 시대의 종말 남부의 자치를 주장하는 “redeemer”들이 남부의 권력을 장악 백인 우월주의자들의 민주당 지지를 초래 재건의 시대(1863-1877) 노예 제도의 폐지 남부 연합(confederacy)의 흔적을 없앰 자유 노예의 권리를 수립

20세기 초기 WWI  Zimmerman Telegram “Gentlemen do not read each other’s mail”  Henry L. Stimson, Secretary of State, 1929 1941년 진주만 사건 이후 미국은 다시 암호 분석 활동을 재개 WWII  암호 해석의 황금기 Japanese Purple (codename MAGIC) German Enigma (codename ULTRA) Chapter 2 Crypto Basics

Enigma Machine 2차 세계 대전에서 독일이 사용한 암호화 기계 전기(electricity)로 동작 Chapter 2 Crypto Basics

Japanese Purple Machine http://library.thinkquest.org/28005/flashed/timemachine/courseofhistory/purple.shtml Japan's PURPLE Encryption: The Japanese were most efficient at destroying their cryptographic machines during World War II. To this date, not even one complete machine has been discovered. However, with pure genius and ingenuity, cryptographers from the United States were able to crack the PURPLE, as it was called. In 1940, the British, Polish, and French were working hard on cracking the German Enigma (and for the most part, succeeding). Meanwhile, the US Signals Intelligence Service (SIS) worked on Japan code machine. What made cracking the PURPLE more difficult than the enigma was that it used a revolutionary concept in machine cryptography. In fact, PURPLE used telephone stepping switches instead of rotors in its encryption scheme. A stepping switch was used in those days to route telephone calls from source to destination. By utilizing this, the encrypted letters did not follow patterns that codebreakers were accustomed to with traditional rotor machines. So, William Friedman, a renowned cryptographer, was curious about what could make these patterns? Eventually, he and his team were able to put together a version of the PURPLE machine almost exactly the same as the Japanese version. However, Friedman did so without ever seeing a picture or blueprint of the machine; he only saw messages encrypted with it! So, knowing how the machine worked, the United States was able to build a machine to crack the code of PURPLE. It figured out the code used to encrypt messages, thus allowing for plaintext viewing by the user. As a result of Friedman뭩 work, allied lives were saved, and battles were won, helping to bring the war to a close as quickly as possible. The following picture is the only part of a real Japanese PURPLE machine to have ever been recovered by anyone. Everything else was destroyed. telephone stepping switches : In electrical controls, a stepping switch (also called a uniselector) is an electromechanical device which allows an input connection to be connected to one of a number of possible output connections, under the control of a series of electrical pulses. The major use for these devices was in early automatic telephone exchanges (commonly called Strowger exchanges) to route telephone calls. Stepping switches were invented by Almon Strowger in 1888 Chapter 2 Crypto Basics

암호의 역사

WWII 이후 Claude Shannon  정보 이론의 아버지라고 불리움 컴퓨터 혁명  대량의 데이터 Data Encryption Standard (DES):70년대 Public Key cryptography: 70년대 CRYPTO 학회: 80년대 Advanced Encryption Standard (AES): 90년대 Crypto는 비밀의 세계에서 빠져 나왔다. Chapter 2 Crypto Basics

Claude Shannon 정보 이론(Information Theory)의 창시자 1949 논문: Comm. Thy. of Secrecy Systems http://netlab.cs.ucla.edu/wiki/files/shannon1949.pdf 혼돈(Confusion)과 확산(diffusion) Confusion  평문과 암호문 간의 관계를 모르게(obscure) 하는것 Diffusion  평문의 통계치(statistics)를 암호문에 펼쳐 놓는 것 일회성 암호는 오직 혼돈 만을 사용하는 반면 이중 전위는 오직 확산 만을 사용 일회성 암호(one-time pad)가 안전하다는 것을 증명 Chapter 2 Crypto Basics

암호 방법(Cryptography)의 분류 대칭키(Symmetric Key) 암호화와 복호화에 동일한 키 사용 스트림 암호(Stream ciphers) 블록 암호(Block ciphers) 공개키(Public Key) 암호화를 위한 키(공개키)와 복호화를 위한 키(개인키) 전자 서명(digital signature) 해쉬 알고리즘(Hash algorithms) Chapter 2 Crypto Basics

암호 방법(Cryptography)의 분류 현대 암호 대칭키 암호 공개키 암호 스트림 암호 블록 암호 해쉬 함수 이산 대수 소인수 분해 RC4, LFSR DES, SEED SHA1,HAS160 DH, DSA RSA Chapter 2 Crypto Basics

암호 해석(cryptanalysis)의 분류 암호문 공격(Ciphertext only) 알고리즘과 암호문 만이 주어질 때 알려진 평문 공격(Known plaintext) 약간의 평문과 이에 대응하는 암호문을 알 수 있을 때 예, email 메시지 선택된 평문 공격(Chosen plaintext) 암호 체계에 약간의 접근이 가능하다고 가정 공격자는 자신이 선택한 평문에 대한 암호문을 얻을 수 있다. “점심 시간 공격(lunchtime attack)” Chapter 2 Crypto Basics

암호 해석의 분류 적응적 선택된 평문(Adaptively chosen plaintext) 공격 공격자는 평문을 선택하고 이에 대한 암호문을 얻는다. 그리고 이 암호문을 기반으로 또 다른 평문을 선택한다. 상관의 있는 키 (Related key) 공격 특별한 방법으로 관계를 갖는 취약한 키를 공격한다. 순방향 탐색(Forward search) 공개키 방법에서만 적용된다. 예를 들면 평문이 “yes” 혹은 “no”일 경우 공개키를 사용하여 “yes”일 때와 “no”일 때의 암호문을 구하여 비교한다. 기타 등등 In cryptography, a related-key attack is any form of cryptanalysis where the attacker can observe the operation of a cipher under several different keys whose values are initially unknown, but where some mathematical relationship connecting the keys is known to the attacker. For example, the attacker might know that the last 80 bits of the keys are always the same, even though he doesn't know, at first, what the bits are. This appears, at first glance, to be an unrealistic model; it would certainly be unlikely that an attacker could persuade a human cryptographer to encrypt plaintexts under numerous secret keys related in some way. However, modern cryptography is implemented using complex computer protocols, often not vetted by cryptographers, and in some cases a related-key attack is made very feasible. Chapter 2 Crypto Basics