Skip to main content

Module crypto

Module crypto 

Source

Re-exports§

pub use megolm::RoomCrypto;

Modules§

dm
huddle 0.7.1: End-to-end DM key derivation via Ed25519→X25519 ECDH.
megolm
Megolm group session management per room.
passphrase
Passphrase-derived key wrapping for Megolm session keys.
sas
Short-Authentication-String (SAS) verification — Phase G.

Constants§

SIGNED_ENVELOPE_WINDOW_MS
huddle 0.7.11: max accepted skew between signed_at_ms on a signed envelope and the receiver’s wall clock. Anything outside the window is rejected as a replay (or as a clock that’s drifted too far).

Functions§

sign_message
Wrap a RoomMessage into a SignedRoomMessage using the given identity’s signing key. Mirror of verify_signed; symmetric helper so phase B/F/G/etc. don’t each open-code the base64 dance.
sign_message_at
Same as sign_message but with an explicit timestamp — used by the replay-window unit tests so the clock isn’t a hidden dependency.
verify_signed
Verify a SignedRoomMessage envelope:
verify_signed_at
Same as verify_signed but with an explicit clock and window — kept public for tests that want to exercise the replay-window logic deterministically without a SystemTime detour.