Documentation

Cryptlib.Protocols.BACAP.API

BACAP API over BLAKE2b-512 HKDF and AES-256-GCM-SIV #

Stateless: callers hold their own index. Operations take capabilities rather than loose keys, so pk = publicKey sk holds by construction.

MessageBoxIndex: ratchet advancement #

MessageBoxIndex: box IDs #

MessageBoxIndex: sign, verify, encrypt, decrypt #

Sign ciphertext with the blinded key for this index and ctx; returns (box ID, signature). The signature is plain Ed25519 under the box ID.

Equations
Instances For

    Returns (box ID, ciphertext, signature). The box ID's first 12 bytes are the AEAD nonce; all 32 bytes are the AD.

    Equations
    Instances For

      Verify the signature, then decrypt. A tombstone (empty ciphertext) decrypts to empty.

      Equations
      Instances For

        Capabilities #

        Re-seed this cap's index from ctx.

        Equations
        Instances For

          Re-seed this cap's index from ctx.

          Equations
          Instances For

            Mutating a write cap and its read cap by the same context lands them on the same sequence.

            Key generation from the system CSPRNG #

            A fresh root keypair and starting index.

            Equations
            • One or more equations did not get rendered due to their size.
            Instances For

              Correctness #

              Decrypting a box encrypted under the same cap, index and context returns the plaintext.