Skip to main content

Module encrypt_decrypt

Module encrypt_decrypt 

Source

Functions§

build_message
Build plaintext message, including pubkeys (for replies). TODO: only sources need to attach their pubkeys (for replies), but for toy purposes, everyone builds a Plaintext message the same way
compute_fetch_challenges
Given a set of ciphertext bundles (C, X, Z) and their associated uuid, compute a fixed-length set of “challenges” >= the number of SeverMessageStore entries. A challenge is returned as a tuple of DH agreement outputs (or random data tuples of the same length). For benchmarking purposes, supply the rng as a separable parameter, and allow the total number of expected responses to be specified as a paremeter (worst case performance when the number of items in the server store approaches num total_responses.)
decrypt
encrypt
Encrypt a message from a sender to a recipient (step 6).
solve_fetch_challenges
Solve fetch challenges (encrypted message IDs) and return array of valid message_ids. TODO: For simplicity, serialize/deserialize is skipped