Presentation is loading. Please wait.

Presentation is loading. Please wait.

SSL/TLS 군산대학교 전자정보공학부 보안 및 이동컴퓨팅 연구실.

Similar presentations


Presentation on theme: "SSL/TLS 군산대학교 전자정보공학부 보안 및 이동컴퓨팅 연구실."— Presentation transcript:

1 SSL/TLS 군산대학교 전자정보공학부 보안 및 이동컴퓨팅 연구실

2 Agenda SSL (Secure Socket Layer) TLS (Transport Layer Security)

3 SSL / TLS SSL (Secure Socket Layer) TLS (Transport Layer Security)
배경 : 1993년 웹 서버와 브라우저간의 안전한 통신을 위해 Netscape 社에 의해 개발 특징 : 세션계층에서 적용되며, 응용계층의 FTP, TELNET, HTTP등의 프로토콜의 안전성 보장 서버 인증, 클라이언트 인증, 기밀성 보장 현황 및 전망 : 현재 많은 전자 쇼핑 몰 업체에서 채택, 운영 TLS (Transport Layer Security) 배경 : SSL 3.0 이 표준화된 이후 IETF는 1996년 6월부터 TLS 프로토콜에 대한 표준화 (SSLv3.1) Backward compatible with SSLv3 특징 : SSL 3.0을 기반으로 한 업그레이드 프로토콜 현황 및 전망 : 현재 TLS 1.0이 발표, 지속적 개발 예상

4 SSL in USE

5 SSL 의 기능 서버 인증 기능 클라이언트 인증 암호화된 SSL 연결 사용자는 서버의 신원을 확인
서버의 certificate 와 public ID가 정당 확인 클라이언트의 신뢰 된 인증 기관들의 목록에 서버의 인증 기관이 포함되었는지를 확인 (표준 공개키 암호화 기술을 사용) 클라이언트 인증 서버는 클라이언트의 신원을 확인 클라이언트의 certificate 와 public ID가 정당 확인 서버의 신뢰 된 인증기관 들의 목록에 클라이언트의 인증 기관이 포함되었는지를 확인 (표준 공개키 암호화 기술을 사용) 암호화된 SSL 연결 클라이언트와 서버 사이에 송/수신 되는 모든 정보는 암호화/복호화 + 무결성

6 SSL Architecture connection session Suitable type of service
Peer-to-peer relationship session By handshake protocol

7 SSL의 구조 Management of SSL Real security service Handshake Protocol
Parameters (Session key, cryptography algorithm, authentication) Change Cipher Spec Protocol Alert Protocol Real security service SSL Record Protocol Data encryption/decryption + Integrity

8 SSL 프로토콜 Handshake 프로토콜 Change Cipher Spec 프로토콜 Alert 프로토콜 Record 프로토콜
서버와 클라이언트간의 상호인증을 수행하고, 사용할 키 교환 방식, 대칭키 암호 방식, HMAC 방식, 압축방식 등의 보안속성을 협상 Change Cipher Spec 프로토콜 Handshake 프로토콜에 의해 협상된 압축, MAC, 암호화 방식 등이 이후부터 적용됨을 상대방에게 알림 Alert 프로토콜 세션의 종료 또는 오류 발생시 이를 상대방에게 알림 Record 프로토콜 상위계층 메시지들이 보안성이 유지되며 전송될 수 있도록 하기 위하여, 메시지 분할, 압축, 메시지 인증, 암호화 등의 작업을 수행

9 SSL Record protocol

10 SSL Record protocol Confidentiality Message integrity
using symmetric encryption with a shared secret key defined by Handshake Protocol IDEA, RC2-40, DES-40, DES, 3DES, Fortezza, RC4-40, RC4-128 message is compressed before encryption Message integrity using a MAC with shared secret key similar to HMAC but with different padding

11 SSL Record protocol Fragmentation Compression MAC Encryption
2^14byte(16348byte) or less Compression Optional, lossless No compression in SSLv3,TLS MAC Encryption IDEA, RC2-40, DES-40, DES, 3DES, Fortezza, RC4-40, RC4-128

12 SSL Record protocol SSL record header Contents type(8bits)
Major Version(8bits) Minor Version(8bits) Compressed Length(16bits)

