mirror of
https://github.com/hanzoai/kms.git
synced 2026-10-30 14:57:36 +00:00
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.
17 lines
470 B
Go
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)
|
|
}
|