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.