2.0.1 • Published 5 months ago

@oraichain/blsdkg v2.0.1

Weekly downloads
-
License
-
Repository
-
Last release
5 months ago

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.

2.0.1

5 months ago

1.2.17

7 months ago

1.2.16

7 months ago

1.2.14

7 months ago

1.2.13

7 months ago

1.2.12

7 months ago

1.2.11

7 months ago

1.2.10

7 months ago

1.2.9

7 months ago

1.2.8

7 months ago

1.2.7

7 months ago

1.2.6

8 months ago

1.2.5

8 months ago

1.2.4

8 months ago

1.2.3

8 months ago

1.2.2

8 months ago

1.2.1

8 months ago

1.2.0-alpha.0

8 months ago

1.1.5

9 months ago

1.1.4

9 months ago

1.1.3

9 months ago

1.1.2

9 months ago

1.1.1

9 months ago

1.1.0

9 months ago

1.0.5

10 months ago

1.0.1

10 months ago

1.0.2

10 months ago

1.0.0

10 months ago