MCPcopy Create free account
hub / github.com/Cosmian/kms

github.com/Cosmian/kms

Chat with this repo
repository ↗ · DeepWiki ↗ · release 5.25.0 ↗ · + Follow · compare 2 versions
11,560 symbols 40,177 edges 1,106 files 1,675 documented · 14% updated 3d ago5.25.0 · 2026-07-09★ 32880 open issues

Browse by type

Functions 9,361 Types & classes 2,199
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

Core symbols most depended-on inside this repo

Shape

Function 6,362
Method 2,999
Class 1,783
Enum 279
Interface 137

Languages

Rust60%
TypeScript40%
Python1%
C1%

Modules by API surface

crate/server/documentation/swagger-ui/swagger-ui-bundle.js4,146 symbols
crate/test_kms_server/src/vector_runner.rs496 symbols
crate/kmip/src/kmip_1_4/kmip_operations.rs91 symbols
crate/kmip/src/kmip_2_1/kmip_operations.rs87 symbols
crate/clients/wasm/src/wasm.rs83 symbols
crate/kmip/src/kmip_2_1/kmip_types.rs67 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
crate/server_database/src/stores/sql/mysql.rs52 symbols

Dependencies from manifests, versioned

@ant-design/icons6.1.0 · 1×
@eslint/js9.39.2 · 1×
@playwright/test1.51.0 · 1×
@tailwindcss/vite4.2.0 · 1×
@testing-library/react16.3.2 · 1×
@types/node25.3.0 · 1×
@types/react19.2.14 · 1×
@types/react-dom19.2.3 · 1×
@vitejs/plugin-react-swc3.11.0 · 1×
antd5.29.3 · 1×
eslint9.39.3 · 1×

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

Ask about this repo answers extend the page