@oraichain/blsdkg v2.0.1
blsdkg
Introduction
DKG
Distributed Key Generation aims to solve the problem of getting n parties able to cryptographically sign and verify signatures in the presence of some number t attackers in a decentralized network. To do so, this algorithm generates a public key, and a secret key of which no single party knows, but has some share of.
BLS
Pairing DKG and BLS has a lot of nice properties. First of all, through DKG, you actually able to generate and distribute usable BLS keys. Secondly, the way DKG’s distributed secret shares and BLS’s signing algorithm interact is efficient.
Suppose you run DKG, resulting in the group’s secret polynomial being f(x), and secret key shares thus being f(i) for i . Note that you wish to keep f(i) values secret, otherwise, f(x) can be created via polynomial interpretation. Now, you generate signatures H(m)^f(i), and if you attain at least t signatures, you can run polynomial interpolation in the exponent to gain H(m)^f(0). In this way, you have generated a signature that’s equivalent to a signature generated by the group’s private key - as if it was signed by f(0) in the first place - in an efficient manner and without having exposed any secret key shares.
Wasm
This library is written in Rust and compiled to WebAssembly. This allows for a fast and secure implementation of the DKG and BLS algorithms. The library is compiled to WebAssembly using wasm-pack, and then wrapped in a JavaScript library using wasm-bindgen.
Installation
yarn add @oraichain/blsdkg
Bundling
yarn build
Directly in Browser
CDN's serve the non-core-js polyfilled version by default. You can use a different
jsdeliver
<script src="https://cdn.jsdelivr.net/npm/@oraichain/torus.js"></script>
unpkg
<script src="https://unpkg.com/@oraichain/torus.js"></script>
Notes
This is a plugin that works only on the client side. So please register it as a ssr-free plugin.
5 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
10 months ago
10 months ago
10 months ago
10 months ago