func CalcCurveParamsEquiv3(cparams *ProjectiveCurveParameters) CurveCoefficientsEquiv {
	var coef CurveCoefficientsEquiv
	var c2 Fp2
	add(&c2, &cparams.C, &cparams.C)
	add(&coef.A, &cparams.A, &c2)
	sub(&coef.C, &cparams.A, &c2)
	return coef
}
Computes equivalence (A:C) ~ (A+2C : A-2C)
package p751
import (
	. "github.com/cloudflare/circl/dh/sidh/internal/common"
)
type isogeny3 struct {
	K1 Fp2
	K2 Fp2
}
type isogeny4 struct {
	isogeny3
	K3 Fp2
}
func Jinvariant(cparams *ProjectiveCurveParameters, j *Fp2) {
	var t0, t1 Fp2
	sqr(j, &cparams.A)    
	sqr(&t1, &cparams.C)  
	add(&t0, &t1, &t1)    
	sub(&t0, j, &t0)      
	sub(&t0, &t0, &t1)    
	sub(j, &t0, &t1)      
	sqr(&t1, &t1)         
	mul(j, j, &t1)        
	add(&t0, &t0, &t0)    
	add(&t0, &t0, &t0)    
	sqr(&t1, &t0)         
	mul(&t0, &t0, &t1)    
	add(&t0, &t0, &t0)    
	add(&t0, &t0, &t0)    
	inv(j, j)             
	mul(j, &t0, j)        
}
func RecoverCoordinateA(curve *ProjectiveCurveParameters, xp, xq, xr *Fp2) {
	var t0, t1 Fp2
	add(&t1, xp, xq)                         
	mul(&t0, xp, xq)                         
	mul(&curve.A, xr, &t1)                   
	add(&curve.A, &curve.A, &t0)             
	mul(&t0, &t0, xr)                        
	sub(&curve.A, &curve.A, &params.OneFp2)  
	add(&t0, &t0, &t0)                       
	add(&t1, &t1, xr)                        
	add(&t0, &t0, &t0)                       
	sqr(&curve.A, &curve.A)                  
	inv(&t0, &t0)                            
	mul(&curve.A, &curve.A, &t0)             
	sub(&curve.A, &curve.A, &t1)             
}