git ssb

0+

wanderer🌟 / bls-lib



Tree: 9226bf29380d872b89fd19a7dbfbcab484dfac9e

Files: 9226bf29380d872b89fd19a7dbfbcab484dfac9e / docs / index.md

20386 bytesRaw

<!-- Generated by documentation.js. Update this documentation by updating the source code. -->

Table of Contents

onModuleInit

index.js:14-21

Takes a callback that is called once the module is setup

Parameters

MCLBN_CURVE_FP254BNB

index.js:26-26

The FP254BNB curve

MCLBN_CURVE_FP382_1

index.js:31-31

The FP382_1 curve

MCLBN_CURVE_FP382_2

index.js:36-36

The FP382_2 curve

init

index.js:49-51

Initializes the library to use a given curve

Parameters

secretKey

index.js:57-59

Allocates a secret key

Returns number the pointer to the key

publicKey

index.js:65-67

Allocates a secret key

Returns number the pointer to the key

signature

index.js:73-75

Allocates a signature

Returns number the pointer to the signature

free

index.js:80-82

Frees a pointer

Parameters

freeArray

index.js:87-89

Frees an array of pointers

Parameters

idSetInt

index.js:96-101

Creates an ID from an int to use with threshold groups

Parameters

idImportFromInt

index.js:108-112

Creates an ID from an int and returns a pointer to it

Parameters

Returns number

idImport

index.js:119-127

Creates an ID from an int and returns a pointer to it

Parameters

Returns number

sign

index.js:135-135

Signs a message

Parameters

verify

index.js:144-144

Verifies a signature

Parameters

Returns Boolean

publicKeyExport

index.js:151-151

Given a pointer to a public key, this returns a 64 byte Int8Array containing the key

Parameters

Returns TypedArray

secretKeyExport

index.js:158-158

Given a pointer to a secret key, this returns a 32 byte Int8Array containing the key

Parameters

Returns TypedArray

signatureExport

index.js:165-165

Given a pointer to a signature, this returns a 32 byte Int8Array containing the signature

Parameters

Returns TypedArray

hashToSecretKey

index.js:172-172

Generates a secret key given a seed phrase

Parameters

secretKeyDeserialize

index.js:179-179

Writes a secretKey to memory

Parameters

secretKeyImport

index.js:187-191

Writes a secretKey to memory and returns a pointer to it

Parameters

Returns Number

publicKeyDeserialize

index.js:198-198

Writes a publicKey to memory

Parameters

publicKeyImport

index.js:205-209

Writes a publicKey to memory and returns a pointer to it

Parameters

Returns Number

signatureDeserialize

index.js:216-216

Writes a signature to memory

Parameters

signatureImport

index.js:223-227

Writes a signature to memory and returns a pointer to it

Parameters

Returns Number

secretKeySetByCSPRNG

index.js:233-233

Initializes a secret key by a Cryptographically Secure Pseudo Random Number Generator

Parameters

getPublicKey

index.js:240-240

Creates a public key from the secret key

Parameters

secretKeyRecover

index.js:248-248

Recovers a secret key for a group given the groups secret keys shares and the groups ids

Parameters

publicKeyRecover

index.js:256-256

Recovers a public key for a group given the groups public keys shares and the groups ids

Parameters

signatureRecover

index.js:264-264

Recovers a signature for a group given the groups public keys shares and the groups ids

Parameters

secretKeyShare

index.js:272-272

Creates a secret key share for a group member given the groups members id (which is the secret key) and array of master secret keys

Parameters

publicKeyShare

index.js:280-280

Creates a public key share for a group member given the groups members id (which is a the secret key) and array of master public keys

Parameters

publicKeyAdd

index.js:287-287

Takes two publicKeys and adds them together. pubkey1 = pubkey1 + pubkey2

Parameters

secretKeyAdd

index.js:294-294

Takes two secretKeys and adds them together. seckey1 = seckey1 + seckey2

Parameters

publicKeyIsEqual

index.js:302-302

Takes two publicKeys and tests their equality

Parameters

dhKeyExchange

index.js:310-310

Does Diffie–Hellman key exchange

Parameters

Built with git-ssb-web