1 / 34

SSL/TLS

SSL/TLS. 군산대학교 전자정보공학부 보안 및 이동컴퓨팅 연구실. Agenda. SSL (Secure Socket Layer) TLS (Transport Layer Security). SSL / TLS. SSL (Secure Socket Layer) 배경 : 1993 년 웹 서버와 브라우저간의 안전한 통신을 위해 Netscape 社에 의해 개발 특징 : 세션계층에서 적용되며 , 응용계층의 FTP, TELNET, HTTP 등의 프로토콜의 안전성 보장

Télécharger la présentation

SSL/TLS

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


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

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

  3. SSL / TLS • SSL (Secure Socket Layer) • 배경 : 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 의 기능 • 서버 인증 기능 • 사용자는 서버의 신원을 확인 • 서버의 certificate 와 public ID가 정당 확인 • 클라이언트의 신뢰 된 인증 기관들의 목록에 서버의 인증 기관이 포함되었는지를 확인 (표준 공개키 암호화 기술을 사용) • 클라이언트 인증 • 서버는 클라이언트의 신원을 확인 • 클라이언트의 certificate 와 public ID가 정당 확인 • 서버의 신뢰 된 인증기관 들의 목록에 클라이언트의 인증 기관이 포함되었는지를 확인 (표준 공개키 암호화 기술을 사용) • 암호화된 SSL 연결 • 클라이언트와 서버 사이에 송/수신 되는 모든 정보는 암호화/복호화 + 무결성

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

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

  9. SSL Record protocol

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

  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 ClientHello 클 라 이 언 트 서 버 ServerHello 2 Certificate 3 Note: Optional or situation-dependent messages that are not always sent ServerKeyExchange 4 CertificateRequest 5 ServerHelloDone 6 7 Certificate 8 ClientKeyExchange 9 CertificateVerify 10 ChangeCipherSpec 11 Finished ChangeCipherSpec 12 Finished 13

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

  20. Cipher Suite (Netscape 7.1)

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

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

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

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

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

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

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

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

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

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

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

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

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

  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)

More Related