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

[WIP] Demo batch verification function #615

Closed
wants to merge 1 commit into from

Conversation

Stebalien
Copy link
Member

part of #614

@Stebalien
Copy link
Member Author

cc @Kubuxu

Copy link

codecov bot commented Aug 30, 2024

Codecov Report

Attention: Patch coverage is 16.66667% with 25 lines in your changes missing coverage. Please review.

Project coverage is 76.46%. Comparing base (f5af3ff) to head (b122d56).

Files with missing lines Patch % Lines
blssig/verifier.go 13.79% 25 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #615      +/-   ##
==========================================
- Coverage   76.90%   76.46%   -0.44%     
==========================================
  Files          64       64              
  Lines        5451     5477      +26     
==========================================
- Hits         4192     4188       -4     
- Misses        857      884      +27     
- Partials      402      405       +3     
Files with missing lines Coverage Δ
blssig/aggregation.go 58.57% <100.00%> (ø)
blssig/verifier.go 46.05% <13.79%> (-21.95%) ⬇️

... and 5 files with indirect coverage changes

return fmt.Errorf("unarshalling public key: %w", err)
}
}
aggSig, err := v.blsScheme.AggregateSignatures(sigs...)
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think this is generally safe. It might be secure in this case as the message and justification are guaranteed to be unique.
No, wait, they are not. Then, yeah, this is not safe. The BatchVerify method requires that the messages be unique. There is an alternative method for BatchVerifying that introduces randomness to both the message and signature, making them linearly independent. I could write that.
It does not affect the overall scheme and is just a verification time tweak.

Copy link
Contributor

Choose a reason for hiding this comment

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

Hmm, I guess the BatchVerify will check that messages are unique. So it might be safe.

@Stebalien Stebalien force-pushed the steb/bls-mask branch 2 times, most recently from 1c1c3ad to fdee71b Compare September 5, 2024 23:20
@Stebalien Stebalien force-pushed the steb/bls-mask branch 5 times, most recently from 1c17db1 to f5af3ff Compare September 23, 2024 11:48
Base automatically changed from steb/bls-mask to main September 23, 2024 11:57
@Stebalien
Copy link
Member Author

At the moment this is only going from 4 pairings to 3, and adding some additional work into the mix for aggregation. In theory, we can go even faster but kyber currently doesn't allow for the optimizations we'd need in that case.

I'm going to close this for now. It's probably easiest to simply re-implement the batch verification here, but this PR isn't going to get us any closer anyways.

@Stebalien Stebalien closed this Sep 23, 2024
@Stebalien Stebalien deleted the steb/bls-batch-verify branch October 28, 2024 22:35
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.

2 participants