Skip to main content

decode_parallel

Function decode_parallel 

Source
pub fn decode_parallel(
    shared_secret: &[u8],
    packet: &KkParallelPacket,
) -> Result<Vec<u8>>
Expand description

Decode a parallel-encoded packet, verifying the Merkle root and each chunk.

Steps:

  1. Recompute the Merkle root from chunk commitments
  2. Verify it matches the packet’s stored root (detects reorder/tamper)
  3. Decrypt all chunks in parallel
  4. Concatenate plaintext in order