func Verify(pub *ecdsa.PublicKey, msg, vrf, nizk []byte) (bool, error) {
	if err := checkPub(pub); err != nil {
		return false, errors.New("公钥不合法")
	}
	h := getHash(pub.Curve)
	if h == nil {
		return false, ErrKeyNotSupported
	}
	byteLen := (pub.Params().BitSize + 7) >> 3
	if len(vrf) != byteLen*2+1 || len(nizk) != byteLen*2 {
		return false, nil
	}
	proof := append(nizk, vrf...)
	_, err := ProofToHash(pub, h, msg, proof)
	if err != nil {
		log.Error("verifying VRF failed: %v", "err", err)
		return false, nil
	}
	return true, nil
}
//Verify returns true if vrf and nizk is correct for msg
Verify returns true if vrf and nizk is correct for msg
// Verify returns true if vrf and nizk is correct for msg
func Verify(pub *ecdsa.PublicKey, msg, vrf, nizk []byte) (bool, error) {
	if err := checkPub(pub); err != nil {
		return false, errors.New("公钥不合法")
	}
	h := getHash(pub.Curve)
	if h == nil {
		return false, ErrKeyNotSupported
	}
	byteLen := (pub.Params().BitSize + 7) >> 3
	if len(vrf) != byteLen*2+1 || len(nizk) != byteLen*2 {
		return false, nil
	}
	proof := append(nizk, vrf...)
	_, err := ProofToHash(pub, h, msg, proof)
	if err != nil {
		log.Error("verifying VRF failed: %v", "err", err)
		return false, nil
	}
	return true, nil
}
func Verify ( pub * ecdsa . PublicKey , msg , vrf , nizk [ ] byte ) ( bool , error ) { if err := checkPub ( pub ) ; err != nil { return false , errors . New ( " } h := getHash ( pub . Curve ) if h == nil { return false , ErrKeyNotSupported } byteLen := ( pub . Params ( ) . BitSize + 7 ) >> 3 if len ( vrf ) != byteLen * 2 + 1 || len ( nizk ) != byteLen * 2 { return false , nil } proof := append ( nizk , vrf ... ) _ , err := ProofToHash ( pub , h , msg , proof ) if err != nil { log . Error ( " " , " " , err ) return false , nil } return true , nil }
Verify returns true if vrf and nizk is correct for msg
Verify returns true if vrf and nizk is correct for msg