go-ristretto
go-ristretto copied to clipboard
Conver to affine representation?
Could you please help me on converting extended point to a affine point (x: bigInt, y:bigInt)
x = X/Z, y = Y/Z given we're not dealing with the point-at-infinity. Why does this come up working with Ristretto?
I want to implement elliptic.Curve interface with ristretto via followings:
func GenerateKey(curve Curve, rand io.Reader) (priv []byte, x, y *big.Int, err error) func Marshal(curve Curve, x, y *big.Int) []byte func MarshalCompressed(curve Curve, x, y *big.Int) []byte func Unmarshal(curve Curve, data []byte) (x, y *big.Int) func UnmarshalCompressed(curve Curve, data []byte) (x, y *big.Int) type Curve func Ristretto() Curve //over ed25519 type CurveParams func (curve *CurveParams) Add(x1, y1, x2, y2 *big.Int) (*big.Int, *big.Int) func (curve *CurveParams) Double(x1, y1 *big.Int) (*big.Int, *big.Int) func (curve *CurveParams) IsOnCurve(x, y *big.Int) bool func (curve *CurveParams) Params() *CurveParams func (curve *CurveParams) ScalarBaseMult(k []byte) (*big.Int, *big.Int) func (curve *CurveParams) ScalarMult(Bx, By *big.Int, k []byte) (*big.Int, *big.Int)
x = X/Z, y = Y/Z given we're not dealing with the point-at-infinity. Why does this come up working with Ristretto?
Yes, it is. what about from affine (x,y) to extended (X,Y,T,Z)? X=x Y=y T=x*y Z=1 are correct ?
But why would you want to implement this interface?