openssl_dh_compute_key—计算远程 DH 公钥和本地 DH 密钥的共享密钥 说明 openssl_dh_compute_key(string$public_key,#[\SensitiveParameter]OpenSSLAsymmetricKey$private_key):string|false openssl_dh_compute_key()返回的共享密钥通常用作与远端秘密通信的加密密钥。这称为 Diffie-Hellman 密钥交换。 注意:ECDH ...
secret, salt, info) // PHP: hash_hkdf($algo, $key, $length, $info, $salt) if (strcmp($ourPublicKey, $theirPublicKey) == -1) { $salt = $ourPublicKey; $info = $theirPublicKey; } else { // for simplicity the