Skip to content

feat: CRP-2802 add sign_with_bls to utils#102

Merged
altkdf merged 12 commits intomainfrom
alex/derive_public_vetkey
May 26, 2025
Merged

feat: CRP-2802 add sign_with_bls to utils#102
altkdf merged 12 commits intomainfrom
alex/derive_public_vetkey

Conversation

@altkdf
Copy link
Copy Markdown
Contributor

@altkdf altkdf commented May 19, 2025

Said function calls the management canister's vetkd_derive_vetkey API with a fixed transport public key (G1 identity) and removes c1 more efficiently than in EncryptedVetKey::decrypt_and_verify.

@altkdf altkdf changed the title feat: add derive_public_vetkey function feat: CRP-2802 add derive_public_vetkey function May 19, 2025
@altkdf
Copy link
Copy Markdown
Contributor Author

altkdf commented May 20, 2025

Once we have abstractions for VRF, BLS signatures, etc., we could make derive_public_vetkey an internal function if we are concerned that someone might misunderstand what this function is for. Currently, we need it public for testing with Pocket IC.

@altkdf
Copy link
Copy Markdown
Contributor Author

altkdf commented May 20, 2025

@fspreiss @randombit any better ideas for the function (derive_public_vetkey) name? I only thought of 2 so far: derive_unencrypted_vetkey and derive_public_key. Both have downsides IMO: "unencrypted" may not mean much to everyone, especially if people don't fully understand how the protocol works, and "public" can be confused with the vetkd public verification key.

@altkdf altkdf marked this pull request as ready for review May 20, 2025 10:05
@altkdf altkdf requested a review from a team May 20, 2025 10:05
Comment thread backend/rs/ic_vetkeys/src/utils/mod.rs
Comment thread backend/rs/ic_vetkeys/src/utils/mod.rs Outdated
@randombit
Copy link
Copy Markdown
Contributor

any better ideas for the function (derive_public_vetkey) name? I only thought of 2 so far: derive_unencrypted_vetkey and derive_public_key. Both have downsides IMO: "unencrypted" may not mean much to everyone, especially if people don't fully understand how the protocol works, and "public" can be confused with the vetkd public verification key.

derive_public_key seems definitely confusing

Maybe create_bls_signature or sign_with_bls

@altkdf
Copy link
Copy Markdown
Contributor Author

altkdf commented May 20, 2025

any better ideas for the function (derive_public_vetkey) name? I only thought of 2 so far: derive_unencrypted_vetkey and derive_public_key. Both have downsides IMO: "unencrypted" may not mean much to everyone, especially if people don't fully understand how the protocol works, and "public" can be confused with the vetkd public verification key.

derive_public_key seems definitely confusing

Maybe create_bls_signature or sign_with_bls

in the timelock encryption case, that would still be a vetkey 🤷‍♂️

Comment thread backend/rs/ic_vetkeys/src/vetkd_api_types.rs Outdated
Comment thread backend/rs/ic_vetkeys/src/utils/mod.rs Outdated
@altkdf
Copy link
Copy Markdown
Contributor Author

altkdf commented May 23, 2025

TODO: check the validity of the obtained BLS signature once #108 is merged.

@altkdf altkdf changed the title feat: CRP-2802 add derive_public_vetkey function feat: CRP-2802 add sign_with_bls to utils May 23, 2025
Copy link
Copy Markdown
Contributor

@randombit randombit left a comment

Choose a reason for hiding this comment

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

LGTM besides adding the signature verification

Copy link
Copy Markdown
Contributor

@fspreiss fspreiss left a comment

Choose a reason for hiding this comment

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

Very nice, thanks @altkdf! Here are a few minor comments.

Comment thread backend/rs/ic_vetkeys/src/utils/mod.rs Outdated
Comment thread backend/rs/ic_vetkeys/src/utils/mod.rs Outdated
Comment thread backend/rs/ic_vetkeys/src/utils/mod.rs Outdated
Comment thread backend/rs/ic_vetkeys/src/utils/mod.rs
Comment thread backend/rs/ic_vetkeys/src/utils/mod.rs
Comment thread backend/rs/canisters/tests/README.md Outdated
Comment thread backend/rs/canisters/tests/src/lib.rs Outdated
Comment thread backend/rs/canisters/tests/src/lib.rs Outdated
Comment thread backend/rs/canisters/tests/src/lib.rs Outdated
Comment thread backend/rs/canisters/tests/src/lib.rs Outdated
Copy link
Copy Markdown
Contributor

@fspreiss fspreiss left a comment

Choose a reason for hiding this comment

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

Thanks, @altkdf!

Comment thread backend/rs/ic_vetkeys/src/utils/mod.rs
Comment thread backend/rs/ic_vetkeys/src/utils/mod.rs
@altkdf altkdf merged commit f24f84f into main May 26, 2025
22 checks passed
@altkdf altkdf deleted the alex/derive_public_vetkey branch May 27, 2025 06:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants