This is VRF library of golang version I forked algorand's libsodium and extract only vrf module from go-algorand.
cd ./crypto/libsodium
./autogen.sh
./configure
make && make check
sudo make install
And then, libsodium installed under /usr/local/lib/ if MacOS.
go build
go test -v
type VrfPrivkey [64]uint8
type VrfPubkey [32]uint8
func VrfKeygenFromSeed(seed [32]byte) (pub VrfPubkey, priv VrfPrivkey)
func VrfKeygen() (pub VrfPubkey, priv VrfPrivKey)
func (sk VrfPrivkey) Pubkey() (pk VrfPubkey)
func (sk VrfPrivkey) Prove(message []byte) (proof VrfProof, ok bool)
func (proof VrfProof) Hash() (hash VrfOutput, ok bool)
func (pk VrfPubkey) Verify(p VrfProof, message []byte) (bool, VrfOutput