Key Management & Seed Security
Overview
Urblock uses hierarchical deterministic (HD) wallet derivation (BIP-32/44) from a master seed to generate custodial wallets for tenants. Securing this master seed is critical — compromise of the seed means compromise of all derived wallets across all tenants.
Production Architecture
Required: Hardware Security Module (HSM) / KMS
In production deployments, the master seed MUST be stored in a Hardware Security Module (HSM) or a cloud Key Management Service (KMS):
| Provider | Service | Recommended Tier |
|---|---|---|
| AWS | CloudHSM / KMS | FIPS 140-2 L3 |
| Google Cloud | Cloud HSM / Cloud KMS | FIPS 140-2 L3 |
| Azure | Dedicated HSM / Key Vault | FIPS 140-2 L3 |
| HashiCorp | Vault (Transit secrets engine) | Enterprise |
Environment Variables
# Required in production
MASTER_SEED_PROVIDER=aws-kms # Options: aws-kms, gcp-kms, azure-kms, vault, env
MASTER_SEED_KMS_KEY_ID=arn:aws:kms:us-east-1:123456789:key/...
# Only for development — NEVER use in production
MASTER_SEED=0x... # ⚠️ Plaintext seed — dev/test only
Migration Path
If you are currently using MASTER_SEED as a plaintext environment variable:
- Generate KMS key in your cloud provider
- Encrypt the seed using the KMS key and store the ciphertext
- Update configuration to use
MASTER_SEED_PROVIDER=aws-kms(or equivalent) - Remove the plaintext
MASTER_SEEDenv var from all environments - Rotate the seed if there's any suspicion of exposure
Per-Tenant Key Isolation
Each tenant derives wallets from a unique derivation path:
m/44'/60'/0'/{tenant_index}'/{wallet_index}
This ensures that even within a single seed, tenant key material is isolated at the derivation level. However, seed compromise still exposes all paths — hence the HSM/KMS requirement.
Audit Logging
All seed access operations are logged to the audit trail:
- Wallet derivation events
- Key export operations (admin-only)
- Seed rotation events
Rotation
Seed rotation is supported but requires a coordinated migration:
- Generate a new seed in KMS
- Deploy new wallets from the new seed
- Transfer assets from old wallets to new wallets
- Update derivation index tracking
- Decommission old seed (mark as rotated, keep for audit)
Note: Seed rotation is an advanced operation. Contact support for guidance on production rotations.