github.com/cloudflare/circl@v1.5.0/ecc/goldilocks/constants.go (about)

     1  package goldilocks
     2  
     3  import fp "github.com/cloudflare/circl/math/fp448"
     4  
     5  var (
     6  	// genX is the x-coordinate of the generator of Goldilocks curve.
     7  	genX = fp.Elt{
     8  		0x5e, 0xc0, 0x0c, 0xc7, 0x2b, 0xa8, 0x26, 0x26,
     9  		0x8e, 0x93, 0x00, 0x8b, 0xe1, 0x80, 0x3b, 0x43,
    10  		0x11, 0x65, 0xb6, 0x2a, 0xf7, 0x1a, 0xae, 0x12,
    11  		0x64, 0xa4, 0xd3, 0xa3, 0x24, 0xe3, 0x6d, 0xea,
    12  		0x67, 0x17, 0x0f, 0x47, 0x70, 0x65, 0x14, 0x9e,
    13  		0xda, 0x36, 0xbf, 0x22, 0xa6, 0x15, 0x1d, 0x22,
    14  		0xed, 0x0d, 0xed, 0x6b, 0xc6, 0x70, 0x19, 0x4f,
    15  	}
    16  	// genY is the y-coordinate of the generator of Goldilocks curve.
    17  	genY = fp.Elt{
    18  		0x14, 0xfa, 0x30, 0xf2, 0x5b, 0x79, 0x08, 0x98,
    19  		0xad, 0xc8, 0xd7, 0x4e, 0x2c, 0x13, 0xbd, 0xfd,
    20  		0xc4, 0x39, 0x7c, 0xe6, 0x1c, 0xff, 0xd3, 0x3a,
    21  		0xd7, 0xc2, 0xa0, 0x05, 0x1e, 0x9c, 0x78, 0x87,
    22  		0x40, 0x98, 0xa3, 0x6c, 0x73, 0x73, 0xea, 0x4b,
    23  		0x62, 0xc7, 0xc9, 0x56, 0x37, 0x20, 0x76, 0x88,
    24  		0x24, 0xbc, 0xb6, 0x6e, 0x71, 0x46, 0x3f, 0x69,
    25  	}
    26  	// paramD is -39081 in Fp.
    27  	paramD = fp.Elt{
    28  		0x56, 0x67, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
    29  		0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
    30  		0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
    31  		0xff, 0xff, 0xff, 0xff, 0xfe, 0xff, 0xff, 0xff,
    32  		0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
    33  		0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
    34  		0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
    35  	}
    36  	// order is 2^446-0x8335dc163bb124b65129c96fde933d8d723a70aadc873d6d54a7bb0d,
    37  	// which is the number of points in the prime subgroup.
    38  	order = Scalar{
    39  		0xf3, 0x44, 0x58, 0xab, 0x92, 0xc2, 0x78, 0x23,
    40  		0x55, 0x8f, 0xc5, 0x8d, 0x72, 0xc2, 0x6c, 0x21,
    41  		0x90, 0x36, 0xd6, 0xae, 0x49, 0xdb, 0x4e, 0xc4,
    42  		0xe9, 0x23, 0xca, 0x7c, 0xff, 0xff, 0xff, 0xff,
    43  		0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
    44  		0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
    45  		0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f,
    46  	}
    47  	// residue448 is 2^448 mod order.
    48  	residue448 = [4]uint64{
    49  		0x721cf5b5529eec34, 0x7a4cf635c8e9c2ab, 0xeec492d944a725bf, 0x20cd77058,
    50  	}
    51  	// invFour is 1/4 mod order.
    52  	invFour = Scalar{
    53  		0x3d, 0x11, 0xd6, 0xaa, 0xa4, 0x30, 0xde, 0x48,
    54  		0xd5, 0x63, 0x71, 0xa3, 0x9c, 0x30, 0x5b, 0x08,
    55  		0xa4, 0x8d, 0xb5, 0x6b, 0xd2, 0xb6, 0x13, 0x71,
    56  		0xfa, 0x88, 0x32, 0xdf, 0xff, 0xff, 0xff, 0xff,
    57  		0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
    58  		0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
    59  		0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f,
    60  	}
    61  	// paramDTwist is -39082 in Fp. The D parameter of the twist curve.
    62  	paramDTwist = fp.Elt{
    63  		0x55, 0x67, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
    64  		0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
    65  		0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
    66  		0xff, 0xff, 0xff, 0xff, 0xfe, 0xff, 0xff, 0xff,
    67  		0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
    68  		0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
    69  		0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
    70  	}
    71  )