Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bls-lib

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bls-lib

this library provides primitives for creating and verifying BLS threshold signatures

  • 0.3.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

NPM Package Build Status Coverage Status

js-standard-style

Synopsis

This libary provides primitives for creating and verifying BLS threshold signatures in Webassembly with a JS API. All the hard work is done by herumi/bls. This wraps the bls C++ code which is compiled to Webassembly for easier use.

Installation

npm install bls-lib

Usage


const bls = require('bls-lib')
bls.onModuleInit(() => {
  bls.init()

  const sec = bls.secretKey()
  const pub = bls.publicKey()
  const sig = bls.signature()

  bls.secretKeySetByCSPRNG(sec)
  const msg = 'hello world'
  bls.sign(sig, sec, msg)

  bls.getPublicKey(pub, sec)

  const v = bls.verify(sig, pub, msg)
  // v === true

  bls.free(sec)
  bls.free(sig)
  bls.free(pub)
})

Examples

./examples/

API

./docs/

Dependents

Building

First install the dependencies emscripten and ninja

 git clone --recursive https://github.com/dfinity/js-bls-lib.git
 cd js-bls-lib/build
 ninja

License

(C) 2017 DFINITY STIFTUNG

MPL-2.0

image

Keywords

FAQs

Package last updated on 17 Apr 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc