请帮我填写这里的空白 -
服务器保存私钥,公钥共享给用户。因此,客户端使用公钥信任来自服务器的内容。客户端如何加密他发送回服务器的内容?使用服务器的公钥?或者客户端是否发送自动生成的私钥并使用公钥对其进行加密,然后服务器将其与消息一起解密并用于双方的进一步通信。
进行 SSL 通信需要公钥和私钥。此 key 对是使用自签名证书生成的?单个自签名证书如何包含公钥和私钥。
关于消息级安全性的另一件事 -- 我正在查看当前配置并急于求成 -- 使用 IBM Ikeyman 查看生产者和消费者 JKS 文件 -- 用于消息级安全(数字签名)消费者有个人证书,生产者有签名者证书……这不是相反吗?此当前配置是否不正确 --- 顺便说一句,两个键都相同。
最佳答案
- The server keeps its private key and the public key is shared to the users.
正确。
So the client trusts the content thats coming from the server using the public key.
没有。没有关于它的“所以”。客户端信任服务器的证书,因为它是由他信任的人签名的,并且他知道它属于服务器,因为服务器提供了客户端可以验证的数字签名,只有私钥所有者可以做。因此他知道服务器拥有该公钥。
How does the client encrypt the contents he is sending back to the server ?.
客户端和服务器使用 RFC 2246 中描述的技术独立协商共享 session key 。在大多数情况下,它们根本不涉及 PKI。
Using the public key of the server? or does the client send a autogenerated private key and encrypts it using the public key which is then decypted by the server along with the message and used for furthter communication by both parties.
都不是,见上文。这是一个很大的课题。
- A Public and a Private key is required to do ssl communication.
没有。 一方必须拥有对方信任的私钥和相应的证书,否则通信是不安全的。
This Key pair is generated using a self signed certificate
没有。该声明甚至没有意义。首先生成 key 对,与证书无关。证书是公钥的包装器。
How can a single self signed certificate contain both public and private keys.
不能,也不能。自签名也没有任何关系。
关于SSL 公钥和私钥,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20490517/