Cryptography
Opscotch provides cryptographic capabilities at two layers: the packager for key generation and workflow package security, and the runtime for in-workflow cryptographic operations.
This page covers the user-facing cryptographic surface: key formats, key generation, package signing and encryption, bootstrap key configuration, and the workflow CryptoContext API.
Cryptography Overview
Opscotch uses libsodium (also known as Sodium) for all cryptographic operations. libsodium is a modern, well-audited cryptographic library that provides secure, easy-to-use primitives.
Key Concepts
- Purpose: The role a key plays in cryptographic operations. Opscotch supports four purposes:
sign,authenticated,anonymous, andsymmetric. - Type: Whether the key is secret (private) or public. Key type can be
secretorpublic. - Key format: All keys are represented as hex-encoded strings in configuration and API responses.
BYOK: Bring Your Own Keys
Opscotch supports BYOK workflows through multiple key provisioning options. This is a core design principle - you control your cryptographic keys throughout their lifecycle.