Files
kms/sdk/go/encoding.go
zeekay 4d26e1e083 feat: implement ZK-KMS client SDK with zero-knowledge secret management
Go client library (github.com/hanzoai/kms-sdk-go) for interacting with the
distributed MPC node cluster. All encryption/decryption is client-side:

- CEK derivation: Argon2id (256MiB, t=4, p=2) -> HKDF-SHA256
- Secret CRUD: AES-256-GCM with org-scoped AAD, random nonces
- Member management: HPKE ML-KEM-768+X25519 hybrid CEK wrapping
- CRDT sync trigger and SSE watch for change events
- Quorum reads and broadcast writes with configurable threshold

The CEK never leaves the client. MPC nodes store only encrypted blobs.
Uses luxfi/crypto/encryption for post-quantum HPKE operations.
2026-03-25 21:45:09 -07:00

17 lines
470 B
Go

// Copyright (C) 2020-2026, Hanzo AI Inc. All rights reserved.
// See the file LICENSE for licensing terms.
package kms
import "encoding/base64"
// base64URLEncode encodes data to URL-safe base64 without padding.
func base64URLEncode(data []byte) string {
return base64.RawURLEncoding.EncodeToString(data)
}
// base64URLDecode decodes URL-safe base64 without padding.
func base64URLDecode(s string) ([]byte, error) {
return base64.RawURLEncoding.DecodeString(s)
}