Minor changes to comments documenting `clear_cofactor`

This commit is contained in:
Sean Bowe 2019-11-27 13:44:35 -07:00
parent 7dc6f31a7b
commit af9ec4d7f3
No known key found for this signature in database
GPG Key ID: 95684257D8F8B031
2 changed files with 6 additions and 5 deletions

View File

@ -756,8 +756,9 @@ impl G1Projective {
xself
}
/// Multiplies by $(1 - x)$, which [suffices to clear](https://ia.cr/2019/403)
/// the cofactor and map elliptic curve points to elements of $\mathbb{G}\_1$.
/// Multiplies by $(1 - z)$, where $z$ is the parameter of BLS12-381, which
/// [suffices to clear](https://ia.cr/2019/403) the cofactor and map
/// elliptic curve points to elements of $\mathbb{G}\_1$.
pub fn clear_cofactor(&self) -> G1Projective {
self - self.mul_by_x()
}

View File

@ -915,9 +915,9 @@ impl G2Projective {
}
/// Clears the cofactor, using [Budroni-Pintore](https://ia.cr/2017/419).
/// This is equivalent to multiplying by:
/// $h_\textrm{eff} = 3(x^2 - 1) \cdot h$, where
/// $h$ is the cofactor of $\mathbb{G}_2$.
/// This is equivalent to multiplying by $h\_\textrm{eff} = 3(z^2 - 1) \cdot
/// h_2$, where $h_2$ is the cofactor of $\mathbb{G}\_2$ and $z$ is the
/// parameter of BLS12-381.
pub fn clear_cofactor(&self) -> G2Projective {
let t1 = self.mul_by_x(); // [x] P
let t2 = self.psi(); // psi(P)