MCPcopy Index your code
hub / github.com/Cosmian/kms

github.com/Cosmian/kms @5.24.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release 5.24.0 ↗ · + Follow
10,934 symbols 37,187 edges 1,055 files 1,464 documented · 13%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Cosmian KMS

CI Tests Release Docs Container Security License FIPS

Note: Cosmian has become part of Eviden. The Cosmian KMS is now the Eviden KMS.

The Cosmian KMS is a high-performance, source-available FIPS 140-3 compliant server application written in Rust.

Online documentation.

KMS WebUI

Built-in Web UI for administration and operations.

The Cosmian KMS presents some unique features, such as:

The Cosmian KMS is both a Key Management System and a Public Key Infrastructure. As a KMS, it is designed to manage the lifecycle of keys and provide scalable cryptographic services such as on-the-fly key generation, encryption, and decryption operations.

The Cosmian KMS supports all the standard NIST cryptographic algorithms as well as advanced post-quantum cryptography algorithms such as Covercrypt, and FF1 format-preserving encryption in non-FIPS mode. Please refer to the list of supported algorithms.

As a PKI it can manage root and intermediate certificates, sign and verify certificates, use their public keys to encrypt and decrypt data. Certificates can be exported under various formats, including PKCS#12 modern and legacy flavor, to be used in various applications, such as in S/MIME encrypted emails.

The Cosmian KMS has extensive online documentation.

🚀 Quick start

Pre-built binaries are available for Linux, MacOS, and Windows, as well as Docker images. To run the server binary, OpenSSL must be available in your path (see "building the KMS" below for details); other binaries do not have this requirement.

Using Docker to quick-start a Cosmian KMS server on http://localhost:9998 that stores its data inside the container, run the following command:

docker run -p 9998:9998 --name kms ghcr.io/cosmian/kms:latest

Then, use the CLI to issue commands to the KMS. The CLI, called cosmian, can be either:

▶️ Example

  1. Create a 256-bit symmetric key

    ```sh ➜ ckms sym keys create --number-of-bits 256 --algorithm aes --tag my-key-file ... The symmetric key was successfully generated. Unique identifier: 87e9e2a8-4538-4701-aa8c-e3af94e44a9e

    Tags: - my-key-file ```

  2. Encrypt the image.png file with AES GCM using the key

    sh ➜ ckms sym encrypt --tag my-key-file --output-file image.enc image.png ... The encrypted file is available at "image.enc"

  3. Decrypt the image.enc file using the key

    sh ➜ ckms sym decrypt --tag my-key-file --output-file image2.png image.enc ... The decrypted file is available at "image2.png"

See the documentation for more.

⭐ Why Cosmian KMS

  • Performance: built in Rust for low-latency crypto and high throughput.
  • Trust by design: FIPS 140-3 mode by default; non-FIPS for broader algorithm access when needed.
  • Interoperable: full KMIP 1.0–2.1 support, PKCS#11 integrations, rich client tooling, and a built-in OpenAPI 3.1 spec with Swagger UI.
  • HSM-first: optional HSM key-wrapping and vendor modules (Utimaco, SmartCard-HSM, Proteccio, Crypt2pay…).
  • Cloud-native: official Docker image, simple horizontal scaling, and OpenTelemetry observability.
  • End-to-end: server, CLI, and web UI for a complete developer and operator experience.

🎯 Top Use Cases

  • Application‑level encryption at scale (files, objects, datasets) with centralized key lifecycle.
  • Database TDE and integration (Oracle TDE, Percona PostgreSQL, MongoDB, MySQL) via KMIP/PKCS#11.
  • Enterprise integrations: Google Workspace CSE, Microsoft DKE, Microsoft SQL Server External (EKM), AWS XKS v2, and Azure EKM.
  • HSM-backed key protection and policy‑driven access controls.
  • PKI operations: issue, sign, validate, and automate certificate lifecycles.

🔒 Security & Compliance

[TOC]

🔐 HSM support

HSM Status
Proteccio (Bull Atos)
Crypt2pay
Utimaco SecurityServer
CardContact SmartCard-HSM / Nitrokey HSM 2
SoftHSM2 (testing)
AWS CloudHSM 🚧
Azure Dedicated HSM 🚧
GCP Cloud HSM 🚧

🔗 Integrations

Legend: ✅ implemented · 🚧 not yet implemented

☁️ Cloud Provider — External Key Management

Cloud providers offer mechanisms that let you hold cryptographic keys outside their infrastructure. There are three distinct delegation models:

