Skip to main content

encode

Function encode 

Source
pub fn encode(shared_secret: &[u8], plaintext: &[u8]) -> Result<KkPacket>
Expand description

Encode plaintext using the KK primitive.

This is the fundamental KK operation:

  1. Capture entropy from the universe at this exact moment
  2. For each symbol, derive a unique key from (secret, ε, position)
  3. XOR the symbol with its key, the symbol’s value is now a function of the universe at the instant it was born
  4. Create a temporal commitment binding everything together

The returned KkPacket contains everything the receiver needs.