Author: @Hsu Tzu Ting Date: Oct 22, 2020 性質: Tech Share
前情提要
SSL/TLS Definition (from RFC)
... Secure Sockets Layer (SSL 3.0) protocol, a security protocol that provides communications privacy over the Internet. The protocol allows client/server applications to communicate in a way that is designed to prevent eavesdropping, tampering, or message forgery. (RFC-6101)
TLS allows client/server applications to communicate over the Internet in a way that is designed to prevent eavesdropping, tampering, and message forgery. (RFC-8446)
SSL/TLS 功能
Public Key & Private Key
Digital Signature
Steps
Step1: Sender 會先使用某種 Hash 演算法來計算該文件檔的 Hash 值
Step2: Sender 用自己的私鑰對計算出來的 Hash 值進行加密
Step3: Sender 將簽章連同原始的檔案寄給 Receiver
Step4: Receiver 透過 Sender 對外公開的公鑰對簽章進行解密,以便取得 Sender 簽名之前就計算好的 Hash 值
Step5: Receiver 使用跟 Sender 相同的 Hash 演算法計算出原始檔案的 Hash 值
Step6: Receiver 比較前兩步驟中得出的 Hash 值,若兩者匹配則簽章驗證成功,反之則失敗
What happens if ...
Digital Certificate
SSL憑證
簡易版
詳細版
那些關於SSL/TLS的二三事(一) - Why SSL/TLS?
那些關於SSL/TLS的二三事(二) - How SSL works?