66
66
// hashToInt converts a hash value to an integer. There is some disagreement
67
67
// about how this is done. [NSA] suggests that this is done in the obvious
68
68
// manner, but [SECG] truncates the hash to the bit-length of the curve order
70
72
func hashToInt(hash []byte, c elliptic.Curve) *big.Int {
71
73
orderBits := c.Params().N.BitLen()
72
74
orderBytes := (orderBits + 7) / 8