Documentation

QedShare.Encoding.Tag

Secret integrity tag #

Before splitting, the CLI appends CRC-32(secret) (4 bytes) to the secret and splits secret ‖ tag as a whole. After combining, it checks the tag. This catches a wrong set of shares that got past the per-share checks (combine alone cannot tell: any set of points interpolates to some value).

The tag is split together with the secret, so no individual share reveals anything about it. It detects accidents only, not deliberate forgery (README: Threat model).

Append the 4-byte CRC-32 tag of secret.

Equations
Instances For

    Remove and check the tag: some secret if the last 4 bytes are the CRC-32 of the rest, none otherwise.

    Equations
    • One or more equations did not get rendered due to their size.
    Instances For
      theorem QedShare.Encoding.stripTag_withTag (secret : List UInt8) :
      stripTag (withTag secret) = some secret

      Checking the tag of a tagged secret succeeds and returns the secret.