Function sodiumoxide::crypto::kx::x25519blake2b::server_session_keys [−][src]
pub fn server_session_keys(
server_pk: &PublicKey,
server_sk: &SecretKey,
client_pk: &PublicKey
) -> Result<(SessionKey, SessionKey), ()>
Expand description
server_session_keys()
computes a pair of shared keys (rx and tx) using the server’s public
key server_pk
, the server’s secret key server_sk
and the client’s public key client_pk
.
If the client’s public key is acceptable, it returns the two shared keys, the first for rx
and the second for tx
. Otherwise, it returns None
.