Encrypted Containers

Encrypted Containers are a secure way to encrypt data and share it with specific Keeta accounts. They provide end-to-end encryption with built-in access control.

What Are They For

Encrypted Containers solve a common problem in blockchain systems: how to share private data securely. Use cases include:

  • KYC documents: Share identity verification documents with compliant anchors

  • Private transaction details: Share sensitive payment information

  • Confidential certificates: Distribute verifiable credentials

  • Secure messaging: Send encrypted data between accounts

How Are They Constructed

An Encrypted Container:

  1. Encrypts plaintext for each authorized recipient using their public key

  2. Optionally signs the container to prove authenticity

  3. Serializes to ASN.1 format for compact, standardized encoding

Advantages of the SDK

The Encrypted Container implementation in the Anchor SDK:

  • Handles cryptographic complexity: You don't need to understand ASN.1, key derivation, or cipher modes

  • Manages access control: Automatically encrypts keys for each recipient

  • Provides verification: Built-in signature support for authenticity

  • Optimizes size: Automatic compression for large payloads

  • Ensures compatibility: Standard encoding works across different implementations

Example: Creating and Sharing an Encrypted Container

https://github.com/KeetaNetwork/keetanet-examples/blob/main/src/anchor/encrypted-container.ts

Last updated