This page lists threats to TKeeper, the controls that address them, and the risks that remain.
For concrete authorities, TKeeper parses the command and checks policy, approvals, audit, and key state before signing. The receiving system must verify the signature and exact action before execution. Raw arbitrary signing has no intent policy.
For protocol-level details in FROST, GG20, threshold ML-DSA, ECIES, ZK proofs, nonce handling, Paillier, and elliptic-curve math, use the Anvil threat model:
Scope
In scope:
- client authentication and authorization
- authority policy
- four eye approvals
- peer authentication and Byzantine behavior
- seal and unseal
- local key share storage
- key lifecycle operations
- trusted dealer import
- audit log integrity and sink enforcement
- external control-plane client access
- integrity and source selection of GMP, libsodium, secp256k1, and RocksDB JNI at app startup
Out of scope:
- compromise of at least
thresholdpeers - downstream systems that execute effects without verifying TKeeper proof
- bad authority policies approved by operators
- physical side channels
- host hardening
- kernel, container runtime, and hypervisor compromise
- bugs inside cloud KMS, HSM firmware, or external identity providers
Assumptions
In threshold mode, each peer stores a local key share and an operation requires a quorum. In mono mode, one host stores the full private key. Compromising that host compromises the key.
Compromising fewer than threshold peers must not give the attacker a usable private key. Compromising at least threshold peers breaks the threshold model.
The keeper must be unsealed before it can run a protected operation.
Production artifacts include only explicitly selected platforms and features. The dedicated integration artifact contains failure-injection controls and must not be deployed as a production image.
The build, dependency inputs, startup code, and delivered app artifact are trusted. Embedded native digests detect resource changes relative to that trusted build. They do not authenticate a dependency to its publisher or protect a replacement of both the code and its digests. Operators who enable -Dkeeper.native.allow-system=true must also trust the selected system libraries and their dependencies, including the search paths used to load them.
Authorities are part of the signing boundary. A key either uses arbitrary for raw signing or uses concrete authority policies. arbitrary cannot be mixed with concrete authorities on the same key.
Concrete authorities use digest-pinned OCI references. A tag is mutable and does not identify a fixed policy artifact.
Audit events are signed with the integrity key. When audit is enabled, at least one configured sink must accept the event.
Assets
| Asset | Confidentiality | Integrity | Availability |
|---|---|---|---|
| Local key shares | Critical | Critical | High |
| DEK | Critical | Critical | High |
| KEK or unseal material | Critical | Critical | High |
| Shamir unseal shares | Critical | Critical | High |
| HSM or cloud KMS credentials | Critical | Critical | High |
| JWT signing keys and JWKS | High | Critical | High |
| Key metadata and authorities | Low | Critical | High |
| Public keys and commitments | Public | Critical | High |
| Authority OCI artifacts | Low | Critical | High |
| Keys for four-eye approvals | High | Critical | Medium |
| Audit records | Low | Critical | High |
| Session context | Low | Critical | High |
| Native crypto and RocksDB implementations | Low | Critical | High |
Trust boundaries
Client to Keeper:
Requests are untrusted until authenticated and authorized. JWT mode validates token signature, kid, audience, configured issuer, token lifetime, and subject. JWT mode also requires TLS on the public server so bearer credentials are not accepted over plaintext. Dev token mode is for controlled environments.
Keeper to Keeper:
Protected internal routes require TLS outside dev mode. Requests and authenticated responses are signed and bound to the claimed peer id, request nonce, request hash, status, and body. Configure mTLS with a distinct SPKI pin per peer to bind that claimed id to the transport certificate. Without it, first enrollment depends on the shared bootstrap token and network path. Actor credentials are forwarded only to internal operation entrypoints that enforce their permissions. Peers still verify protocol data. Bad FROST, GG20, ML-DSA, or ECIES contributions are rejected. Protocols report an imposter only for failures attributable to a sender. Normal ML-DSA rejection sampling can fail without such attribution.
Keeper to OCI registry:
Authorities are loaded only from explicitly allowed OCI registries. Digest-pinned references protect against tag drift. Keeper validates each document's authority id and stores it with the reference in key metadata. Documents with duplicate ids cannot be attached to one key.
Keeper to seal provider:
Seal providers protect the DEK. Built-in providers are Shamir and HSM. External providers are AWS and Google KMS features.
Keeper storage:
Stored key material is AEAD-encrypted. Integrity-sensitive records use one of two location-bound formats: signed records bind their payload to a column family and record id. Integrity private keys and audit-HMAC keys use encrypted envelopes bound to their exact record ids. This prevents a valid record or ciphertext from being moved into another storage slot.
A legacy V1 storage upgrade validates the existing state before committing the migration. Keeper remains not-ready during migration and sealed if it fails, including during auto-unseal. Conflicting or inconsistent state is rejected. Migration preserves the existing key material without adding a signature to legacy generations. Refresh or rotate creates a signed, location-bound generation. The limits of legacy integrity checks are described under local storage tampering.
The signed initialization envelope binds the peer id and quorum tuple after unseal. Integrity and HMAC version pointers are checked against the latest stored version. Integrity-key rotation retains historical public keys but removes historical private keys.
Browser to control-plane client:
Keeper does not serve a bundled UI. A separately hosted browser client calls the authenticated public APIs. Its operator controls browser session handling and content security headers.
Build to native execution:
The build selects native resources for the artifact profile and OS/CPU target. Their SHA-256 digests are compiled into the bootstrap and checked against the final JAR. Startup extracts those resources into fresh temporary directories, then verifies their hashes before loading them. Startup cannot substitute an unchecked system library for an expected bundled library.
System fallback is off by default in production. Fallback is allowed only when no expected embedded variant exists and no unlisted matching resource is present. A present expected digest makes resource, extraction, verification, and native linking errors fatal.
Test-image builds enable system fallback by default only for linux/arm64, which lacks bundled crypto natives. Other platforms keep system fallback turned off unless explicitly overridden. These images must not be deployed in production.
Threats
T-1: client impersonation
Attack:
An attacker uses a forged or stolen token to call signing, decrypt, lifecycle, or inventory APIs.
Mitigation:
- JWT signature and
kidare checked against JWKS. - Audience, configured issuer, lifetime, and subject are checked.
- Permissions are enforced per operation.
- Key operations use key-scoped permissions such as
tkeeper.key.<keyId>.sign.
Residual risk:
A compromised IdP or long-lived token gives the attacker the permissions inside that token until it expires or is revoked.
T-2: permission misconfiguration
Attack:
A principal gets broad permissions and uses a key or lifecycle operation outside its intended scope.
Mitigation:
- Permissions are explicit.
- Key operations can be scoped per key.
- Deny entries can restrict broad grants.
- Destructive operations use separate permissions.
Residual risk:
An operator can still grant broad access. Review wildcard grants before production use.
T-3: authority downgrade
Attack:
An attacker tries to create or import a key with arbitrary authority and concrete authorities together, or tries to move a key from typed policy to raw signing.
Mitigation:
arbitrarymust be the only authority on a key.- Concrete authorities require OCI references.
- Authority ids are validated.
- Authority policy is evaluated before signing starts.
- Asset Inventory exposes key authorities for review and export.
Residual risk:
An authorized operator can create a raw-signing key on purpose. Treat arbitrary keys as high risk.
T-4: authority artifact tampering
Attack:
An attacker changes the authority artifact in the registry or points a key at a different policy.
Mitigation:
- Production references use
@sha256:.... oras.allowed-registriesrestricts outbound pulls to exact registry authorities.- TKeeper verifies the loaded authority id against the configured id.
- Authority metadata is part of signed key state.
- Audit logs record authority-related operations.
Residual risk:
If a bad policy is approved and pushed under its digest, TKeeper enforces that bad policy. Review authority artifacts before attaching them to keys.
T-5: policy or intent modeling gap
Attack:
The policy sees a weak model of the requested action and allows a command whose real effect is unsafe.
Mitigation:
- Typed authorities validate command fields before policy evaluation.
- EVM, Bitcoin, X.509, and custom authorities have separate intent builders.
arbitraryis isolated from typed authority keys.
Residual risk:
Policy can only enforce the effects it can model. Raw bytes give policy almost no semantic context. Custom authorities reject undeclared JSON fields. A backend can still bypass policy if it executes fields added after signing or taken from a separate request.
T-6: four eye replay or bypass
Attack:
An attacker reuses approval proofs for another request or tries to submit duplicate approvers.
Mitigation:
- Approvers sign a hash of the exact operation fields.
- The hash includes nonce and timestamp.
- Duplicate approver keys are rejected.
- A coordinator consumes the nonce only after enough signatures have verified and persists it across restarts for the configured approval TTL.
mmust be at least1, andmcannot exceedn. A threshold of1authorizes any configured approver.
Residual risk:
Compromised approver keys can approve malicious requests. Store approver keys separately from TKeeper peers. Protocol retries reuse the same approval, so non-coordinator peers verify its signatures, request-field binding, and TTL but do not independently consume its nonce. A compromised coordinator that bypasses its own nonce check can replay a still-fresh approval with the same approved request fields. Current lifecycle and session checks still apply, but independent peer-side replay prevention is not provided.
T-7: byzantine peer during signing
Attack:
A peer sends invalid FROST, GG20, or threshold ML-DSA data to corrupt a signature or bias the result.
Mitigation:
- FROST verifies peer proof material and signing contributions.
- FROST signing nonces are atomically consumed and cannot produce a second partial signature.
- GG20 verifies the ZK proof flow used by the protocol. MtA responses contain only the ciphertext and proof. The respondent mask and encryption randomness remain private.
- GG20 signing state emits at most one partial signature.
- FROST and GG20 session clients are destroyed on success, failure, expiry, and shutdown.
- Threshold ML-DSA binds commitments, reveals, participants, message context, and partial responses, then verifies the combined standard ML-DSA signature.
- Identified bad peers are returned as
imposters. - Signing restarts with fresh session state where the protocol reports an imposter.
Residual risk:
Byzantine peers can interrupt sessions and make signing unavailable. Threshold ML-DSA cannot identify the responsible peer for every failure. A defect that exposes an MtA mask or permits reuse of FROST/GG20 signing state can invalidate the threshold confidentiality assumption. Affected key generations require rotation, not refresh.
T-8: byzantine peer during ECIES decrypt
Attack:
A peer returns a forged partial decrypt.
Mitigation:
- Each partial decrypt includes a DLEQ proof.
- The coordinator verifies the proof against the ciphertext point, derived peer public share, and partial decrypt.
- Bad partial decrypts are skipped and reported as imposters.
- Decrypt succeeds only if enough honest partial decrypts remain.
Residual risk:
Too many unavailable or dishonest peers can stop decryption.
T-9: local storage read or tamper
Attack:
An attacker reads RocksDB files or changes stored records.
Mitigation:
- Key shares are encrypted at rest.
- The DEK is wrapped by seal material.
- Signed records protect integrity-sensitive state.
- A sealed keeper refuses protected operations.
Residual risk:
Memory forensics against an unsealed keeper can expose runtime secrets. Signatures detect altered or relocated records, but they cannot by themselves detect a coherent same-location replay of an older record set. This includes replaying a key head with its matching key and metadata records, or rolling back the complete database.
During the first upgrade from legacy V1 storage, TKeeper can authenticate the legacy ciphertext with the DEK and verify its signed metadata, but it cannot prove that an unbound ciphertext was not substituted before that migration. Relocation does not add a signature to that key material. It remains legacy until refresh or rotate.
Pre-2.2 platform side-state and sessionless destroy-marker formats that do not embed their identity remain read-compatible until the corresponding key lifecycle rewrite. Relocating one fails later consistency checks or can force a fail-closed denial of service.
Verify and protect the existing database and backups before the first 2.2 unseal. Use host storage controls, encrypted swap, durable external audit export, an independently protected monotonic checkpoint where rollback detection is required, and protected backups.
T-10: unseal material compromise
Attack:
An attacker obtains enough Shamir shares, HSM access, or cloud KMS rights to unwrap the DEK.
Mitigation:
- Shamir uses configurable
thresholdandtotal. - HSM keeps wrapping keys outside TKeeper storage.
- AWS and Google KMS providers rely on provider IAM and KMS audit logs.
- Auto-unseal can be turned off.
Residual risk:
Seal providers move trust into operators, HSM policy, or cloud IAM. Treat that material like root recovery access.
T-11: audit tampering or sink failure
Attack:
An attacker edits audit logs or makes sinks unavailable.
Mitigation:
- Audit events are signed with the integrity key, using Ed25519 when
eccis included, or ML-DSA-44 in a PQC-only build. - Verification uses the integrity public key version recorded in the event.
- If audit is enabled, protected operations require at least one available sink.
- If all configured sinks fail or time out while writing, the operation fails.
Residual risk:
Deployments without audit enabled lose this control.
T-12: trusted dealer abuse
Attack:
An authorized caller imports weak or unauthorized key material through trusted dealer flow.
Mitigation:
- Trusted dealer import is separately permissioned.
- Imported keys are checked against their declared algorithm, authorities, policy, and audit requirements.
- Stored key records are integrity-protected.
Residual risk:
Trusted dealer mode requires the importer to supply valid key material. Use it only for migration or recovery flows that need it.
T-13: key lifecycle abuse
Attack:
An attacker rotates, refreshes, destroys, or runs consistency repair on a key to cause denial of service or move the key into an unexpected state.
Mitigation:
- Lifecycle operations use separate permissions.
- Destructive operations are audit-logged.
- Key metadata and active generations are integrity-protected.
- Refresh and rotate write a new signed generation and never overwrite a legacy generation in place.
- Threshold destroy commit and cancellation messages are accepted only from the peer that prepared the signed destroy session.
- ECC refresh reshapes the existing secret shares without changing the public key. Rotate creates new key material.
- ML-DSA refresh copies each peer's existing share and public key into the new generation unchanged. It does not replace shares or refresh cryptographic material. ML-DSA rotate runs a new DKG and creates a new key.
- Consistency repair is an explicit API, not part of normal signing flow.
Residual risk:
Authorized lifecycle operators can still break availability. A compromised ML-DSA share remains compromised after refresh. Use rotate when new cryptographic material is required. Keep lifecycle permissions narrower than signing permissions.
T-14: browser client exposure
Attack:
An attacker uses the UI to trigger privileged operations from a browser session.
Mitigation:
- API callers must use the configured authentication.
- Browser-originated operations require the same permissions and approvals as other clients.
- The external frontend operator controls CSP and browser credential storage.
Residual risk:
A compromised frontend or stolen browser token can act with the operator's permissions. Restrict frontend access and avoid persistent browser storage of privileged tokens.
T-15: probabilistic ML-DSA signing exhaustion
Attack or failure:
Threshold ML-DSA attempts may repeatedly fail rejection sampling even when peers follow the protocol. An attacker can amplify the cost by submitting many authorized signing requests.
Mitigation:
- Each retry creates fresh session state and fresh signing randomness.
keeper.session.mldsa.max-roundsbounds complete signing attempts. It defaults to12.- Session expiry and caller-side deadlines bound retained state and end-to-end latency.
- Exhaustion fails closed with
SESSION_MAX_ROUNDS_EXCEEDED. No signature is returned.
Residual risk:
Threshold ML-DSA is probabilistic and does not provide a hard success-latency guarantee. Exhaustion with empty dead and imposters sets is not proof of corruption. Monitor retry counts and latency. Increasing the maximum number of attempts may improve the chance of success, but uses more resources and increases worst-case response time.
T-16: integration artifact in production
Attack:
An operator deploys the integration image, exposing the failure-injection module used to corrupt, demote, delete, or replace test key state.
Mitigation:
- Regular
shadowJaranddockerBuildinclude only selected production platforms and features. :integration-tests:failure-injectionis wired only intoshadowJarIntegrationanddockerBuildIntegration.- The integration image uses the separate
exploit/tkeeper:devtag.
Residual risk:
Build separation cannot prevent an operator from deploying the wrong artifact. Production admission and release policy must reject the integration jar and exploit/tkeeper:dev image.
T-17: downstream proof misuse
Attack:
A downstream service accepts a signature for the wrong identity or executes a payload that differs from the approved intent. Unsigned fields and replayed proofs can also cause unauthorized execution.
Mitigation:
- Verifiers pin the expected identity or public key.
- The executed effect is reconstructed from the exact governed command.
- Security-relevant context is included in the signed intent or checked before execution.
- Nonces, expiry, sequence numbers, or idempotency keys are enforced where replay matters.
- Custom-authority integrations reject or ignore undeclared fields before execution.
Residual risk:
TKeeper cannot enforce a downstream path that misinterprets or bypasses its proof. Cryptographic validity does not establish business validity, freshness, or correct environment by itself.
T-18: native library substitution or silent system fallback
Attack:
An attacker changes or removes a packaged native resource while leaving the trusted bootstrap intact. They can also arrange system library search paths so startup fallback loads a substituted library. That library could access key material or alter cryptographic and storage operations in the Keeper process.
Mitigation:
- Keeper loads native libraries before creating services.
- Build-generated, compiled SHA-256 digests bind the embedded GMP, libsodium, secp256k1, and RocksDB JNI resources to the trusted build. Packaging rejects missing, changed, or additional managed resources relative to that inventory.
- Startup verifies the extracted file before loading it. Missing, unlisted, modified, unreadable, or unloadable embedded binaries fail startup without system fallback, including when the system flag is enabled.
- System loading requires
-Dkeeper.native.allow-system=trueand the absence of an expected embedded variant for the current platform. Embedded variants retain priority when the flag is enabled.
Residual risk:
System libraries are deliberately not digest-checked when fallback is explicitly enabled. The flag is an operator trust decision, including for images on platforms without bundled crypto natives. This control covers these four app bootstrap libraries. It is not a global restriction on JVM native loading. The JVM, OS loader, transitive native dependencies, other native-using dependencies, build infrastructure, full artifact provenance, and protection of extracted files against a compromised host remain trusted deployment inputs. An attacker who can replace the compiled verifier and expected digests or control the running process is outside this control's boundary.
ECC share recovery
ECC recovery hides an honest helper's contribution from a target colluding with up to
t - 2 helpers. A malicious helper can stop recovery without the result identifying which helper caused the failure.
Recovery retries reuse the contribution for that session. New sessions use fresh random masks. The signed session context prevents reuse across different targets or helper sets. Reusing a mask across those contexts could expose a helper's share.
The arithmetic used for ECC recovery is not formally verified as constant-time. Timing and microarchitectural attacks from another process on the same host remain outside this protocol's threat model. Protect recovery hosts as part of the key-custody boundary.
Security properties
The build checks the selected modules, required security components, and restrictions on access to key storage and protected operations. Production artifacts reject failure-injection controls. See Build-time security for artifact selection and deployment checks.
| Property | Mechanism |
|---|---|
| No unilateral key use in threshold mode | t-of-n threshold protocols |
| No key reconstruction in normal threshold flows | FROST, GG20, threshold ML-DSA, and threshold ECIES use shares |
| Raw signing isolated | arbitrary cannot be mixed with concrete authorities |
| Typed signing policy | authorities validate command fields before signing |
| Authority immutability | digest-pinned OCI references |
| Binding for four-eye approvals | approver signatures over operation hash |
| Byzantine detection | protocol proofs, DLEQ checks, imposter reporting |
| Sealed state | protected operations refused until unseal |
| Storage confidentiality | DEK/KEK envelope encryption |
| Storage integrity | signed key and metadata records |
| Audit integrity | integrity-key signatures over encoded events |
| Embedded native integrity and fail-closed selection | compiled SHA-256 inventory, verification before load, explicit system opt-in only for absent variants |
Operational checklist
- Use short-lived JWTs.
- Configure the expected JWT issuer and audience explicitly.
- Do not enable dev token mode in production unless its risk is explicitly accepted and its token and permissions are protected as production credentials.
- Avoid broad wildcard permissions.
- Treat
arbitrarykeys as raw signing keys. - Use digest-pinned OCI authorities.
- Keep native system fallback turned off where embedded variants exist. Where explicitly enabled, secure the system JNI/crypto libraries and their loader paths.
- Verify release artifact provenance. Embedded digests rely on a trusted build and bootstrap.
- Review Asset Inventory exports.
- Distribute Shamir shares across separate operators.
- Restrict HSM, AWS KMS, and Google KMS access to TKeeper identities.
- Enable audit with more than one sink.
- Watch
impostersanddeadfields after failed threshold operations. - Put rate limiting in front of public endpoints.