Exemplo n.º 1
0
// Parameters defining Curve1174, as specified in:
// Bernstein et al, "Elligator: Elliptic-curve points indistinguishable
// from uniform random strings"
// http://elligator.cr.yp.to/elligator-20130828.pdf
//
func Param1174() *Param {
	var p Param
	var mi nist.Int

	p.Name = "1174"
	p.P.SetBit(zero, 251, 1).Sub(&p.P, big.NewInt(9))
	p.Q.SetString("45330879683285730139092453152713398835", 10)
	p.Q.Sub(&p.P, &p.Q).Div(&p.Q, big.NewInt(4))
	p.R = 4
	p.A.SetInt64(1)
	p.D.SetInt64(-1174)

	// Full-group generator is (4/V,3/5)
	mi.InitString("4", "19225777642111670230408712442205514783403012708409058383774613284963344096", 10, &p.P)
	p.FBX.Set(&mi.V)
	mi.InitString("3", "5", 10, &p.P)
	p.FBY.Set(&mi.V)

	// Elligator1 parameter s for Curve1174 (Elligator paper section 4.1)
	p.Elligator1s.SetString("1806494121122717992522804053500797229648438766985538871240722010849934886421", 10)

	return &p
}