我相信它使用了 hello 消息中发送的随机值的某种组合。来自 RFC 2246:(TLSv1.0)
RSA encrypted premaster secret message
Meaning of this message:
If RSA is being used for key agreement and authentication, the
client generates a 48-byte premaster secret, encrypts it using
the public key from the server's certificate or the temporary RSA
key provided in a server key exchange message, and sends the
result in an encrypted premaster secret message. This structure
is a variant of the client key exchange message, not a message in
itself.
Structure of this message:
struct {
ProtocolVersion client_version;
opaque random[46];
} PreMasterSecret;
client_version
The latest (newest) version supported by the client. This is
used to detect version roll-back attacks. Upon receiving the
premaster secret, the server should check that this value
matches the value transmitted by the client in the client
hello message.
random
46 securely-generated random bytes.
它将如何匹配客户端先前发送的值?有人可以解释一下吗?谢谢你!是否有任何 API 可以计算此值?