Skip to content

cover_crypt example_kms.py fails #44

@andetlei

Description

@andetlei

Hi

We have started to play a around with cover crypt to better understand the functionality etc.
We have started a kms server ( 5.11.0) and now we try to run the example_kms.py

This has been failing in two step.

First we noticed that, we explicit had to set the "sensitive" indication in line #28 in init.py

return await super().create_cover_crypt_master_key_pair(policy.to_bytes(), False)

We are not really sure why, as there is a default setting for this.
Could it be that this do not work for async functions ?

The next problem we have not found a solution for. It seems that the client encode and send something, that the server cannot understand:

   File "/home/andetlei/workspace/kmipabe/venv/lib/python3.12/site-packages/cloudproof_py/kms/__init__.py", line 28, in create_cover_crypt_master_key_pair
    return await super().create_cover_crypt_master_key_pair(policy.to_bytes(), False)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Exception: REST Request Failed: /kmip/2_1: Codec_Error: deserialize_ignored_any: should not be called by ByteString deserializer

On the server side this is seen:

2025-10-31T14:47:01.566621Z  INFO ThreadId(27) kmip_2_1: kmip: crate/server/src/routes/kmip.rs:166: [kmip_2_1_json] POST /kmip/2_1. Request: "CreateKeyPair" admin user="admin" tag="CreateKeyPair"
2025-10-31T14:47:01.566693Z  WARN ThreadId(27) cosmian_kms_server::routes: crate/server/src/routes/mod.rs:57: [error_response] 422 Unprocessable Entity - Codec_Error: deserialize_ignored_any: should not be called by ByteString deserializer

We have tried to create a cover_crypt master key pair using the CLI, this works fine.

BR
Leif A

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions