| 92 | |
| 93 | impl ElementType { |
| 94 | pub fn number_of_limbs_of_hashing_preimage(&self) -> usize { |
| 95 | match self { |
| 96 | ElementType::Fp6 => 6, // six coefficients of field element |
| 97 | ElementType::FieldElem => 0, // field element is not hashed, directly bit-comitted |
| 98 | ElementType::G1 => 2, // x, y co-ordinates |
| 99 | ElementType::ScalarElem => 0, // scalar element is not hashed, directly bit-comitted |
| 100 | ElementType::G2EvalPoint => 4 + 1, // t, Hash_partial_product |
| 101 | ElementType::G2EvalMul => 14 + 1, // partial_product, Hash_t |
| 102 | ElementType::G2Eval => 14 + 4, // t, partial_product |
| 103 | } |
| 104 | } |
| 105 | } |
| 106 | |
| 107 | pub(crate) type HashBytes = [u8; 64]; |