13 Change Cipher Spec Protocol
one of 3 SSL specific protocols which use the SSL Record protocol a single message causes pending state to become current hence updating the cipher suite in use

14 Alert Protocol convey SSL-related alert to peer entity
2 bytes : Fatal(5), alerts(7) HTTP Hand Shake Change Cipher Alert Record Layer TCP Prot:21 Version:3.0 Len:0 Len:2 Level Desc. hand shake 과정에서 end-to-end 간의 error 발생시 Warning : 1 Fatal : 2

15 Handshake Protocol 한 세션동안 이용되는 암호 매개변수 생성 한 세션에서 사용되는 비밀정보를 공유

16 Handshake Protocol Client Hello : 지원 가능한 {암호 방식, 키교환 방식, 서명 방식, 압축 방식}을 서버에게 알림. Server Hello : 수용 가능한 {암호 방식, 키교환 방식, 서명 방식, 압축 방식}을 응답. 이때 새로운 세션 ID를 할당. Server Certificate (optional) : 서버측 공개키가 수납된 인증서를 보냄. Server Key Exchange (optional) : 서버가 직전에 송신한 Server Certificate 메시지에 수납된 인증서의 내용만으로는 클라이언트가 premaster secret 값을 생성하기에 불충분한 경우에 추가로 송신. Certificate Request (optional) : 클라이언트의 인증서를 요구. Server Hello Done : 서버의 hello 절차가 완료되었음을 알림. Client Certificate (optional) : 클라이언트측 공개키가 수납된 인증서를 보냄. Client Key Exchange : RSA 방식인 경우 클라이언트가 설정한 premaster secret 값을 서버의 공개키로 암호화 값이 수납됨. Certificate Verify (optional) : 클라이언트 자신이 Client Certificate에 수납된 공개키에 대응되는 개인키를 가지고 있음을 서명 값으로 서버에게 증명. Change Cipher Spec : 지금 암호화 방식이 변경되었으며, 이후 전송되는 것들은 모두 지금까지 협상되었던 CipherSpec과 키 값에 의해 암호화 및 압축되어 전송됨을 상대방에게 알림. Finished : 이 메시지는 지금까지의 협상 과정에서 설정된 암호화 알고리즘에 의해 암호화되어 송신되는 첫번째 메시지로서, 수신측은 이 메시지를 복호화하여 지금까지 협상절차가 정당한지를 검사함

17 Handshake Protocol Phase 1. Establish Security Capabilities
protocol version, session ID, cipher suite, compression method, initial RN Phase 2. Server Authentication and Key Exchange key exchange, request certificate Phase 3. Client Authentication and Key Exchange client sends key exchange, certificate verificaiton Phase 4. Finish change cipher suite, finish

18 1 2 3 4 5 6 7 8 9 10 11 12 13 ClientHello ServerHello 클 서 라
Certificate 8 ClientKeyExchange 9 CertificateVerify 10 ChangeCipherSpec 11 Finished 6 ServerHelloDone 13 2 ServerHello 3 4 ServerKeyExchange 5 CertificateRequest 12 Note: Optional or situation-dependent messages that are not always sent

19 Phase 1. Establish Security Capabilities
Client_Hello Message ClientRandomValue (32bit+28bytes) Prot:22 Version:3.0 Length… …Length Type:1 ID len Session ID CipherSuite length CipherSuite 1 CipherSuite … … CipherSuite n Cmp n Cmp len Cmp 1 ……… Value Cipher Suite 0,0 0,1 0,2 0,4 SSL_NULL_WITH_NULL_NULL SSL_RSA_WITH_NULL_MD5 SSL_RSA_WITH_NULL_SHA SSL_RSA_WITH_RC4_128_MD5 0,5 SSL_RSA_WITH_RC4_128_SHA 0,7 SSL_RSA_WITH_IDEA_CBC_SHA : 0,30 SSL_FORTEZZA_DMS_WITH_RC4_128_SHA

20 Cipher Suite (Netscape 7.1)

21 Phase 1. Establish Security Capabilities (cont’d)
Server_Hello Message ClientRandomValue (32bit+28bytes) Prot:22 Version:3.0 Length… …Length Type:2 ID len Session ID(option) CipherSuite Cmp Client_Hello의 cipher suite list에서 한개를 선택한다

