4.5.1 Envelope structure

At a high level, PXP-201 consists of:

  1. Ciphertext payload stored somewhere (e.g. IPFS or any URI),

  2. Envelope carrying metadata, integrity hashes, and access rules,

  3. Wrapped key material per recipient (WK1: secp256k1 ECDH + HKDF + AES-GCM).

PXP-201 schema

flowchart TB
  A[Plaintext] --> B[AES-256-GCM encrypt\nDEK + nonce]
  B --> C[Ciphertext + ciphertextHash]
  C --> D[Store ciphertext\n(uri e.g. ipfs://...)]
  B --> E[Wrap DEK per recipient\nsecp256k1 ECDH + HKDF-SHA256]
  E --> F[Envelope\nv, typ, cipher, kdf,\naccess.recipients[], uri,\nciphertextHash, meta, createdAt]
  F --> G[validateEnvelope()]
  G --> H[Recipient unwraps DEK]
  H --> I[Decrypt -> Plaintext]

Last updated