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

CHIA-922: CHIA-938: Add signing and verification methods #616

Merged
merged 3 commits into from
Jul 22, 2024

Conversation

Rigidity
Copy link
Contributor

@Rigidity Rigidity commented Jul 16, 2024

Adds G1Element::verify and SecretKey::sign in Python as part of the wallet signer effort.

@Quexington Quexington changed the title Rename sign_g2 to sign and add optional prepend_pk [CHIA-922] Rename sign_g2 to sign and add optional prepend_pk Jul 16, 2024
Copy link

coveralls-official bot commented Jul 16, 2024

Pull Request Test Coverage Report for Build 9960878291

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 0 of 10 (0.0%) changed or added relevant lines in 2 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage decreased (-0.05%) to 82.659%

Changes Missing Coverage Covered Lines Changed/Added Lines %
crates/chia-bls/src/public_key.rs 0 3 0.0%
crates/chia-bls/src/secret_key.rs 0 7 0.0%
Files with Coverage Reduction New Missed Lines %
crates/chia-bls/src/secret_key.rs 1 90.87%
Totals Coverage Status
Change from base Build 9946335261: -0.05%
Covered Lines: 11559
Relevant Lines: 13984

💛 - Coveralls

@Rigidity Rigidity changed the title [CHIA-922] Rename sign_g2 to sign and add optional prepend_pk Add signing and verification methods Jul 16, 2024
@Rigidity Rigidity changed the title Add signing and verification methods CHIA-922: CHIA-938: Add signing and verification methods Jul 17, 2024
@matt-o-how
Copy link
Contributor

Non-blocking comment - can you add some descriptions of what and why for this PR?

@Rigidity Rigidity requested a review from AmineKhaldi July 22, 2024 16:10
@Rigidity Rigidity merged commit e1a7b55 into main Jul 22, 2024
65 checks passed
@Rigidity Rigidity deleted the sk-sign-augment branch July 22, 2024 16:39
@@ -242,8 +242,15 @@ impl SecretKey {
#[classattr]
pub const PRIVATE_KEY_SIZE: usize = 32;

pub fn sign_g2(&self, msg: &[u8]) -> crate::Signature {
crate::sign(self, msg)
pub fn sign(&self, msg: &[u8], final_pk: Option<PublicKey>) -> crate::Signature {
Copy link
Contributor

Choose a reason for hiding this comment

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

I understand the python interface has this optional public key, but do we ever actually use it? If not, it would be cleaner to just not have it

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.

4 participants