Skip to content

Commit

Permalink
Merge pull request #783 from taikiy/that_thing
Browse files Browse the repository at this point in the history
sparse aggregation protocol
  • Loading branch information
benjaminsavage authored Sep 25, 2023
2 parents d9d6a62 + 834616c commit df2ae41
Show file tree
Hide file tree
Showing 5 changed files with 216 additions and 98 deletions.
10 changes: 10 additions & 0 deletions src/ff/galois_field.rs
Original file line number Diff line number Diff line change
Expand Up @@ -560,6 +560,16 @@ bit_array_impl!(
0b1_0001_1011_u128
);

bit_array_impl!(
bit_array_3,
Gf3Bit,
U8_1,
3,
bitarr!(const u8, Lsb0; 1, 0, 0),
// x^3 + x + 1
0b1_011_u128
);

bit_array_impl!(
bit_array_1,
Gf2,
Expand Down
2 changes: 1 addition & 1 deletion src/ff/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ mod prime_field;
use std::ops::{Add, AddAssign, Mul, MulAssign, Neg, Sub, SubAssign};

pub use field::{Field, FieldType};
pub use galois_field::{GaloisField, Gf2, Gf32Bit, Gf40Bit, Gf8Bit};
pub use galois_field::{GaloisField, Gf2, Gf32Bit, Gf3Bit, Gf40Bit, Gf8Bit};
use generic_array::{ArrayLength, GenericArray};
#[cfg(any(test, feature = "weak-field"))]
pub use prime_field::Fp31;
Expand Down
2 changes: 1 addition & 1 deletion src/helpers/transport/query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ impl Default for SparseAggregateQueryConfig {
fn default() -> Self {
Self {
contribution_bits: ContributionBits::default(),
num_contributions: 1,
num_contributions: 8,
}
}
}
Loading

0 comments on commit df2ae41

Please sign in to comment.