git ssb

0+

wanderer🌟 / bls-lib



Commit 22bf66e454af3c3430bd9354d73620173cf52426

rebuild docs

Signed-off-by: wanderer <mjbecze@gmail.com>
wanderer committed on 10/8/2017, 3:43:07 AM
Parent: a3e23d92e4ac874e7df189be8a33cd3ee1222cf4

Files changed

docs/index.mdchanged
docs/index.mdView
@@ -12,8 +12,9 @@
1212 - [signature](#signature)
1313 - [free](#free)
1414 - [freeArray](#freearray)
1515 - [idSetInt](#idsetint)
16 +- [idImportFromInt](#idimportfromint)
1617 - [sign](#sign)
1718 - [verify](#verify)
1819 - [publicKeyExport](#publickeyexport)
1920 - [secretKeyExport](#secretkeyexport)
@@ -32,9 +33,9 @@
3233 - [publicKeyShare](#publickeyshare)
3334
3435 ## onModuleInit
3536
36-[index.js:13-20](https://github.com/wanderer/bls-lib/blob/0e97e39f3b15ac41e2d87017b73dcad5b6950276/index.js#L13-L20 "Source code on GitHub")
37 +[index.js:14-21](https://github.com/wanderer/bls-lib/blob/63a2cdafe199f883855c63bd361a125a6b8b464a/index.js#L14-L21 "Source code on GitHub")
3738
3839 takes a callback that is called once the module is setup
3940
4041 **Parameters**
@@ -42,27 +43,27 @@
4243 - `cb`
4344
4445 ## MCLBN_CURVE_FP254BNB
4546
46-[index.js:25-25](https://github.com/wanderer/bls-lib/blob/0e97e39f3b15ac41e2d87017b73dcad5b6950276/index.js#L25-L25 "Source code on GitHub")
47 +[index.js:26-26](https://github.com/wanderer/bls-lib/blob/63a2cdafe199f883855c63bd361a125a6b8b464a/index.js#L26-L26 "Source code on GitHub")
4748
4849 the FP254BNB curve
4950
5051 ## MCLBN_CURVE_FP382_1
5152
52-[index.js:30-30](https://github.com/wanderer/bls-lib/blob/0e97e39f3b15ac41e2d87017b73dcad5b6950276/index.js#L30-L30 "Source code on GitHub")
53 +[index.js:31-31](https://github.com/wanderer/bls-lib/blob/63a2cdafe199f883855c63bd361a125a6b8b464a/index.js#L31-L31 "Source code on GitHub")
5354
5455 the FP382_1 curve
5556
5657 ## MCLBN_CURVE_FP382_2
5758
58-[index.js:35-35](https://github.com/wanderer/bls-lib/blob/0e97e39f3b15ac41e2d87017b73dcad5b6950276/index.js#L35-L35 "Source code on GitHub")
59 +[index.js:36-36](https://github.com/wanderer/bls-lib/blob/63a2cdafe199f883855c63bd361a125a6b8b464a/index.js#L36-L36 "Source code on GitHub")
5960
6061 the FP382_2 curve
6162
6263 ## init
6364
64-[index.js:52-54](https://github.com/wanderer/bls-lib/blob/0e97e39f3b15ac41e2d87017b73dcad5b6950276/index.js#L52-L54 "Source code on GitHub")
65 +[index.js:53-55](https://github.com/wanderer/bls-lib/blob/63a2cdafe199f883855c63bd361a125a6b8b464a/index.js#L53-L55 "Source code on GitHub")
6566
6667 intailizes the libary to use a given curve
6768
6869 **Parameters**
@@ -70,33 +71,33 @@
7071 - `curve` **[number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)** the curves that can be used are MCLBN_CURVE_FP254BNB, MCLBN_CURVE_FP382_1 or MCLBN_CURVE_FP382_2 (optional, default `exports.MCLBN_CURVE_FP254BNB`)
7172
7273 ## secretKey
7374
74-[index.js:60-62](https://github.com/wanderer/bls-lib/blob/0e97e39f3b15ac41e2d87017b73dcad5b6950276/index.js#L60-L62 "Source code on GitHub")
75 +[index.js:61-63](https://github.com/wanderer/bls-lib/blob/63a2cdafe199f883855c63bd361a125a6b8b464a/index.js#L61-L63 "Source code on GitHub")
7576
7677 allocates a secret key
7778
7879 Returns **[number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)** the pointer to the key
7980
8081 ## publicKey
8182
82-[index.js:68-70](https://github.com/wanderer/bls-lib/blob/0e97e39f3b15ac41e2d87017b73dcad5b6950276/index.js#L68-L70 "Source code on GitHub")
83 +[index.js:69-71](https://github.com/wanderer/bls-lib/blob/63a2cdafe199f883855c63bd361a125a6b8b464a/index.js#L69-L71 "Source code on GitHub")
8384
8485 allocates a secret key
8586
8687 Returns **[number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)** the pointer to the key
8788
8889 ## signature
8990
90-[index.js:76-78](https://github.com/wanderer/bls-lib/blob/0e97e39f3b15ac41e2d87017b73dcad5b6950276/index.js#L76-L78 "Source code on GitHub")
91 +[index.js:77-79](https://github.com/wanderer/bls-lib/blob/63a2cdafe199f883855c63bd361a125a6b8b464a/index.js#L77-L79 "Source code on GitHub")
9192
9293 allocates a signature
9394
9495 Returns **[number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)** the pointer to the signture
9596
9697 ## free
9798
98-[index.js:83-85](https://github.com/wanderer/bls-lib/blob/0e97e39f3b15ac41e2d87017b73dcad5b6950276/index.js#L83-L85 "Source code on GitHub")
99 +[index.js:84-86](https://github.com/wanderer/bls-lib/blob/63a2cdafe199f883855c63bd361a125a6b8b464a/index.js#L84-L86 "Source code on GitHub")
99100
100101 frees a pointer
101102
102103 **Parameters**
@@ -104,9 +105,9 @@
104105 - `x`
105106
106107 ## freeArray
107108
108-[index.js:90-92](https://github.com/wanderer/bls-lib/blob/0e97e39f3b15ac41e2d87017b73dcad5b6950276/index.js#L90-L92 "Source code on GitHub")
109 +[index.js:91-93](https://github.com/wanderer/bls-lib/blob/63a2cdafe199f883855c63bd361a125a6b8b464a/index.js#L91-L93 "Source code on GitHub")
109110
110111 frees an array of pointers
111112
112113 **Parameters**
@@ -114,20 +115,32 @@
114115 - `a`
115116
116117 ## idSetInt
117118
118-[index.js:99-104](https://github.com/wanderer/bls-lib/blob/0e97e39f3b15ac41e2d87017b73dcad5b6950276/index.js#L99-L104 "Source code on GitHub")
119 +[index.js:100-105](https://github.com/wanderer/bls-lib/blob/63a2cdafe199f883855c63bd361a125a6b8b464a/index.js#L100-L105 "Source code on GitHub")
119120
120-creates an ID to use in with threshold groups
121 +creates an ID from an int to use in with threshold groups
121122
122123 **Parameters**
123124
124125 - `sk` **[number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)** a pointer to the secret key, secret key stuct is used to hold the id
125126 - `n` **[number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)** a int repsenting the ID. n cannot be zero.
126127
128 +## idImportFromInt
129 +
130 +[index.js:112-116](https://github.com/wanderer/bls-lib/blob/63a2cdafe199f883855c63bd361a125a6b8b464a/index.js#L112-L116 "Source code on GitHub")
131 +
132 +creates an ID from an int and returns a pointer to it
133 +
134 +**Parameters**
135 +
136 +- `n` **[number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)** a int repsenting the ID. n cannot be zero.
137 +
138 +Returns **[number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)**
139 +
127140 ## sign
128141
129-[index.js:112-112](https://github.com/wanderer/bls-lib/blob/0e97e39f3b15ac41e2d87017b73dcad5b6950276/index.js#L112-L112 "Source code on GitHub")
142 +[index.js:124-124](https://github.com/wanderer/bls-lib/blob/63a2cdafe199f883855c63bd361a125a6b8b464a/index.js#L124-L124 "Source code on GitHub")
130143
131144 signs a message
132145
133146 **Parameters**
@@ -137,9 +150,9 @@
137150 - `msg` **([TypedArray](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray) \| [String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String))** the message to sign
138151
139152 ## verify
140153
141-[index.js:120-120](https://github.com/wanderer/bls-lib/blob/0e97e39f3b15ac41e2d87017b73dcad5b6950276/index.js#L120-L120 "Source code on GitHub")
154 +[index.js:132-132](https://github.com/wanderer/bls-lib/blob/63a2cdafe199f883855c63bd361a125a6b8b464a/index.js#L132-L132 "Source code on GitHub")
142155
143156 verifies a signature
144157
145158 **Parameters**
@@ -149,9 +162,9 @@
149162 - `msg` **([TypedArray](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray) \| [String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String))** the message that was signed
150163
151164 ## publicKeyExport
152165
153-[index.js:127-127](https://github.com/wanderer/bls-lib/blob/0e97e39f3b15ac41e2d87017b73dcad5b6950276/index.js#L127-L127 "Source code on GitHub")
166 +[index.js:139-139](https://github.com/wanderer/bls-lib/blob/63a2cdafe199f883855c63bd361a125a6b8b464a/index.js#L139-L139 "Source code on GitHub")
154167
155168 given a pointer to a public key this returns 64 byte Int8Array containing the key
156169
157170 **Parameters**
@@ -161,9 +174,9 @@
161174 Returns **[TypedArray](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray)**
162175
163176 ## secretKeyExport
164177
165-[index.js:134-134](https://github.com/wanderer/bls-lib/blob/0e97e39f3b15ac41e2d87017b73dcad5b6950276/index.js#L134-L134 "Source code on GitHub")
178 +[index.js:146-146](https://github.com/wanderer/bls-lib/blob/63a2cdafe199f883855c63bd361a125a6b8b464a/index.js#L146-L146 "Source code on GitHub")
166179
167180 given a pointer to a secret key this returns 32 byte Int8Array containing the key
168181
169182 **Parameters**
@@ -173,9 +186,9 @@
173186 Returns **[TypedArray](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray)**
174187
175188 ## signatureExport
176189
177-[index.js:141-141](https://github.com/wanderer/bls-lib/blob/0e97e39f3b15ac41e2d87017b73dcad5b6950276/index.js#L141-L141 "Source code on GitHub")
190 +[index.js:153-153](https://github.com/wanderer/bls-lib/blob/63a2cdafe199f883855c63bd361a125a6b8b464a/index.js#L153-L153 "Source code on GitHub")
178191
179192 given a pointer to a signature this returns 32 byte Int8Array containing the signature
180193
181194 **Parameters**
@@ -185,9 +198,9 @@
185198 Returns **[TypedArray](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray)**
186199
187200 ## hashToSecretKey
188201
189-[index.js:148-148](https://github.com/wanderer/bls-lib/blob/0e97e39f3b15ac41e2d87017b73dcad5b6950276/index.js#L148-L148 "Source code on GitHub")
202 +[index.js:160-160](https://github.com/wanderer/bls-lib/blob/63a2cdafe199f883855c63bd361a125a6b8b464a/index.js#L160-L160 "Source code on GitHub")
190203
191204 generates a secret key given a seed phrase.
192205
193206 **Parameters**
@@ -196,9 +209,9 @@
196209 - `seed` **([String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String) \| [TypedArray](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray))** the seed phrase
197210
198211 ## secretKeyDeserialize
199212
200-[index.js:155-155](https://github.com/wanderer/bls-lib/blob/0e97e39f3b15ac41e2d87017b73dcad5b6950276/index.js#L155-L155 "Source code on GitHub")
213 +[index.js:167-167](https://github.com/wanderer/bls-lib/blob/63a2cdafe199f883855c63bd361a125a6b8b464a/index.js#L167-L167 "Source code on GitHub")
201214
202215 write a secretKey to memory
203216
204217 **Parameters**
@@ -207,9 +220,9 @@
207220 - `array` **[TypedArray](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray)** the secret key as a 32 byte TypedArray
208221
209222 ## secretKeyImport
210223
211-[index.js:163-167](https://github.com/wanderer/bls-lib/blob/0e97e39f3b15ac41e2d87017b73dcad5b6950276/index.js#L163-L167 "Source code on GitHub")
224 +[index.js:175-179](https://github.com/wanderer/bls-lib/blob/63a2cdafe199f883855c63bd361a125a6b8b464a/index.js#L175-L179 "Source code on GitHub")
212225
213226 write a secretKey to memory and returns a pointer to it
214227
215228 **Parameters**
@@ -221,9 +234,9 @@
221234 Returns **[Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)**
222235
223236 ## publicKeyDeserialize
224237
225-[index.js:174-174](https://github.com/wanderer/bls-lib/blob/0e97e39f3b15ac41e2d87017b73dcad5b6950276/index.js#L174-L174 "Source code on GitHub")
238 +[index.js:186-186](https://github.com/wanderer/bls-lib/blob/63a2cdafe199f883855c63bd361a125a6b8b464a/index.js#L186-L186 "Source code on GitHub")
226239
227240 write a publicKey to memory
228241
229242 **Parameters**
@@ -232,9 +245,9 @@
232245 - `array` **[TypedArray](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray)** the secret key as a 64 byte TypedArray
233246
234247 ## publicKeyImport
235248
236-[index.js:181-185](https://github.com/wanderer/bls-lib/blob/0e97e39f3b15ac41e2d87017b73dcad5b6950276/index.js#L181-L185 "Source code on GitHub")
249 +[index.js:193-197](https://github.com/wanderer/bls-lib/blob/63a2cdafe199f883855c63bd361a125a6b8b464a/index.js#L193-L197 "Source code on GitHub")
237250
238251 write a publicKey to memory and returns a pointer to it
239252
240253 **Parameters**
@@ -245,9 +258,9 @@
245258 Returns **[Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)**
246259
247260 ## signatureDeserialize
248261
249-[index.js:192-192](https://github.com/wanderer/bls-lib/blob/0e97e39f3b15ac41e2d87017b73dcad5b6950276/index.js#L192-L192 "Source code on GitHub")
262 +[index.js:204-204](https://github.com/wanderer/bls-lib/blob/63a2cdafe199f883855c63bd361a125a6b8b464a/index.js#L204-L204 "Source code on GitHub")
250263
251264 write a signature to memory
252265
253266 **Parameters**
@@ -256,9 +269,9 @@
256269 - `array` **[TypedArray](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray)** the signature as a 32 byte TypedArray
257270
258271 ## signatureImport
259272
260-[index.js:199-203](https://github.com/wanderer/bls-lib/blob/0e97e39f3b15ac41e2d87017b73dcad5b6950276/index.js#L199-L203 "Source code on GitHub")
273 +[index.js:211-215](https://github.com/wanderer/bls-lib/blob/63a2cdafe199f883855c63bd361a125a6b8b464a/index.js#L211-L215 "Source code on GitHub")
261274
262275 write a signature to memory and returns a pointer to it
263276
264277 **Parameters**
@@ -269,9 +282,9 @@
269282 Returns **[Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)**
270283
271284 ## secretKeyRecover
272285
273-[index.js:211-211](https://github.com/wanderer/bls-lib/blob/0e97e39f3b15ac41e2d87017b73dcad5b6950276/index.js#L211-L211 "Source code on GitHub")
286 +[index.js:223-223](https://github.com/wanderer/bls-lib/blob/63a2cdafe199f883855c63bd361a125a6b8b464a/index.js#L223-L223 "Source code on GitHub")
274287
275288 Recovers a secret key for a group given the groups secret keys shares and the groups ids
276289
277290 **Parameters**
@@ -281,9 +294,9 @@
281294 - `idArrah` **[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)&lt;numbers>** an array of pointers to ids in the groups. The length of the array should be the threshold number for the group
282295
283296 ## publicKeyRecover
284297
285-[index.js:219-219](https://github.com/wanderer/bls-lib/blob/0e97e39f3b15ac41e2d87017b73dcad5b6950276/index.js#L219-L219 "Source code on GitHub")
298 +[index.js:231-231](https://github.com/wanderer/bls-lib/blob/63a2cdafe199f883855c63bd361a125a6b8b464a/index.js#L231-L231 "Source code on GitHub")
286299
287300 Recovers a public key for a group given the groups public keys shares and the groups ids
288301
289302 **Parameters**
@@ -293,9 +306,9 @@
293306 - `idArrah` **[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)&lt;numbers>** an array of pointers to ids in the groups. The length of the array should be the threshold number for the group
294307
295308 ## signatureRecover
296309
297-[index.js:227-227](https://github.com/wanderer/bls-lib/blob/0e97e39f3b15ac41e2d87017b73dcad5b6950276/index.js#L227-L227 "Source code on GitHub")
310 +[index.js:239-239](https://github.com/wanderer/bls-lib/blob/63a2cdafe199f883855c63bd361a125a6b8b464a/index.js#L239-L239 "Source code on GitHub")
298311
299312 Recovers a signature for a group given the groups public keys shares and the groups ids
300313
301314 **Parameters**
@@ -305,9 +318,9 @@
305318 - `idArrah` **[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)&lt;numbers>** an array of pointers to ids in the groups. The length of the array should be the threshold number for the group
306319
307320 ## secretKeyShare
308321
309-[index.js:235-235](https://github.com/wanderer/bls-lib/blob/0e97e39f3b15ac41e2d87017b73dcad5b6950276/index.js#L235-L235 "Source code on GitHub")
322 +[index.js:247-247](https://github.com/wanderer/bls-lib/blob/63a2cdafe199f883855c63bd361a125a6b8b464a/index.js#L247-L247 "Source code on GitHub")
310323
311324 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
312325
313326 **Parameters**
@@ -317,9 +330,9 @@
317330 - `id` **[number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)** the id of the member
318331
319332 ## publicKeyShare
320333
321-[index.js:243-243](https://github.com/wanderer/bls-lib/blob/0e97e39f3b15ac41e2d87017b73dcad5b6950276/index.js#L243-L243 "Source code on GitHub")
334 +[index.js:255-255](https://github.com/wanderer/bls-lib/blob/63a2cdafe199f883855c63bd361a125a6b8b464a/index.js#L255-L255 "Source code on GitHub")
322335
323336 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
324337
325338 **Parameters**

Built with git-ssb-web