{"id":20244300,"url":"https://github.com/protonmail/go-ecvrf","last_synced_at":"2025-07-28T16:07:14.730Z","repository":{"id":45426918,"uuid":"437937955","full_name":"ProtonMail/go-ecvrf","owner":"ProtonMail","description":"Golang implementation of ECVRF-EDWARDS25519-SHA512-TAI, a verifiable random function described in draft-irtf-cfrg-vrf-10.","archived":false,"fork":false,"pushed_at":"2021-12-14T14:56:20.000Z","size":11,"stargazers_count":7,"open_issues_count":0,"forks_count":2,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-07-07T05:04:04.232Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ProtonMail.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-12-13T16:05:45.000Z","updated_at":"2024-07-09T00:49:32.000Z","dependencies_parsed_at":"2022-09-10T11:42:18.419Z","dependency_job_id":null,"html_url":"https://github.com/ProtonMail/go-ecvrf","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/ProtonMail/go-ecvrf","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ProtonMail%2Fgo-ecvrf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ProtonMail%2Fgo-ecvrf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ProtonMail%2Fgo-ecvrf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ProtonMail%2Fgo-ecvrf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ProtonMail","download_url":"https://codeload.github.com/ProtonMail/go-ecvrf/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ProtonMail%2Fgo-ecvrf/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267543269,"owners_count":24104538,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-28T02:00:09.689Z","response_time":68,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-14T09:14:13.548Z","updated_at":"2025-07-28T16:07:14.669Z","avatar_url":"https://github.com/ProtonMail.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Go-ECVRF\nGo-ECVRF is a library that implements ECVRF-EDWARDS25519-SHA512-TAI,\na verifiable random function described in draft-irtf-cfrg-vrf-10.\n\nBy design this VRF is **not suitable to be used on secret input**,\nas the try-and-increment procedure leaks information of the message\n(alpha string), but it is constant time for different secret keys.\n\n## Download/Install\n### Vendored install\nTo use this library using [Go Modules](https://github.com/golang/go/wiki/Modules) just edit your\n`go.mod` configuration to contain:\n```gomod\nrequire (\n    ...\n    github.com/ProtonMail/go-ecvrf latest\n)\n```\n\nIt can then be installed by running:\n```sh\ngo mod vendor\n```\nFinally your software can include it in your software as follows:\n```go\nimport \"github.com/ProtonMail/go-ecvrf/ecvrf\"\n```\n\n## Documentation\nA full overview of the API can be found here:\nhttps://godoc.org/github.com/ProtonMail/go-ecvrf/ecvrf\n\nIn this document we provide some examples, more can be found in the tests.\n\n## Examples\n### Generating a new VRF key\nUsing `nil` as a source will automatically use randomness from `crypto/random`\n```go\nimport \"github.com/ProtonMail/go-ecvrf/ecvrf\"\n\nprivateKey, err := ecvrf.GenerateKey(nil)\npublicKey, err := privateKey.Public()\n\nPrivateKeyBin := privateKey.Bytes()\nPublicKeyBin := []bytes(publicKey)\n```\nThe private key can be used to prove, the public key to verify.\n\n### Proving\n```go\nimport \"github.com/ProtonMail/go-ecvrf/ecvrf\"\n\nprivateKey, err = ecvrf.NewPrivateKey(PrivateKeyBin)\nmessage := []byte(\"alice\")\nvrf, proof, err := privateKey.Prove(message)\nif err != nil {\n    // handle error\n}\n\n// vrf contains the VRF output (or hash)\n// proof contains the proof for that message and private/public keypair\n```\n\n### Verifying\n```go\nimport \"github.com/ProtonMail/go-ecvrf/ecvrf\"\n\npublicKey, err = ecvrf.NewPublicKey(PublicKeyBin)\nverified, verificationVRF, err := publicKey.Verify(alice, proof)\nif err != nil {\n    // handle error\n}\n\nif verified {\n    // proof verification succeeded, use verificationVRF\n} else {\n    // verification of the proof failed\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprotonmail%2Fgo-ecvrf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprotonmail%2Fgo-ecvrf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprotonmail%2Fgo-ecvrf/lists"}