func (node *nodeImpl) verifyWithEnrollmentCert(msg, signature []byte) (bool, error) { node.log.Debug("Verifing signature [%s] against message [%s].", utils.EncodeBase64(signature), utils.EncodeBase64(msg), ) return utils.ECDSAVerify(node.enrollCert.PublicKey, msg, signature) }
func (node *nodeImpl) verify(verKey interface{}, msg, signature []byte) (bool, error) { node.log.Debug("Verifing signature [%s] against message [%s].", utils.EncodeBase64(signature), utils.EncodeBase64(msg), ) return utils.ECDSAVerify(verKey, msg, signature) }
func BenchmarkVerify(b *testing.B) { b.StopTimer() b.ResetTimer() //b.Logf("#iterations %d\n", b.N) signKey, _ := utils.NewECDSAKey() verKey := signKey.PublicKey hash := make([]byte, 48) for i := 0; i < b.N; i++ { rand.Read(hash) sigma, _ := utils.ECDSASign(signKey, hash) b.StartTimer() utils.ECDSAVerify(&verKey, hash, sigma) b.StopTimer() } }
func (validator *validatorImpl) verify(verKey interface{}, msg, signature []byte) (bool, error) { return utils.ECDSAVerify(verKey, msg, signature) }
func (node *nodeImpl) verifyWithEnrollmentCert(msg, signature []byte) (bool, error) { return utils.ECDSAVerify(node.enrollCert.PublicKey, msg, signature) }
func (node *nodeImpl) verify(verKey interface{}, msg, signature []byte) (bool, error) { return utils.ECDSAVerify(verKey, msg, signature) }