Skip to content

feat(crypto): CRP-2709 improve vetKD API naming#4354

Merged
fspreiss merged 4 commits into
masterfrom
franzstefan/CRP-2708
Mar 13, 2025
Merged

feat(crypto): CRP-2709 improve vetKD API naming#4354
fspreiss merged 4 commits into
masterfrom
franzstefan/CRP-2708

Conversation

@fspreiss

@fspreiss fspreiss commented Mar 13, 2025

Copy link
Copy Markdown
Contributor

Performs the following renamings in the vetKD API in accordance with the latest changes in the spec PR:

  • derivation_id --> input
    • The name derivation_id often caused confusion and input is a more standard name in the context of key derivation schemes.
  • derivation_domain (previously derivation_path) --> context
    • The main use case for the derivation domain/path is to do domain separation, i.e., to specify the context in which the derived keys are to be used. Given this, directly calling it context seems beneficial in that it makes the meaning of the field more clear and intuitive, and thus the API easier to use.
  • vetkd_derive_encrypted_key --> vetkd_derive_key
    • Although the fact that the returned key is encrypted is relevant in that it ensures that nodes cannot see the key in clear text, this can be considered an implementation detail. Also, the name vetkd_derive_encrypted_key is somewhat long. In any case, in the returned struct the (single) field is still called encrypted_key, so it is still explicit that the returned key is encrypted.
  • encryption_public_key --> transport_public_key
    • Everyone everywhere (in publications, slides, demos, etc.) called this "transport public key". The reason this was not called transport_public_key in the API so far was because the containing API method was called vetkd_derive_encrypted_key and the name encryption_public_key should have made it clear that it is this very public key under which the encrypted key is encrypted. Now that we are removing the part encrypted_ from the API name, this reason is obsolete and we are free to call it transport_public_key.

@github-actions github-actions Bot added the feat label Mar 13, 2025
Comment thread rs/types/management_canister_types/src/lib.rs

@dsarlis dsarlis left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Execution side looks good, see my comments for technically breaking changes but I think ones that we can live with.

Comment thread rs/embedders/src/wasmtime_embedder/system_api.rs
Comment thread rs/execution_environment/src/canister_manager.rs
@fspreiss fspreiss added this pull request to the merge queue Mar 13, 2025
Merged via the queue into master with commit a171c42 Mar 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants