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

BLS fast sums #840

Merged
merged 24 commits into from
Oct 2, 2024
Merged

BLS fast sums #840

merged 24 commits into from
Oct 2, 2024

Conversation

jonas-lj
Copy link
Contributor

@jonas-lj jonas-lj commented Sep 27, 2024

Adds a method to deserialize from uncompressed serialization format for G1 elements in the BLS12381 construction and add them together. This is much faster than if we first have to decompress each term:

Sum/BLS12381-G1/500 uncompressed
                        time:   [233.90 µs 234.58 µs 235.34 µs]

Sum/BLS12381-G1/500 compressed
                        time:   [6.2162 ms 6.2344 ms 6.2557 ms]

@jonas-lj jonas-lj requested a review from benr-ml September 30, 2024 11:45
@jonas-lj jonas-lj marked this pull request as ready for review September 30, 2024 11:50
fastcrypto/src/groups/bls12381.rs Outdated Show resolved Hide resolved
@@ -333,6 +335,71 @@ impl Debug for G1Element {
serialize_deserialize_with_to_from_byte_array!(G1Element);
generate_bytes_representation!(G1Element, G1_ELEMENT_BYTE_LENGTH, G1ElementAsBytes);

/// An uncompressed seralization of a G1 element. This format is two times longer than the compressed
Copy link
Contributor

Choose a reason for hiding this comment

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

type

fastcrypto/src/groups/bls12381.rs Outdated Show resolved Hide resolved
fastcrypto/src/groups/bls12381.rs Show resolved Hide resolved
fastcrypto/src/tests/bls12381_group_tests.rs Show resolved Hide resolved
fastcrypto/src/groups/bls12381.rs Show resolved Hide resolved
@jonas-lj jonas-lj requested a review from benr-ml October 1, 2024 11:06
fastcrypto/src/groups/bls12381.rs Outdated Show resolved Hide resolved
@jonas-lj jonas-lj merged commit 2f502fd into main Oct 2, 2024
7 checks passed
@jonas-lj jonas-lj deleted the jonas/bls_batched_addition branch October 2, 2024 07:37
@kchalkias kchalkias self-requested a review October 4, 2024 06:57
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