22 1 2 3 4 5 6 7 8 9 10 11 12 13 ClientHello ServerHello 클 서 라
Certificate 8 ClientKeyExchange 9 CertificateVerify 10 ChangeCipherSpec 11 Finished 6 ServerHelloDone 13 2 ServerHello 3 4 ServerKeyExchange 5 CertificateRequest 12 Note: Optional or situation-dependent messages that are not always sent

23 Phase 2. Server Authentication and Key Exchange
Certificate Message Certificate n Certificate 1 Prot:22 Version:3.0 Length… …Length Type:11 Certificate Chain Length ……… Certificate n Length Certificate 1 Length CA

24 Phase 2. Server Authentication and Key Exchange (cont’d)
ServerKeyExchange Message Signed MD5 hash (16 bytes) Prot:22 Version:3.0 Length… …Length Type:12 RSA mod length mod value RSA… RSA exp length RSA exp value C = Me(mod n) e 값 n 값

25 Phase 2. Server Authentication and Key Exchange (cont’d)
CertificateRequest Message DN(Distinguished Name) of CA 1 Prot:22 Version:3.0 Length… …Length Type:13 CT length ... CT 2 CAs length CA 1 length CT 1 CT n ……… Server가 받아들일 수 있는 인증기관 List CT Value Certificate Type 1 2 3 4 RSA sign DSS sign RSA sign with fixed Diffie-Hellman DSS sign with fixed Diffie-Hellman 5 RSA sign with ephemeral 6 DSA sign with ephemeral 20 Fortezza DMS

26 1 2 3 4 5 6 7 8 9 10 11 12 13 ClientHello ServerHello 클 서 라
Certificate 8 ClientKeyExchange 9 CertificateVerify 10 ChangeCipherSpec 11 Finished 6 ServerHelloDone 13 2 ServerHello 3 4 ServerKeyExchange 5 CertificateRequest 12 Note: Optional or situation-dependent messages that are not always sent

27 Phase 3. Client Authentication and Key Exchange
Certificate Message If the server has requested a certificate, The client sends a certificate message

28 Phase 3. Client Authentication and Key Exchange (cont’d)
ClientKeyExchange Message Encrypted Premaster Secret Prot:22 Version:3.0 Length… …Length Type:16 Server의 공개키로 암호화 48 bytes random value

29 Master Secret Generation Procedure
SHA ‘A’ Premaster Secret Client Random Server Random ‘CCC’ Hash MD5 Master Secret ( 48 bytes ) Master Secret Generation Procedure ‘BB’

30 Key Material generation procedure
SHA ‘A’ Master Secret Server Random Client Random ‘BB’ ‘CCC’ Hash MD5 Key Material . . .

31 1 2 3 4 5 6 7 8 9 10 11 12 13 ClientHello ServerHello 클 서 라
Certificate 8 ClientKeyExchange 9 CertificateVerify 10 ChangeCipherSpec 11 Finished 6 ServerHelloDone 13 2 ServerHello 3 4 ServerKeyExchange 5 CertificateRequest 12 Note: Optional or situation-dependent messages that are not always sent

32 Phase 4. Finish ChangeCipherSpec Message
Pending CipherSpec into the current one Record Layer에서 테이터 암호화 때 클라이언트와 서버간 서로 약속한 암호화 알고리즘 사용한다는 것을 통보

33 Message Authentication Code
Phase 4. Finish (cont’d) Finished Message Handshake message MAC Encrypted MD5 hash (16 bytes) Prot:22 Version:3.0 Len:0 56 Type:20 36 SHA hash (20 bytes) MD5 Message Authentication Code

34 Transport Layer Security (TLS)
IETF standard RFC 4346 similar to SSLv3 with minor differences in record format version number Major : 3, minor : 1 uses HMAC for MAC has additional alert codes some changes in supported ciphers With except of Fortezza changes in certificate negotiations changes in use of padding(1,9,17…., 249bytes)


Download ppt "SSL/TLS 군산대학교 전자정보공학부 보안 및 이동컴퓨팅 연구실."

Similar presentations


Ads by Google