Term Meaning
XKS AWS External Key Store — every encrypt/decrypt is proxied live to your KMS; the key material never enters AWS.
EKM GCP External Key Manager — same live-proxy model; Google never holds the key material.
DKE Microsoft Double Key Encryption — one key lives in Azure/M365, the second key lives exclusively in your KMS; both are required to decrypt.
HYOK Hold Your Own Key (Oracle) — OCI Vault External KMS; every encrypt/decrypt is proxied live to your KMS; the key material never enters OCI.
BYOK Bring Your Own Key — you generate key material and import it into the provider's KMS; the provider then holds a copy.
CMK Customer-Managed Key — the provider generates and stores the key in their KMS, but you control lifecycle (rotate, disable, delete).

Amazon Web Services (AWS)

AWS XKS is a single proxy API that AWS KMS calls on behalf of every service — S3, EBS, RDS, DynamoDB, Secrets Manager, etc. all route through the same endpoint. Implementing the XKS Proxy API once gives Cosmian KMS live-proxy coverage for all XKS-capable AWS services with no per-service work.

Delegation model Description Status
XKS (live proxy) Key material never enters AWS; every encrypt/decrypt is proxied to Cosmian KMS — covers all AWS services that support KMS encryption (S3, EBS, RDS, DynamoDB, Secrets Manager, SQS, SNS, Redshift, OpenSearch, EMR, Glue, Lambda…) — docs
BYOK Key material generated by you and imported once into AWS KMS; AWS holds a copy

Extension points exported contracts — how you extend this code

Base64Display (Interface)
Extension trait to add base64 display functionality to byte types [6 implementers]
crate/kmip/src/kmip_2_1/kmip_operations.rs
CryptoOpSpec (Interface)
Declarative specification for KMIP cryptographic operations. Implemented by zero-sized marker types (one per operation) [6 …
crate/server/src/core/operations/key_ops/crypto_op.rs
HsmProvider (Interface)
(no doc) [6 implementers]
crate/hsm/base_hsm/src/hsm_capabilities.rs
PlaceholderTrait (Interface)
Handle different placeholders naming (bind parameter or function) in SQL databases. This trait contains default naming o [3 …
crate/server_database/src/stores/sql/locate_query.rs
ObjectsStore (Interface)
(no doc) [5 implementers]
crate/interfaces/src/stores/objects_store.rs
KmsCliResultHelper (Interface)
Trait for providing helper methods for `KmsCliResult`. [2 implementers]
crate/clients/clap/src/error/result.rs
Route (Interface)
* Centralised KMS UI route map for E2E tests. * * Keep all UI path strings here. Individual spec files import only th
ui/tests/e2e/routes.ts
EncryptionSystem (Interface)
(no doc) [2 implementers]
crate/crypto/src/crypto/mod.rs

Core symbols most depended-on inside this repo

clone
called by 1923
crate/server/documentation/swagger-ui/swagger-ui-bundle.js
i
called by 1295
crate/server/documentation/swagger-ui/swagger-ui-bundle.js
push
called by 1260
crate/server/documentation/swagger-ui/swagger-ui-bundle.js
get
called by 945
crate/server/documentation/swagger-ui/swagger-ui-bundle.js
map
called by 852
crate/server/documentation/swagger-ui/swagger-ui-bundle.js
from
called by 799
crate/server/documentation/swagger-ui/swagger-ui-bundle.js
len
called by 506
crate/clients/pkcs11/module/src/objects_store.rs
set
called by 478
crate/server/documentation/swagger-ui/swagger-ui-bundle.js

Shape

Function 5,934
Method 2,851
Class 1,750
Enum 275
Interface 124

Languages

Rust58%
TypeScript41%
C1%

Modules by API surface

crate/server/documentation/swagger-ui/swagger-ui-bundle.js4,146 symbols
crate/test_kms_server/src/vector_runner.rs402 symbols
crate/kmip/src/kmip_1_4/kmip_operations.rs91 symbols
crate/kmip/src/kmip_2_1/kmip_operations.rs85 symbols
crate/clients/clap/src/actions/bench.rs78 symbols
crate/clients/wasm/src/wasm.rs69 symbols
crate/kmip/src/kmip_2_1/kmip_types.rs66 symbols
crate/clients/pkcs11/module/src/tests.rs56 symbols
crate/kmip/src/ttlv/tests/kmip_2_1_tests.rs55 symbols
crate/kmip/src/kmip_1_4/kmip_data_structures.rs55 symbols
crate/kmip/src/kmip_0/kmip_types.rs55 symbols
crate/clients/client/src/kms_rest_client.rs53 symbols

Datastores touched

(mysql)Database · 1 repos
kmsDatabase · 1 repos
kmsDatabase · 1 repos
dbDatabase · 1 repos
dbDatabase · 1 repos
(mongodb)Database · 1 repos
testdbDatabase · 1 repos
testdbDatabase · 1 repos

For agents

$ claude mcp add kms \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact