Skip to content

Wrapping key is sensitive and cannot be exported from the HSM. #762

@serene-kitfisto-8899

Description

@serene-kitfisto-8899

Hi,

I try to unwrap a key from the KMS using the HSM key, and I've got the fallowing message :

$ cosmian kms sym keys unwrap test.json -i hsm::1::master_kek

ERROR: Get: REST Request Failed: /kmip/2_1: Database Error: Ext. store error: This key is sensitive and cannot be exported from the HSM.

This key master key was created with p11tool with the fallowing command :

$ pkcs11-tool --slot 1 --key-type AES:16 --keygen --label master_kek

And the test.json content is a simple symetic key created like :

$  cosmian kms sym keys create --algorithm aes --number-of-bits 256 --wrapping-key-id hsm::1::master_kek
The symmetric key was successfully generated.
          Unique identifier: 5f386ce8-9490-44d3-afa3-8df0b13ca6e9
$ cosmian kms sym keys export test.json --key-id 5f386ce8-9490-44d3-afa3-8df0b13ca6e9

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions