Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename PSA internal identifiers #241

Open
gilles-peskine-arm opened this issue Sep 3, 2019 · 2 comments
Open

Rename PSA internal identifiers #241

gilles-peskine-arm opened this issue Sep 3, 2019 · 2 comments
Labels
api-spec Issue or PR about the PSA specifications enhancement New feature or request Jira status: REOPENED mirrored type: enhancement

Comments

@gilles-peskine-arm
Copy link
Collaborator

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
@ciarmcom
Copy link
Member

ciarmcom commented Sep 3, 2019

Internal Jira reference: https://jira.arm.com/browse/IOTCRYPT-882

@adbridge
Copy link

adbridge commented Nov 4, 2019

Apologies, this was closed in error by the automated bot - re-opening.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api-spec Issue or PR about the PSA specifications enhancement New feature or request Jira status: REOPENED mirrored type: enhancement
Projects
None yet
Development

No branches or pull requests

3 participants