Skip to main content

Security Model

The Carabaas security model is built on three pillars: MPC threshold cryptography (no single party holds a complete key), hardware enclave isolation (secrets are inaccessible to infrastructure operators), and multi-layer encryption at rest (defense-in-depth for stored data).

No Single Party Holds a Complete Key

A complete private key is never instantiated — not in any cosigner's memory, not on any disk, and not anywhere in the platform. This is a mathematical property of the MPC protocol, not a policy control.

  • During vault setup, each cosigner independently generates its own key share. No party computes or distributes the full private key.
  • During signing, cosigners execute a multi-round protocol that produces a valid signature without any party computing the full key. Each cosigner contributes a partial computation; the platform assembles the result.
  • During key rotation (reshare), key shares are re-encrypted for the new cosigner. The full key is never assembled.

Consequence: Compromising a single cosigner — even with full root access, memory dump, and all disk contents — does not expose the complete wallet private key.

Enclave Isolation

In production, the cosigner runs inside an AWS Nitro Enclave — a hardware-isolated virtual machine with no persistent storage, no network access, and no interactive access (no SSH, no shell).

The parent application on the host EC2 instance acts as a message relay only — it handles networking and file I/O but never has access to key material, encryption keys, or the cosigner's identity private key.

What Stays Inside the Enclave

Inside Enclave (never exits)Crosses VSOCK Boundary
BIP39 mnemonic & seedEncrypted mnemonic shares (opaque ciphertext)
Master private keysDerived public keys and chaincodes
MPC key shares (plaintext)Encrypted MPC key files
Cosigner RSA-4096 private keySigned JWTs, public key + id
Storage encryption KEKFinal assembled signatures

Attestation

The enclave produces AWS Nitro attestation documents — cryptographically signed by the Nitro Hypervisor — proving the identity and integrity of the running code:

PCR RegisterContent
PCR0Hash of the enclave image (EIF)
PCR1Hash of the Linux kernel
PCR2Hash of the application
PCR8Hash of the signing certificate (if signed)

Unseal key holders should verify the attestation document before submitting their passwords, confirming they are communicating with a genuine, unmodified enclave.

Multi-Layer Encryption at Rest

All sensitive data is protected by multiple independent encryption layers:

LayerAlgorithmKey SourcePurpose
1EBS volume encryptionAWS KMS CMK, tied to IAM roleInfrastructure-level disk encryption
2AES-256-GCM (app-level)HKDF-derived KEK inside enclaveMPC key file envelope encryption
3AES-256-GCM + Argon2idPassword-derived key (64 MiB, p=4)Mnemonic share encryption

Even if all layers are defeated, the attacker obtains only one MPC key share — not the complete wallet key.

Storage Tiers

PropertyTier 1: Local DiskTier 2: S3 + KMSTier 3: Physical HSM
Seed locationEnclave memoryEnclave memoryHSM hardware (never in memory)
File encryptionHKDF from seedKMS DEK (PCR-attested)HSM wrapping key
Access controlOS file permissionsKMS policy + PCR attestationHSM CU credentials
DurabilitySingle diskS3 (11 nines)HSM cluster (multi-AZ)
ComplianceSOC 2SOC 2SOC 2 + FIPS 140-2 L3

Seal / Unseal Security

The seal/unseal mechanism ensures that technical personnel cannot access cryptographic material. Even with full root access, the cosigner remains inert until unsealed by designated key holders.

Key security properties:

  • Separation of duties — infrastructure operators are distinct from unseal key holders. Neither role alone can access secrets.
  • No persistent plaintext — the mnemonic exists only in enclave memory while READY. It is never written to disk in plaintext.
  • 2-of-3 threshold — a single compromised key holder cannot unseal the cosigner.
  • Rate limiting — 5 failed unseal attempts trigger exponential backoff lockout (1 min to 1 hour max).
  • Auto-seal on restart — every process restart, server reboot, or software upgrade returns the cosigner to SEALED state.

See Seal / Unseal for the full lifecycle.

Signing Security

The cosigner implements CMP (Canetti–Maurer–Paillier) for ECDSA and an asymmetric protocol for EdDSA.

AlgorithmCurveUse Case
ECDSAsecp256k1Bitcoin, Ethereum, and compatible chains
ECDSAsecp256r1 (P-256)Blockchains using the NIST P-256 curve
EdDSAEd25519Solana, Cardano, and compatible chains

Before signing, the cosigner independently verifies quorum approval signatures. After signing, it independently verifies the assembled signature using the derived public key — rejecting it if verification fails.

Threat Model Summary

ThreatProtectionHow
Provider goes rogue or ceases operationsMerchant can recover independentlyPer-vault key ejection or escrowed seed backup; provider cannot block recovery
Single-party key theftMathematically impossibleMPC 2-of-2 threshold; complete key is never instantiated anywhere
Unauthorized transactionsMerchant-controlled governanceQuorum approval policies, role-based access, signing requires merchant's cosigner
Server / infrastructure compromiseZero key material exposedAWS Nitro Enclave isolation; host process is relay only; multi-layer encryption at rest
Insider threat (provider or merchant)No unilateral access to keysSeparation of duties: infrastructure operators ≠ unseal key holders ≠ approvers
Compromised platform infrastructureCannot extract key shares or bypass approvalMPC protocol guarantee; cosigner independently verifies quorum before signing
Disk theft / forensicsMulti-layer encryptionAES-256-GCM (app) + KMS (infra) + Argon2id passwords; three independent layers
Unseal key holder compromise (1 of 3)No impactShamir threshold not met; single share reveals zero information (information-theoretic)
Modified enclave imageDetected via attestationPCR hash changes on any modification; unseal key holders verify before submitting

Cryptographic Primitives

PrimitiveUsage
AES-256-GCMShare encryption, key file envelope encryption, identity encryption
Argon2id (t=3, m=64MiB, p=4)Password-based key derivation for unseal shares
HKDF-SHA256Storage KEK derivation from seed
HMAC-SHA512BIP32 master key derivation
RSA-4096 (RS256, OAEP)Cosigner identity, JWT signing, reshare encryption
Ed25519Unseal key holder identity, challenge-response auth
Shamir Secret SharingMnemonic splitting (2-of-3 threshold)
BIP32 / BIP44Hierarchical deterministic key derivation
Nitro Attestation (COSE_Sign1)Enclave code integrity proof via PCR registers

Data in Transit

ChannelProtocolAuthenticationEncryption
Cosigner ↔ PlatformWebSocketJWT (RS256, signed inside enclave)TLS
Unseal Key Holder ↔ CosignerHTTPSChallenge-response (Ed25519)TLS
Parent ↔ EnclaveVSOCKHypervisor-mediatedN/A (isolated channel)
API Client ↔ PlatformHTTPSSelf-signed JWT (RS256)TLS

Regulatory Alignment

The Carabaas self-custody platform aligns with:

  • EU MiCA (Article 75) — custody safeguarding requirements
  • DORA (Articles 28–30) — ICT third-party risk management and exit planning
  • EBA outsourcing guidelines — proportionality, due diligence, exit strategies
  • U.S. state custody expectations — key control, segregation, auditability

The merchant remains the regulated entity. Carabaas is classified as an ICT infrastructure provider, not a custodian — it cannot independently authorize, execute, or block transactions.

See Compliance & Regulatory for detailed positioning.