func Verify(vk, message []byte, signature []byte) bool {
	key, err := ToByteArray32(vk)
	if err != nil {
		return false
	}
	sig, err := ToByteArray64(signature)
	if err != nil {
		return false
	}
	return ed25519.Verify(key, message, sig)
}
Verify attempts to verify a signature on a message with a key.
package util
import (
	"crypto/rand"
	"errors"
	"github.com/agl/ed25519"
)
const VerificationKeyLen = 32
const SigningKeyLen = 64
func Sign(sk, message []byte) (signature []byte, err error) {
	if len(message) == 0 {
		return nil, errors.New("cannot sign an empty message")
	}
	key, err := ToByteArray64(sk)
	if err != nil {
		return nil, errors.New("invalid signing key")
	}
	signature = ed25519.Sign(key, message)[:]
	return
}