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

Added verification to certificate #82

Merged
merged 4 commits into from
Mar 15, 2024
Merged

Conversation

danielSanchezQ
Copy link
Collaborator

No description provided.

@danielSanchezQ danielSanchezQ self-assigned this Mar 14, 2024
da/common.py Outdated Show resolved Hide resolved
typo short -> sort

Co-authored-by: gusto <[email protected]>
Copy link
Contributor

@megonen megonen left a comment

Choose a reason for hiding this comment

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

to prevent Rogue Key Attack mentioned here https://www.notion.so/BLS-Aggregated-and-Threshold-Signature-5a37ed1db01e4f9594080e1e6a5ef5f4, test can be added for PoP (proof of possesion) mechanism

da/common.py Outdated Show resolved Hide resolved
@danielSanchezQ danielSanchezQ force-pushed the certificate-verification branch from 2ccae7f to 8fa0f8a Compare March 15, 2024 09:14
Comment on lines +58 to +67
def verify(self, nodes_public_keys: List[BLSPublickey]) -> bool:
"""
List of nodes public keys should be a trusted list of verified proof of possession keys.
Otherwise, we could fall under the Rogue Key Attack
`assert all(bls_pop.PopVerify(pk, proof) for pk, proof in zip(node_public_keys, pops))`
"""
# we sort them as the signers bitfield is sorted by the public keys as well
signers_keys = list(compress(sorted(nodes_public_keys), self.signers))
message = build_attestation_message(self.aggregated_column_commitment, self.row_commitments)
return bls_pop.AggregateVerify(signers_keys, [message]*len(signers_keys), self.aggregated_signatures)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@davidrusu I added this comment. This keys verification should be done upon registration.
@megonen We have to update the specification documents with this most probably.

Copy link
Contributor

@davidrusu davidrusu left a comment

Choose a reason for hiding this comment

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

🚀

@danielSanchezQ danielSanchezQ merged commit 0e142c0 into master Mar 15, 2024
1 check passed
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