Rename KEYPAIR to KEY_PAIR and psa_generate_random_key to psa_generate_key #114

Merged
gilles-peskine-arm merged 2 commits from psa-keypair-to-key_pair into psa-api-1.0-beta 2019-05-17 03:59:35 -05:00
gilles-peskine-arm commented 2019-05-16 12:50:27 -05:00 (Migrated from github.com)

KEY_PAIR is consistent with PUBLIC_KEY.

“Generate key” is a more classical name. The longer name was only introduced to avoid confusion with getting a key from a generator, which is key derivation, but we no longer use the generator terminology so this reason no longer applies.

This PR is built on top of #112, only the last two commits are new.

`KEY_PAIR` is consistent with `PUBLIC_KEY`. “Generate key” is a more classical name. The longer name was only introduced to avoid confusion with getting a key from a generator, which is key derivation, but we no longer use the generator terminology so this reason no longer applies. This PR is built on top of #112, only the last two commits are new.
Patater (Migrated from github.com) reviewed 2019-05-16 15:00:25 -05:00
@ -438,3 +438,3 @@
psa_status_t psa_generate_random_key_to_handle(psa_key_handle_t handle,
psa_status_t psa_generate_key_to_handle(psa_key_handle_t handle,
psa_key_type_t type,
Patater (Migrated from github.com) commented 2019-05-16 14:58:18 -05:00

Do we want to keep this old name? I thought we wanted all the to_handle() functions to be a thin backwards compatibility layer, just rename your old function to _append to_handle(). That doesn't work anymore with this change.

I'm not really convinced we want to keep the _to_handle() functions around, either, so I'm not too bothered if it is renamed before removal.

Do we want to keep this old name? I thought we wanted all the to_handle() functions to be a thin backwards compatibility layer, just rename your old function to _append to_handle(). That doesn't work anymore with this change. I'm not really convinced we want to keep the _to_handle() functions around, either, so I'm not too bothered if it is renamed before removal.
Patater (Migrated from github.com) commented 2019-05-16 14:59:27 -05:00

Consider reverting the name change here as well.

Consider reverting the name change here as well.
Patater commented 2019-05-16 15:02:30 -05:00 (Migrated from github.com)

I reviewed only the last two commits in this PR.

I've checked that there is no remaining KEYPAIR or psa_generate_random_key text present. All text has been changed, and the text that did change has changed correctly.

I reviewed only the last two commits in this PR. I've checked that there is no remaining KEYPAIR or psa_generate_random_key text present. All text has been changed, and the text that did change has changed correctly.
Patater (Migrated from github.com) reviewed 2019-05-16 15:02:41 -05:00
gilles-peskine-arm (Migrated from github.com) reviewed 2019-05-16 15:03:43 -05:00
@ -438,3 +438,3 @@
psa_status_t psa_generate_random_key_to_handle(psa_key_handle_t handle,
psa_status_t psa_generate_key_to_handle(psa_key_handle_t handle,
psa_key_type_t type,
gilles-peskine-arm (Migrated from github.com) commented 2019-05-16 15:03:43 -05:00

We never released a version where it was called psa_generate_random_key and it had these arguments. So this function actually shouldn't have been renamed from psa_generate_key to psa_generate_key_to_handle.

I think I made a similar mistake with key derivation. We can fix that later, after we've decided what we actually want for the transition period. I only picked these names to have the functions around while I was migrating the tests.

We never released a version where it was called `psa_generate_random_key` and it had these arguments. So this function actually shouldn't have been renamed from `psa_generate_key` to `psa_generate_key_to_handle`. I think I made a similar mistake with key derivation. We can fix that later, after we've decided what we actually want for the transition period. I only picked these names to have the functions around while I was migrating the tests.
Patater commented 2019-05-17 03:56:02 -05:00 (Migrated from github.com)

CI failure is ABI job (known to fail until https://github.com/ARMmbed/mbedtls/pull/2636 lands in the development branch) and USE_PSA_CRYPTO, which doesn't work on the API branch.

CI failure is ABI job (known to fail until https://github.com/ARMmbed/mbedtls/pull/2636 lands in the development branch) and `USE_PSA_CRYPTO`, which doesn't work on the API branch.
gilles-peskine-arm commented 2019-05-17 03:58:40 -05:00 (Migrated from github.com)

I just pushed identical content, rebased on top of the merge of #112. @Patater Please merge.

I just pushed identical content, rebased on top of the merge of #112. @Patater Please merge.
Patater commented 2019-05-17 03:59:09 -05:00 (Migrated from github.com)

Trivial rebase. No changes after rebase, so no re-testing required.

Trivial rebase. No changes after rebase, so no re-testing required.
Patater (Migrated from github.com) approved these changes 2019-05-17 03:59:28 -05:00
Sign in to join this conversation.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-ARMmbed/mbed-crypto!114
No description provided.