pub fn curve_3_iso(p3: Point, e: MontCurve) -> MontCurve {
    let (x3, _) = p3;
    let (a, b) = e;

    let t1 = fp2sqr(x3);
    let iso_b = fp2mul(b, t1);

    let t1 = fp2add(t1, t1);
    let t2 = fp2add(t1, t1);
    let t1 = fp2add(t1, t2);
    let t1 = fp2sub(t1, fp2from_literals(6 as u128, 0 as u128));
    let t2 = fp2mul(a, x3);
    let t1 = fp2sub(t2, t1);
    let iso_a = fp2mul(t1, x3);

    (iso_a, iso_b)
}
/// Input: curve e and point p3 of order 3 on e
/// Output: codomain of the 3-isogeny corresponding to p3
curve e and point p3 of order 3 on e
Output: codomain of the 3-isogeny corresponding to p3
curve e and point p3 of order 3 on e Output : codomain of the 3 - isogeny corresponding to p3
pub fn curve_3_iso(p3: Point, e: MontCurve) -> MontCurve {
    let (x3, _) = p3;
    let (a, b) = e;
    let t1 = fp2sqr(x3);
    let iso_b = fp2mul(b, t1);
    let t1 = fp2add(t1, t1);
    let t2 = fp2add(t1, t1);
    let t1 = fp2add(t1, t2);
    let t1 = fp2sub(t1, fp2from_literals(6 as u128, 0 as u128));
    let t2 = fp2mul(a, x3);
    let t1 = fp2sub(t2, t1);
    let iso_a = fp2mul(t1, x3);
    (iso_a, iso_b)
}
pub fn curve_3_iso ( p3 : Point , e : MontCurve ) -> MontCurve { let ( x3 , _ ) = p3 ; let ( a , b ) = e ; let t1 = fp2sqr ( x3 ) ; let iso_b = fp2mul ( b , t1 ) ; let t1 = fp2add ( t1 , t1 ) ; let t2 = fp2add ( t1 , t1 ) ; let t1 = fp2add ( t1 , t2 ) ; let t1 = fp2sub ( t1 , fp2from_literals ( 6 as u128 , 0 as u128 ) ) ; let t2 = fp2mul ( a , x3 ) ; let t1 = fp2sub ( t2 , t1 ) ; let iso_a = fp2mul ( t1 , x3 ) ; ( iso_a , iso_b ) }
Input: curve e and point p3 of order 3 on e
Output: codomain of the 3-isogeny corresponding to p3
Input : curve e and point p3 of order 3 on e Output : codomain of the 3 - isogeny corresponding to p3
p3
Point
e
MontCurve
p3
Point
e
MontCurve