All Projects → pinqy520 → Vrf.js

pinqy520 / Vrf.js

Licence: mit
A pure Javascript Implementation of Verifiable Random Functions

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Vrf.js

Tendermint
⟁ Tendermint Core (BFT Consensus) in Go
Stars: ✭ 4,491 (+3521.77%)
Mutual labels:  cryptocurrency, consensus, cryptography
Awesome Substrate
A curated list of awesome projects and resources related to the Substrate blockchain development framework.
Stars: ✭ 228 (+83.87%)
Mutual labels:  cryptocurrency, consensus, cryptography
Blockchain Papers
区块链相关的有价值的文献
Stars: ✭ 20 (-83.87%)
Mutual labels:  cryptocurrency, cryptography
Lethean Vpn
Lethean Virtual Private Network (VPN)
Stars: ✭ 29 (-76.61%)
Mutual labels:  cryptocurrency, cryptography
Lightning Rfc
Lightning Network Specifications
Stars: ✭ 1,224 (+887.1%)
Mutual labels:  cryptocurrency, cryptography
Monero
Monero: the secure, private, untraceable cryptocurrency
Stars: ✭ 6,503 (+5144.35%)
Mutual labels:  cryptocurrency, cryptography
Aeternity
æternity: solving scalability problems by making sense of state-channels
Stars: ✭ 923 (+644.35%)
Mutual labels:  cryptocurrency, cryptography
Waves Api
Waves API library for Node.js and browser
Stars: ✭ 78 (-37.1%)
Mutual labels:  cryptocurrency, cryptography
Elle
The Elle coroutine-based asynchronous C++ development framework.
Stars: ✭ 459 (+270.16%)
Mutual labels:  consensus, cryptography
Library
Collection of papers in the field of distributed systems, game theory, cryptography, cryptoeconomics, zero knowledge
Stars: ✭ 100 (-19.35%)
Mutual labels:  consensus, cryptography
Zcash Mini
A minimal portable Zcash z-address generator for offline / paper wallets
Stars: ✭ 87 (-29.84%)
Mutual labels:  cryptocurrency, cryptography
Sputter
Ethereum Virtual Machine (EVM) implementation
Stars: ✭ 111 (-10.48%)
Mutual labels:  cryptocurrency, cryptography
Lnd
Lightning Network Daemon ⚡️
Stars: ✭ 5,623 (+4434.68%)
Mutual labels:  cryptocurrency, cryptography
Grin
Minimal implementation of the Mimblewimble protocol.
Stars: ✭ 4,897 (+3849.19%)
Mutual labels:  cryptocurrency, cryptography
Ipchain
IPChain Core Wallet
Stars: ✭ 26 (-79.03%)
Mutual labels:  cryptocurrency, cryptography
Firo
The privacy-focused cryptocurrency
Stars: ✭ 528 (+325.81%)
Mutual labels:  cryptocurrency, cryptography
Qtum
Qtum Core Wallet
Stars: ✭ 1,080 (+770.97%)
Mutual labels:  cryptocurrency, cryptography
Multi Party Ecdsa
Rust implementation of {t,n}-threshold ECDSA (elliptic curve digital signature algorithm).
Stars: ✭ 339 (+173.39%)
Mutual labels:  cryptocurrency, cryptography
Solar
🌞 Stellar wallet. Secure and user-friendly.
Stars: ✭ 117 (-5.65%)
Mutual labels:  cryptocurrency, cryptography
Bitcoin Cryptography Library
Nayuki's implementation of cryptographic primitives used in Bitcoin.
Stars: ✭ 81 (-34.68%)
Mutual labels:  cryptocurrency, cryptography

A pure Javascript Implementation of Verifiable Random Functions

Install

$ yarn add vrf.js

Usage

ECVRF

const {utils, ecvrf, sortition} = require('vrf.js')
const X = Buffer.from('test')

const [publicKey, privateKey] = utils.generatePair()

const {value, proof} = ecvrf.vrf(publicKey, privateKey, X)

ecvrf.verify(publicKey, X, proof, value)
// true

VRF Sortition

const {utils, ecvrf, sortition} = require('vrf.js')
const seed = Buffer.from('sortition')
const role = Buffer.from('test')
const w = utils.N(100)
const W = utils.N(1000)
const tau = utils.N(10)


const [publicKey, privateKey] = utils.generatePair()
const [value, proof, j] = sortition.sortition(
  privateKey, publicKey,
  seed, tau, role, w, W
)

if (+j > 0) {
  // next
}

more examples

APIs

  • utils.generatePair
  • utils.B
  • utils.N
  • ecvrf.vrf
  • ecvrf.prove
  • ecvrf.verify
  • ecvrf.proofToHash
  • ecvrf.hashToCurve
  • sortition.sortition
  • sortition.verifySort

TODOs

  • [x] browser support
  • [ ] web examples
  • [ ] visualization
  • [ ] RSA-FDH-VRF
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].