git ssb

0+

wanderer🌟 / bls-lib



Tree: 786bbae243555dcf10819e786d535cd40788c12b

Files: 786bbae243555dcf10819e786d535cd40788c12b / docs / index.md

20694 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

intailizes the libary 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 signture

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 in 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 64 byte Int8Array containing the key

Parameters

Returns TypedArray

secretKeyExport

index.js:158-158

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

Parameters

Returns TypedArray

signatureExport

index.js:165-165

given a pointer to a signature this returns 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

write a secretKey to memory

Parameters

secretKeyImport

index.js:187-191

write a secretKey to memory and returns a pointer to it

Parameters

Returns Number

publicKeyDeserialize

index.js:198-198

write a publicKey to memory

Parameters

publicKeyImport

index.js:205-209

write a publicKey to memory and returns a pointer to it

Parameters

Returns Number

signatureDeserialize

index.js:216-216

write a signature to memory

Parameters

signatureImport

index.js:223-227

write a signature to memory and returns a pointer to it

Parameters

Returns Number

secretKeySetByCSPRNG

index.js:233-233

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

Parameters

getPublicKey

index.js:240-240

Create 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 secket key share for a group member given the groups members id (which is a 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

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

Parameters

secretKeyAdd

index.js:294-294

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

Parameters

publicKeyIsEqual

index.js:302-302

Take two publicKeys and tests thier equality

Parameters

dhKeyExchange

index.js:310-310

Does Diffie–Hellman key exchange

Parameters

Built with git-ssb-web