zeekayandHanzo Dev b3c3352306 docs(kms): the HTTP and ZAP planes do not store the same bytes
The encryption section I just wrote said every secret gets a per-secret DEK
sealed under the REK. That is true of the ZAP plane and NOT of the HTTP plane,
and the difference is observable.

pkg/zapserver/server.go seals and unseals for real: store.Seal(s.masterKey, ...)
on put (:536), store.Open(s.masterKey, sec) on get (:509).

cmd/kms/main.go does neither. putSecretHandler assigns Ciphertext:
[]byte(req.Value) and the GET handler returns string(sec.Ciphertext). The field
is named Ciphertext but on this path it holds the value as given. What protects
it is whole-keyspace encryption at rest (KMS_ENCRYPTION_KEY_B64 via the storage
engine) plus org-scoped JWT and TLS — no per-secret key, no AAD address binding.

So mixing transports against one store misbehaves in both directions: write over
ZAP and read over HTTP and you get the sealed bytes back instead of the value;
write over HTTP and read over ZAP and the unseal fails for want of a wrapped DEK.
The page now says this plainly and tells readers to pick one transport per
secret, rather than implying an envelope that half the API does not apply.

Co-authored-by: Hanzo Dev <[email protected]>
2026-07-26 08:19:05 -07:00
2026-02-14 05:26:19 -08:00

Lux Network Documentation

Official documentation for Lux Network - Post-quantum secure blockchain infrastructure.

Built with @hanzo/docs - the documentation framework by Hanzo AI.

Getting Started

# Install dependencies
pnpm install

# Start development server
pnpm dev

# Build for production
pnpm build

Documentation Structure

content/
└── docs/
    ├── index.mdx          # Welcome page
    ├── learn/             # Learning resources
    │   ├── introduction/  # Introduction to Lux
    │   ├── architecture/  # Architecture deep-dive
    │   └── consensus/     # Consensus mechanisms
    ├── build/             # Developer guides
    │   ├── quickstart/    # Quick start guide
    │   ├── sdk/           # SDK documentation
    │   └── contracts/     # Smart contract development
    ├── nodes/             # Node operation
    │   ├── run/           # Running a node
    │   ├── validators/    # Validator setup
    │   └── staking/       # Staking guide
    └── reference/         # API reference
        ├── api/           # REST/RPC API
        └── cli/           # CLI reference

Contributing

  1. Fork the repository
  2. Create your feature branch
  3. Add or modify documentation in content/docs/
  4. Submit a pull request

License

MIT © Lux Network


Part of the Hanzo Docs ecosystem.

S
Description
Documentation site for Lux Network's architecture, SDKs, and node operations.
Readme BSD-3-Clause
5.4 MiB
Languages
MDX 99.2%
TypeScript 0.8%