Skip to content

Rename PSA internal identifiers #241

Open
@gilles-peskine-arm

Description

@gilles-peskine-arm

Description

There are three categories of identifiers in the PSA part of the Mbed Crypo API.

  • Identifiers defined by the official PSA API specification. These use names psa_xxx or PSA_XXX.
  • Implementation-specific extensions that are part of Mbed Crypto. These have inconsistently used names psa_xxx or mbedtls_psa_xxx. For functions, I used mbedtls_psa_xxx for things that I considered to be strictly Mbed Crypto only, and psa_xxx for things that I considered experimental features possibly to be added to PSA later. But in retrospect I don't think that distinction should be reflected in the naming. For macros, I stuck to PSA_XXX to avoid complaints from check-names.sh.
  • Internal identifiers that users aren't meant to use, and can see only due to the lack of namespacing in C. These are mostly macros used to build and analyze constants (PSA_KEY_TYPE_CATEGORY_XXX, PSA_ALG_AEAD_WITH_DEFAULT_TAG_LENGTH_CASE, …). There are also a few types and structures in crypto_struct.h.

We should use separate namespaces for these three categories. Only the first category should use the reserved PSA namespace, which is yet to be defined (internal link: https://github.com/ARMmbed/psa-crypto/issues/248).

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