Public key encryptography accomplishes two functions:github
authentication which is when the public key is used to verify that a holder of the paired private key sent the message. 認證過程https中APP客戶端經過公鑰證書中的publicKey驗證服務器是不是但願訪問的服務器。
encryption whereby only the holder of the paired private key can decrypt the message encrypted with the public key.
public key並不用來對sender發出的消息進行任何處理,因此public key與sender所發出消息的安全性沒有關係,即不能經過public key保證發送給R的消息不被破解
public key僅用來加密R發送回S的消息,保證發送回的消息是不能被破解的。
public key和消息是一塊兒發送給對方的,沒法保證public key和消息是原配,中間過程當中兩個東西有可能其中一個被篡改了。 綜上所述,如何保證給到使用者的public key是真的,以及全部者發送給使用者的消息不被破解,須要額外的加密方法。
數字簽名(digital signatures) a message is signed with the sender's private key and can be verified by anyone who has access to the sender's public key. This verification proves that the sender had access to the private key, and therefore is likely to be the person associated with the public key.