Skip to main content

encode_bound

Function encode_bound 

Source
pub fn encode_bound(
    shared_secret: &[u8],
    plaintext: &[u8],
    verifier_nonce: &[u8; 32],
    prev_mac: &[u8; 32],
) -> Result<KkBoundPacket>
Expand description

Encode plaintext with a full temporal proof (challenge-response).

§Protocol

Verifier ── generate_challenge() ──→ nonce ──→ Prover
Prover   ── encode_bound(secret, plain, nonce, prev_mac) ──→ KkBoundPacket

§Arguments

  • shared_secret, the pre-shared key
  • plaintext, data to encode
  • verifier_nonce, challenge nonce from the verifier
  • prev_mac, MAC of the previous proof in the chain, or temporal::GENESIS_MAC for the first message