Skip to main content

Module dh

Module dh 

Source
Expand description

Diffie-Hellman helpers for the secret chat key exchange.

Structs§

DhCacheEntry
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.