Skip to content

Commit

Permalink
Update constants (#1152)
Browse files Browse the repository at this point in the history
* Update VERSION constant

* Update algorithm IDs
  • Loading branch information
divergentdave authored Dec 13, 2024
1 parent e119a37 commit cbb79b2
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/vdaf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ use subtle::{Choice, ConstantTimeEq};

/// A component of the domain-separation tag, used to bind the VDAF operations to the document
/// version. This will be revised with each draft with breaking changes.
pub(crate) const VERSION: u8 = 8;
pub(crate) const VERSION: u8 = 12;

/// Errors emitted by this module.
#[derive(Debug, thiserror::Error)]
Expand Down
2 changes: 1 addition & 1 deletion src/vdaf/poplar1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -855,7 +855,7 @@ impl<P: Xof<SEED_SIZE>, const SEED_SIZE: usize> Vdaf for Poplar1<P, SEED_SIZE> {
type AggregateShare = Poplar1FieldVec;

fn algorithm_id(&self) -> u32 {
0x00001000
0x00000006
}

fn num_aggregators(&self) -> usize {
Expand Down
16 changes: 8 additions & 8 deletions src/vdaf/prio3.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ pub type Prio3Count = Prio3<Count<Field64>, XofTurboShake128, 16>;
impl Prio3Count {
/// Construct an instance of Prio3Count with the given number of aggregators.
pub fn new_count(num_aggregators: u8) -> Result<Self, VdafError> {
Prio3::new(num_aggregators, 1, 0x00000000, Count::new())
Prio3::new(num_aggregators, 1, 0x00000001, Count::new())
}
}

Expand All @@ -102,7 +102,7 @@ impl Prio3SumVec {
Prio3::new(
num_aggregators,
1,
0x00000002,
0x00000003,
SumVec::new(bits, len, chunk_length)?,
)
}
Expand Down Expand Up @@ -132,7 +132,7 @@ impl Prio3SumVecMultithreaded {
Prio3::new(
num_aggregators,
1,
0x00000002,
0x00000003,
SumVec::new(bits, len, chunk_length)?,
)
}
Expand All @@ -149,7 +149,7 @@ impl Prio3Sum {
num_aggregators: u8,
max_measurement: <Field64 as FieldElementWithInteger>::Integer,
) -> Result<Self, VdafError> {
Prio3::new(num_aggregators, 1, 0x00000001, Sum::new(max_measurement)?)
Prio3::new(num_aggregators, 1, 0x00000002, Sum::new(max_measurement)?)
}
}

Expand Down Expand Up @@ -247,7 +247,7 @@ impl Prio3Histogram {
Prio3::new(
num_aggregators,
1,
0x00000003,
0x00000004,
Histogram::new(length, chunk_length)?,
)
}
Expand Down Expand Up @@ -275,7 +275,7 @@ impl Prio3HistogramMultithreaded {
Prio3::new(
num_aggregators,
1,
0x00000003,
0x00000004,
Histogram::new(length, chunk_length)?,
)
}
Expand All @@ -299,7 +299,7 @@ impl Prio3MultihotCountVec {
Prio3::new(
num_aggregators,
1,
0xFFFF0000,
0x00000005,
MultihotCountVec::new(num_buckets, max_weight, chunk_length)?,
)
}
Expand Down Expand Up @@ -328,7 +328,7 @@ impl Prio3MultihotCountVecMultithreaded {
Prio3::new(
num_aggregators,
1,
0xFFFF0000,
0x00000005,
MultihotCountVec::new(num_buckets, max_weight, chunk_length)?,
)
}
Expand Down

0 comments on commit cbb79b2

Please sign in to comment.