Expand description
Diffie-Hellman helpers for the secret chat key exchange.
Structs§
- DhCache
Entry - Cached DH configuration from
messages.getDhConfig. - DhContext
- Active DH state for one side of a key exchange. Holds the private exponent and the computed public value (g^private mod p).
Constants§
- DEFAULT_
LAYER - Secret chat layer this crate advertises to the peer via
notify_layer.
Functions§
- compute_
fingerprint - Compute key_fingerprint = last 8 bytes of SHA1(auth_key) as little-endian i64.
- compute_
shared_ from_ raw - Compute the shared secret from raw private key bytes and the remote public value.
- validate_
dh_ value - Validate a DH public value against the prime.