#serde #serialization #kmip #ttlv


KMIP protocol object (de)serialization

8 unstable releases (3 breaking)

0.4.1 Oct 29, 2021
0.4.0 Oct 14, 2021
0.3.2 Oct 5, 2021
0.3.0 Sep 29, 2021
0.1.0 Aug 30, 2021

#601 in Encoding

Download history 21/week @ 2022-01-24 6/week @ 2022-01-31 1/week @ 2022-02-07 5/week @ 2022-02-14 10/week @ 2022-02-21 5/week @ 2022-02-28 3/week @ 2022-03-07 26/week @ 2022-03-14 26/week @ 2022-03-21 1/week @ 2022-03-28 20/week @ 2022-04-04 2/week @ 2022-04-11 14/week @ 2022-04-18 115/week @ 2022-04-25 49/week @ 2022-05-02 58/week @ 2022-05-09

236 downloads per month


6.5K SLoC

CI Crate Docs

kmip-protocol - A library for (de)serializing KMIP protocol objects


The OASIS Key Management Interoperability Protocol specifications which define message formats for the manipulation of cryptographic material on a key management server.


This crate offers a partial implementation of (de)serialization of KMIP v1.0-1.2 protocol messages for use primarily by the Krill project. The interface offered is based on the popular Rust Serde (de)serialization framework for decorating arbitrary high level Rust "business object" structs with attributes that guide the (de)serialization process.

For details about the level of specification implementation and test coverage see the crate documentation.


This crate consists of:

  • Many Serde attributed Rust type definitions that represent KMIP request and response business objects.
  • A Client struct that uses the kmip-ttlv crate to serialize entire KMIP requests (composed from business object types) to a writer and deserialize the responses from a reader.
  • Optional sample sync and async TLS implementations showing how the Client can be used to communicate with a KMIP server.


This is a work-in-progress. The interface offered by this library is expected to change and no guarantee of interface stability is made at this time. At the time of writing limited manual testing with PyKMIP (results) and Kryptus HSM (results) appears to work as expected.

Example Code

See examples/demo/. For more information about running the example see:

cargo run --example demo --features tls-with-rustls -- --help


~186K SLoC