[IT-Security-1] SSL/TLS

SSL/TLS 


Notes from RWTH Aachen University course 
“IT security 1” Wintersemester 2019/20
professor: Meyer, Ulrike Michaela


  • 協定適用:
    • Server授權 / Server和Client授權
    • transport layer的Integrity和(optional)機密性
    • applications可呼叫的session-based保護(eg. http)
  • Secure Socket Layer (SSL)
  • Transport Layer Security (TLS)

TLS

  • TLS session

    • 是server和client之間的association
    • 由handshake protocol生成
    • 可以被shared
    • 演算法、加密方法相關
  • TLS connection

    • transport layer connection提供一連串服務
    • 點對點關係
    • 短暫的
    • 跟session有關
    • key、參數相關

  • TLS Architecture

  • Handshake protocol

    1. 建立cipher suite
    2. server 證明和key交換
    3. (client 證明和)key交換
    4. 結束handshake
    • 結束handshake之後會得到一master secret
    • 從此master secret可得其他sessions key用來加密或integrity保障
    • 四種key exchange方法
      • RSA
      • Anonymous DH
      • Ephemeral DH
      • Fixed DH
    • 不同方法步驟2和3會不同
    • RSA
      1. Client得到 \(\text{RSA(certificate)}\)
      2. Client產生一隨機key叫 pre-master secret
      3. Client用server的公鑰加密pre-master secret
      4. Server用自己的私鑰解密

    • DH-Anonymous
      1. Client和Server交換未簽章的public DH values
      2. 雙方計算pre-master secret
      • 易受Man-in-the-Middle attacks但是是匿名的


    • Ephemeral(短暫的) DH (DHE)
      1. Client和Server計算Ephemeral private DH values
      2. 傳送 public DH values 用RSA或DSS簽章
      3. 用 public DH values 和 private DH values 計算pre-master secret

    • Fixed DH
      1. Client和Server用certification authority簽章的fixed public DH values
      2. 用 public DH values 和 private DH values 計算pre-master secret


    • Handshake: Phase 1


    • Handshake: Phase 2
      • Different key exchange types


    • Handshake: Phase 3
      • Different key exchange types

    • Server-side-only authentication
      • 用RSA
      • server端DHE,client端DH-anonym
      • server端Fixed DH,client端DH-anonym
    • 雙方 authentication
      • Client和Server用DHE
      • Client和Server用Fixed-DH
      • Client和Server混用DHE和Fixed-DH
      • Client和Server用RSA,Client簽章certificate

    是由Server決定要哪種方法

    • Phase: Finish
      • \(\text{PRF(x)}\)\(\text{=PRF(master secret, "Finish" || hash(handshake_messages))}\)
      • \(\text{master secret}\)\(\text{=PRF (}\)\(\text{pre-master secret}\)\(\text{,"master secret"|| ClientHello.random || ServerHello.random)}\)

      \(\text{PRF}\) 是一個 pseudo random function

  • ChangeCipherSpec Protocol

    • 定義ChangeCipherSpec message,用來作handshake protocol的一部分
  • Session Resumption(恢復)

    • 因為session setup是overhead
    • Problems:
      • server的performance限制
      • DoS攻擊
    • Session resumption:
      • 可以重複使用Pre-Master-secret
      • 但生成新random number以生成新的master secret
  • Record Protocol

    • pending state的參數
    • handshake protocol的參數
    • 用法:
      • 對 upper layer 的 payload 操作
      • Output 的 TLS payload 包含 壓縮、integrity保護、加密
      • 另 output 一個 record protocol header 說明 protocol 內容
  • Validation (Certificate) 是由 application 所做,而非TLS/SSL

Readings
Stallings Chapter 17
Forouzan Chapter 17
RFC 2246 TLS Version 1.0 (January 1999)
RFC 4346 TLS Version 1.1 (April 2006)
RFC 5246 TLS Version 1.2 (August 2008)
TLS 1.3 specified due to the many practical attacks against various ciphers in TLS 1.2 and bellow, RFC finished since August 2018 (RFC 8446)
A nice overview on recent practical attacks up to 2015 and references to the original publications can be found in RFC 7457

留言

這個網誌中的熱門文章