| Crates.io | cosmian_kms_interfaces |
| lib.rs | cosmian_kms_interfaces |
| version | 5.9.0 |
| created_at | 2025-05-09 03:02:41.240457+00 |
| updated_at | 2025-09-15 16:11:47.254379+00 |
| description | Crate exposing APIs for plugins to the Cosmian KMS |
| homepage | |
| repository | https://github.com/Cosmian/kms |
| max_upload_size | |
| id | 1666135 |
| size | 81,272 |
This crate provides the core interfaces and APIs for plugins and extensions to the Cosmian Key Management System (KMS). It defines the contracts that external systems must implement to integrate with the KMS server.
The cosmian_kms_interfaces crate is designed to enable extensibility of the Cosmian KMS through well-defined plugin interfaces. It provides abstractions for:
The HSM interface (hsm module) provides:
Supported algorithms:
The stores interface (stores module) provides:
The encryption oracle interface provides:
This crate is primarily intended for:
Note: The plugin API is currently in early development and subject to change. No stable public API is currently guaranteed.
To implement a plugin:
cosmian_kms_interfacesHSM, ObjectsStore, EncryptionOracle, etc.)InterfaceErrorasync-trait┌─────────────────────────────────────────────────────────────┐
│ Cosmian KMS Server │
├─────────────────────────────────────────────────────────────┤
│ cosmian_kms_interfaces │
├─────────────────────────────────────────────────────────────┤
│ HSM Interface │ Storage Interface │ Encryption Oracle │
├─────────────────┼─────────────────────┼─────────────────────┤
│ PKCS#11 HSMs │ Database Backends │ Crypto Providers │
│ - Utimaco │ - SQLite │ - Custom Algos │
│ - SoftHSM │ - PostgreSQL │ - External APIs │
│ - Proteccio │ - MySQL │ │
└─────────────────┴─────────────────────┴─────────────────────┘
All interface methods return InterfaceResult<T> which wraps the standard Result<T, InterfaceError>. The InterfaceError enum provides structured error information for:
async-trait for non-blocking operationsSee the existing implementations in the KMS codebase:
crate/hsm/base_hsm/, crate/hsm/utimaco/, etc.crate/server_database/Planned features include:
This crate is part of the Cosmian KMS project and is licensed under the Business Source License 1.1 (BUSL-1.1).