Rename `unitary_inverse` to `conjugate`. Closes #12.

This commit is contained in:
Sean Bowe 2017-07-14 11:45:07 -06:00
parent d438f16628
commit 806d34b39a
No known key found for this signature in database
GPG Key ID: 95684257D8F8B031
2 changed files with 7 additions and 7 deletions

View File

@ -21,7 +21,7 @@ impl Rand for Fq12 {
}
impl Fq12 {
pub fn unitary_inverse(&mut self)
pub fn conjugate(&mut self)
{
self.c1.negate();
}

View File

@ -96,7 +96,7 @@ impl Engine for Bls12 {
fn final_exponentiation(r: &Fq12) -> Option<Fq12> {
let mut f1 = *r;
f1.unitary_inverse();
f1.conjugate();
match r.inverse() {
Some(mut f2) => {
@ -110,7 +110,7 @@ impl Engine for Bls12 {
{
*f = f.pow(&[x]);
if BLS_X_IS_NEGATIVE {
f.unitary_inverse();
f.conjugate();
}
}
@ -124,17 +124,17 @@ impl Engine for Bls12 {
exp_by_x(&mut y2, x);
x <<= 1;
let mut y3 = r;
y3.unitary_inverse();
y3.conjugate();
y1.mul_assign(&y3);
y1.unitary_inverse();
y1.conjugate();
y1.mul_assign(&y2);
y2 = y1;
exp_by_x(&mut y2, x);
y3 = y2;
exp_by_x(&mut y3, x);
y1.unitary_inverse();
y1.conjugate();
y3.mul_assign(&y1);
y1.unitary_inverse();
y1.conjugate();
y1.frobenius_map(3);
y2.frobenius_map(2);
y1.mul_assign(&y2);