diff --git a/ff/src/fields/field_hashers/expander/mod.rs b/ff/src/fields/field_hashers/expander/mod.rs index 0430623be..f5cc4cca3 100644 --- a/ff/src/fields/field_hashers/expander/mod.rs +++ b/ff/src/fields/field_hashers/expander/mod.rs @@ -63,25 +63,6 @@ pub(super) struct ExpanderXof { pub(super) k: usize, } -impl ExpanderXof { - fn update_dst_prime(&self, h: &mut H) { - if self.dst.len() > MAX_DST_LENGTH { - let mut long = H::default(); - long.update(&LONG_DST_PREFIX.clone()); - long.update(&self.dst); - - let mut new_dst = [0u8; MAX_DST_LENGTH]; - let new_dst = &mut new_dst[0..((2 * self.k + 7) >> 3)]; - long.finalize_xof_into(new_dst); - h.update(new_dst); - h.update(&[new_dst.len() as u8]); - } else { - h.update(&self.dst); - h.update(&[self.dst.len() as u8]); - } - } -} - impl Expander for ExpanderXof { fn expand(&self, msg: &[u8], n: usize) -> Vec { let mut xofer = self.xofer.clone(); @@ -92,7 +73,6 @@ impl Expander for ExpanderXof { xofer.update(&lib_str); DST::new_xof::(self.dst.as_ref(), self.k).update(&mut xofer); - // self.update_dst_prime(&mut xofer); xofer.finalize_boxed(n).to_vec() } }