-
Notifications
You must be signed in to change notification settings - Fork 325
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
feat(crypto): CRP-2609 Introduce master key ID variant for vetKD #2108
Merged
fspreiss
merged 16 commits into
master
from
franzstefan/CRP-2609-introduce-vetkd-master-key-id
Oct 29, 2024
Merged
feat(crypto): CRP-2609 Introduce master key ID variant for vetKD #2108
fspreiss
merged 16 commits into
master
from
franzstefan/CRP-2609-introduce-vetkd-master-key-id
Oct 29, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sawchord
reviewed
Oct 18, 2024
eichhorl
reviewed
Oct 18, 2024
github-actions
bot
added
@execution
@consensus
@idx
@ic-message-routing-owners
@pocket-ic
@nns-team
labels
Oct 24, 2024
mraszyk
approved these changes
Oct 24, 2024
aterga
approved these changes
Oct 24, 2024
adambratschikaye
approved these changes
Oct 24, 2024
eichhorl
reviewed
Oct 28, 2024
eichhorl
approved these changes
Oct 28, 2024
eichhorl
reviewed
Oct 28, 2024
rumenov
approved these changes
Oct 29, 2024
maksymar
reviewed
Oct 29, 2024
maksymar
approved these changes
Oct 29, 2024
github-merge-queue
bot
removed this pull request from the merge queue due to failed status checks
Oct 29, 2024
github-merge-queue
bot
removed this pull request from the merge queue due to failed status checks
Oct 29, 2024
fspreiss
deleted the
franzstefan/CRP-2609-introduce-vetkd-master-key-id
branch
October 29, 2024 14:49
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds a variant for vetKD in the
MasterPublicKeyId
in theregistry protobuf definitions,
where it is used in the
KeyConfig
(which is used in theChainKeyConfig
, which is used in theSubnetRecord
).management canister types,
where it is used in the
ComputeInitialIDkgDealingsArgs
(which will be generalized in a later step, e.g., toReshareChainKeyArgs
).registry canister API (registry.did),
where it is used in the
KeyConfig
(which is used in theKeyConfigRequest
, which is used in theInitialChainKeyConfig
, which is used inCreateSubnetPayload
andRecoverSubnetPayload
), and in theUpdateSubnetPayload
'schain_key_signing_enable
/chain_key_signing_disable
.This is the very first step for the vetKeys feature.
As discussed with the Consensus team, various consensus tests related to pre-signatures are adapted so that the tests panic if the vetKD variant is used, because vetKD doesn't have pre-signatures.
Registry API backwards-compatibility
The changes in the registry canister API should be safe/backwards-compatible based on the following argumentation (see Can I add a variant alternative?):
The
MasterPublicKeyId
variant inregistry.did
is extended with a new alternative as follows:This variant is used in two places:
key_id
is optional.chain_key_signing_enable
andchain_key_signing_disable
are not (directly) optional variant fields (because they are contained in avec
), adding the alternative is safe, given that theMasterPublicKeyId
variant is only ever used (as part ofUpdateSubnetPayload
) in method arguments but never as method result.This argumentation is also supported by the fact that the
//rs/registry/canister:registry-canister_did_git_test
test passes.Registry protobuf backwards-compatibility
The changes in the registry protocol buffer definitions is backwards-compatible. On the one hand, adding a new field to a
oneof
is generally backward-compatible in Protocol Buffers (with some nuances that are not relevant here). On the other hand, the new field/variant in theMasterPublicKeyId
is not yet written by any code, and this new variant won't be written for many weeks to come. In particular, it will only be written to the registry once subnets will actually hold master public keys for vetKD, which will only happen in 2025.Crypto Algorithm ID
For the time being, we don't need a particular
AlgorithmId
for vetKD, so we use theAlgorithmId::Placeholder
. In any case, the exact algorithm also doesn't matter for now because neither the intended Crypto APIs will use an algorithm ID nor will this algorithm be persisted anywhere (e.g., in the registry or in a key store).