KMIP client for Python — connect to any KMIP-compliant key management server (Thales, IBM SKLM, Entrust, Fortanix, HashiCorp Vault).
Project description
kmip-python
KMIP client for Python -- connect to any KMIP-compliant key management server.
Supports Thales CipherTrust, IBM SKLM, Entrust KeyControl, Fortanix, HashiCorp Vault Enterprise, and any KMIP 1.4 server.
pip install cyphera-kmip
Quick Start
from cyphera_kmip import KmipClient
client = KmipClient(
host="kmip-server.corp.internal",
client_cert="/path/to/client.pem",
client_key="/path/to/client-key.pem",
ca_cert="/path/to/ca.pem",
)
# Fetch a key by name (locate + get in one call)
key = client.fetch_key("my-encryption-key")
# key is bytes of raw key material (e.g., 32 bytes for AES-256)
# Or step by step:
ids = client.locate("my-key")
result = client.get(ids[0])
print(result["key_material"]) # bytes
# Create a new AES-256 key on the server
created = client.create("new-key-name", "AES", 256)
print(created["unique_identifier"])
client.close()
Operations
| Operation | Method | Description |
|---|---|---|
| Locate | client.locate(name) |
Find keys by name, returns unique IDs |
| Get | client.get(id) |
Fetch key material by unique ID |
| Create | client.create(name, algo, length) |
Create a new symmetric key |
| Fetch | client.fetch_key(name) |
Locate + Get in one call |
Authentication
KMIP uses mutual TLS (mTLS). Provide:
- Client certificate -- identifies your application to the KMS
- Client private key -- proves ownership of the certificate
- CA certificate -- validates the KMS server's certificate
client = KmipClient(
host="kmip.corp.internal",
port=5696, # default KMIP port
client_cert="/etc/kmip/client.pem",
client_key="/etc/kmip/client-key.pem",
ca_cert="/etc/kmip/ca.pem",
timeout=10, # connection timeout (seconds)
)
TTLV Codec
The low-level TTLV (Tag-Type-Length-Value) encoder/decoder is also exported for advanced use:
from cyphera_kmip import encode_structure, encode_text_string, decode_ttlv, Tag, Type
# Build custom KMIP messages
msg = encode_structure(Tag.RequestMessage, [...])
# Parse raw KMIP responses
parsed = decode_ttlv(response_bytes)
Supported KMS Servers
| Server | KMIP Version | Tested |
|---|---|---|
| Thales CipherTrust Manager | 1.x, 2.0 | Planned |
| IBM SKLM | 1.x, 2.0 | Planned |
| Entrust KeyControl | 1.x, 2.0 | Planned |
| Fortanix DSM | 2.0 | Planned |
| HashiCorp Vault Enterprise | 1.4 | Planned |
| PyKMIP (test server) | 1.0-2.0 | CI |
Zero Dependencies
This library uses only Python standard library (ssl, socket, struct). No external dependencies.
Status
Alpha. KMIP 1.4 operations: Locate, Get, Create.
License
Apache 2.0 -- Copyright 2026 Horizon Digital Engineering LLC
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cyphera_kmip-0.0.1a1.tar.gz.
File metadata
- Download URL: cyphera_kmip-0.0.1a1.tar.gz
- Upload date:
- Size: 28.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2e1546848c351fdc9298772dda29087d82aac8a122cb16aff643bd122c5314c0
|
|
| MD5 |
086d6945a7651da2bdbd4e8b6546556c
|
|
| BLAKE2b-256 |
6a58cf4b11d74111164a6d60a4c10dbb3a43a8c2648731f6b82c3eaee71f5f85
|
Provenance
The following attestation bundles were made for cyphera_kmip-0.0.1a1.tar.gz:
Publisher:
publish.yml on cyphera-labs/kmip-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cyphera_kmip-0.0.1a1.tar.gz -
Subject digest:
2e1546848c351fdc9298772dda29087d82aac8a122cb16aff643bd122c5314c0 - Sigstore transparency entry: 1357380088
- Sigstore integration time:
-
Permalink:
cyphera-labs/kmip-python@81a0d2ad0bb754f0f9879621d1e8ab584a1a673a -
Branch / Tag:
refs/tags/v0.0.1a1 - Owner: https://github.com/cyphera-labs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@81a0d2ad0bb754f0f9879621d1e8ab584a1a673a -
Trigger Event:
push
-
Statement type:
File details
Details for the file cyphera_kmip-0.0.1a1-py3-none-any.whl.
File metadata
- Download URL: cyphera_kmip-0.0.1a1-py3-none-any.whl
- Upload date:
- Size: 18.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2eabca74a58379e923ad8620b568ed916fc4f92b6841773ad946e116bfbab49b
|
|
| MD5 |
92413ecea621136afaa61be65416a310
|
|
| BLAKE2b-256 |
49ef8e70e1bb7ab1b0c448adeccb2b544868beca5e5a38a5bd958d1ecc704cf1
|
Provenance
The following attestation bundles were made for cyphera_kmip-0.0.1a1-py3-none-any.whl:
Publisher:
publish.yml on cyphera-labs/kmip-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cyphera_kmip-0.0.1a1-py3-none-any.whl -
Subject digest:
2eabca74a58379e923ad8620b568ed916fc4f92b6841773ad946e116bfbab49b - Sigstore transparency entry: 1357380222
- Sigstore integration time:
-
Permalink:
cyphera-labs/kmip-python@81a0d2ad0bb754f0f9879621d1e8ab584a1a673a -
Branch / Tag:
refs/tags/v0.0.1a1 - Owner: https://github.com/cyphera-labs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@81a0d2ad0bb754f0f9879621d1e8ab584a1a673a -
Trigger Event:
push
-
Statement type: