Skip to content

Better error handling when destroying a key in a secure element #215

Closed as not planned
@gilles-peskine-arm

Description

@gilles-peskine-arm

Description

Consider psa_destroy_key on a key which is located in a secure element. The normal process is:

  1. Create a transaction file.
  2. Call the driver to destroy the key in the secure element.
  3. Destroy the key metadata in internal storage.
  4. Remove the transaction file.

If an error occurs, we normally do as much as we can anyway. But if creating the transaction file fails, we do nothing. This is undesirable because psa_destroy_key should make the best effort to destroy all key material.

In particular, it's currently impossible to destroy a key if the storage is full, because creating the transaction file fails.

Issue request type

[ ] Question
[x] Enhancement
[ ] Bug

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions