Skip to content

pkcs11: Generating and storing keys #5256

@abhkr24

Description

@abhkr24

Hi!
I am trying to use op-tee as a virtual HSM and I want to renew the keys periodically.
In the pkcs11 TA, I see that there are commands to generate keys and sign - PKCS11_CMD_GENERATE_KEY and PKCS11_CMD_SIGN_ONESHOT.
But I could not find information about how OP-TEE stores the generated keys. I do not want the keys leaked to the userspace.
(I don't know what this line does in libckteec
memcpy(&key_handle, out_shm->buffer, sizeof(key_handle)); )

So my question is, how does OP-TEE know what keys to use to sign since the command to sign does not have any input parameters relating to key material and where does it store the generated keys? Where is the key tied to the session?
And lastly, are the generated keys persistent across reboot?

Apologies if this has already been answered elsewhere. I am new to implementing op-tee and this piece of information would be of great help to get me started :)
Thanks.

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