code: func ecHash(curve elliptic.Curve) crypto.Hash {
  	bitSize := curve.Params().BitSize
  	switch {
  	case bitSize <= 256:
  		return crypto.SHA256
  	case bitSize <= 384:
  		return crypto.SHA384
  	}
  	return crypto.SHA512
  }
docs: // ecHash returns the hash to match the given elliptic curve, see RFC
  // 5656, section 6.2.1