func BenchmarkVerification(b *testing.B, priv crypto.PrivKey) {
	pub := priv.PubKey()
	message := []byte("Hello, world!")
	signature, err := priv.Sign(message)
	if err != nil {
		b.Fatal(err)
	}
	b.ResetTimer()
	for i := 0; i < b.N; i++ {
		pub.VerifySignature(message, signature)
	}
}
BenchmarkVerification benchmarks the given verification algorithm using
the provided privkey on a constant message.
package benchmarking
import (
	"io"
	"testing"
	"github.com/tendermint/tendermint/crypto"
)
type zeroReader struct{}
func (zeroReader) Read(buf []byte) (int, error) {
	for i := range buf {
		buf[i] = 0
	}
	return len(buf), nil
}
func BenchmarkKeyGeneration(b *testing.B, generateKey func(reader io.Reader) crypto.PrivKey) {
	var zero zeroReader
	for i := 0; i < b.N; i++ {
		generateKey(zero)
	}
}
func BenchmarkSigning(b *testing.B, priv crypto.PrivKey) {
	message := []byte("Hello, world!")
	b.ResetTimer()
	for i := 0; i < b.N; i++ {
		_, err := priv.Sign(message)
		if err != nil {
			b.FailNow()
		}
	}
}