threshold-elgamal 0.1.7 → 0.1.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -9,6 +9,10 @@ It was written as clearly as possible, modularized, and with long, explicit vari
9
9
 
10
10
  **This is not a cryptographically audited library, make sure you know what you are doing before using it.**
11
11
 
12
+ ## Documentation
13
+
14
+ For a detailed list of exported types and functions, [click here](https://tenemo.github.io/threshold-elgamal/modules.html).
15
+
12
16
  ## Contributing
13
17
 
14
18
  The JavaScript/TypeScript ecosystem seems to be lacking in modern, functional ElGamal libraries that work out of the box with reasonable default (this library isn't at that point yet). All PRs are welcome.
@@ -0,0 +1 @@
1
+ _config.yml.midnight
package/docs/index.md CHANGED
@@ -11,6 +11,10 @@ It was written as clearly as possible, modularized, and with long, explicit vari
11
11
 
12
12
  **This is not a cryptographically audited library, make sure you know what you are doing before using it.**
13
13
 
14
+ ## Documentation
15
+
16
+ For a detailed list of exported types and functions, [click here](https://tenemo.github.io/threshold-elgamal/modules.html).
17
+
14
18
  ## Contributing
15
19
 
16
20
  The JavaScript/TypeScript ecosystem seems to be lacking in modern, functional ElGamal libraries that work out of the box with reasonable default (this library isn't at that point yet). All PRs are welcome.
package/docs/modules.md CHANGED
@@ -40,7 +40,7 @@
40
40
 
41
41
  #### Defined in
42
42
 
43
- [types.ts:1](https://github.com/Tenemo/threshold-elgamal/blob/10f1361a99b0f5ef342dc456d82e69dcabbdeb55/src/types.ts#L1)
43
+ [types.ts:1](https://github.com/Tenemo/threshold-elgamal/blob/c8e377965a04bb14f4a82cc78ceda3db769c4f77/src/types.ts#L1)
44
44
 
45
45
  ___
46
46
 
@@ -57,7 +57,7 @@ ___
57
57
 
58
58
  #### Defined in
59
59
 
60
- [types.ts:13](https://github.com/Tenemo/threshold-elgamal/blob/10f1361a99b0f5ef342dc456d82e69dcabbdeb55/src/types.ts#L13)
60
+ [types.ts:13](https://github.com/Tenemo/threshold-elgamal/blob/c8e377965a04bb14f4a82cc78ceda3db769c4f77/src/types.ts#L13)
61
61
 
62
62
  ___
63
63
 
@@ -76,7 +76,7 @@ ___
76
76
 
77
77
  #### Defined in
78
78
 
79
- [types.ts:6](https://github.com/Tenemo/threshold-elgamal/blob/10f1361a99b0f5ef342dc456d82e69dcabbdeb55/src/types.ts#L6)
79
+ [types.ts:6](https://github.com/Tenemo/threshold-elgamal/blob/c8e377965a04bb14f4a82cc78ceda3db769c4f77/src/types.ts#L6)
80
80
 
81
81
  ___
82
82
 
@@ -93,7 +93,7 @@ ___
93
93
 
94
94
  #### Defined in
95
95
 
96
- [types.ts:18](https://github.com/Tenemo/threshold-elgamal/blob/10f1361a99b0f5ef342dc456d82e69dcabbdeb55/src/types.ts#L18)
96
+ [types.ts:18](https://github.com/Tenemo/threshold-elgamal/blob/c8e377965a04bb14f4a82cc78ceda3db769c4f77/src/types.ts#L18)
97
97
 
98
98
  ## Functions
99
99
 
@@ -118,7 +118,7 @@ The combined decryption factor.
118
118
 
119
119
  #### Defined in
120
120
 
121
- [thresholdElgamal.ts:129](https://github.com/Tenemo/threshold-elgamal/blob/10f1361a99b0f5ef342dc456d82e69dcabbdeb55/src/thresholdElgamal.ts#L129)
121
+ [thresholdElgamal.ts:129](https://github.com/Tenemo/threshold-elgamal/blob/c8e377965a04bb14f4a82cc78ceda3db769c4f77/src/thresholdElgamal.ts#L129)
122
122
 
123
123
  ___
124
124
 
@@ -143,7 +143,7 @@ The combined public key.
143
143
 
144
144
  #### Defined in
145
145
 
146
- [thresholdElgamal.ts:103](https://github.com/Tenemo/threshold-elgamal/blob/10f1361a99b0f5ef342dc456d82e69dcabbdeb55/src/thresholdElgamal.ts#L103)
146
+ [thresholdElgamal.ts:103](https://github.com/Tenemo/threshold-elgamal/blob/c8e377965a04bb14f4a82cc78ceda3db769c4f77/src/thresholdElgamal.ts#L103)
147
147
 
148
148
  ___
149
149
 
@@ -169,7 +169,7 @@ The result of the partial decryption.
169
169
 
170
170
  #### Defined in
171
171
 
172
- [thresholdElgamal.ts:116](https://github.com/Tenemo/threshold-elgamal/blob/10f1361a99b0f5ef342dc456d82e69dcabbdeb55/src/thresholdElgamal.ts#L116)
172
+ [thresholdElgamal.ts:116](https://github.com/Tenemo/threshold-elgamal/blob/c8e377965a04bb14f4a82cc78ceda3db769c4f77/src/thresholdElgamal.ts#L116)
173
173
 
174
174
  ___
175
175
 
@@ -195,7 +195,7 @@ The decrypted secret as an integer.
195
195
 
196
196
  #### Defined in
197
197
 
198
- [elgamal.ts:77](https://github.com/Tenemo/threshold-elgamal/blob/10f1361a99b0f5ef342dc456d82e69dcabbdeb55/src/elgamal.ts#L77)
198
+ [elgamal.ts:77](https://github.com/Tenemo/threshold-elgamal/blob/c8e377965a04bb14f4a82cc78ceda3db769c4f77/src/elgamal.ts#L77)
199
199
 
200
200
  ___
201
201
 
@@ -222,7 +222,7 @@ The encrypted secret, consisting of two BigIntegers (c1 and c2).
222
222
 
223
223
  #### Defined in
224
224
 
225
- [elgamal.ts:51](https://github.com/Tenemo/threshold-elgamal/blob/10f1361a99b0f5ef342dc456d82e69dcabbdeb55/src/elgamal.ts#L51)
225
+ [elgamal.ts:51](https://github.com/Tenemo/threshold-elgamal/blob/c8e377965a04bb14f4a82cc78ceda3db769c4f77/src/elgamal.ts#L51)
226
226
 
227
227
  ___
228
228
 
@@ -248,7 +248,7 @@ An array of key shares, each containing a private and public key share.
248
248
 
249
249
  #### Defined in
250
250
 
251
- [thresholdElgamal.ts:83](https://github.com/Tenemo/threshold-elgamal/blob/10f1361a99b0f5ef342dc456d82e69dcabbdeb55/src/thresholdElgamal.ts#L83)
251
+ [thresholdElgamal.ts:83](https://github.com/Tenemo/threshold-elgamal/blob/c8e377965a04bb14f4a82cc78ceda3db769c4f77/src/thresholdElgamal.ts#L83)
252
252
 
253
253
  ___
254
254
 
@@ -273,7 +273,7 @@ The generated parameters including the prime, generator, publicKey, and privateK
273
273
 
274
274
  #### Defined in
275
275
 
276
- [elgamal.ts:14](https://github.com/Tenemo/threshold-elgamal/blob/10f1361a99b0f5ef342dc456d82e69dcabbdeb55/src/elgamal.ts#L14)
276
+ [elgamal.ts:14](https://github.com/Tenemo/threshold-elgamal/blob/c8e377965a04bb14f4a82cc78ceda3db769c4f77/src/elgamal.ts#L14)
277
277
 
278
278
  ___
279
279
 
@@ -299,7 +299,7 @@ The key share containing a private and public key share for the participant.
299
299
 
300
300
  #### Defined in
301
301
 
302
- [thresholdElgamal.ts:56](https://github.com/Tenemo/threshold-elgamal/blob/10f1361a99b0f5ef342dc456d82e69dcabbdeb55/src/thresholdElgamal.ts#L56)
302
+ [thresholdElgamal.ts:56](https://github.com/Tenemo/threshold-elgamal/blob/c8e377965a04bb14f4a82cc78ceda3db769c4f77/src/thresholdElgamal.ts#L56)
303
303
 
304
304
  ___
305
305
 
@@ -324,7 +324,7 @@ A random bigint within the specified range.
324
324
 
325
325
  #### Defined in
326
326
 
327
- [utils.ts:11](https://github.com/Tenemo/threshold-elgamal/blob/10f1361a99b0f5ef342dc456d82e69dcabbdeb55/src/utils.ts#L11)
327
+ [utils.ts:11](https://github.com/Tenemo/threshold-elgamal/blob/c8e377965a04bb14f4a82cc78ceda3db769c4f77/src/utils.ts#L11)
328
328
 
329
329
  ___
330
330
 
@@ -350,7 +350,7 @@ The result of the multiplication, as a new encrypted message.
350
350
 
351
351
  #### Defined in
352
352
 
353
- [utils.ts:33](https://github.com/Tenemo/threshold-elgamal/blob/10f1361a99b0f5ef342dc456d82e69dcabbdeb55/src/utils.ts#L33)
353
+ [utils.ts:33](https://github.com/Tenemo/threshold-elgamal/blob/c8e377965a04bb14f4a82cc78ceda3db769c4f77/src/utils.ts#L33)
354
354
 
355
355
  ___
356
356
 
@@ -378,4 +378,4 @@ The decrypted secret, assuming it was small enough to be directly encrypted.
378
378
 
379
379
  #### Defined in
380
380
 
381
- [thresholdElgamal.ts:148](https://github.com/Tenemo/threshold-elgamal/blob/10f1361a99b0f5ef342dc456d82e69dcabbdeb55/src/thresholdElgamal.ts#L148)
381
+ [thresholdElgamal.ts:148](https://github.com/Tenemo/threshold-elgamal/blob/c8e377965a04bb14f4a82cc78ceda3db769c4f77/src/thresholdElgamal.ts#L148)
@@ -0,0 +1,31 @@
1
+ BigInt.prototype.toJSON = function () {
2
+ return this.toString() + 'n';
3
+ };
4
+ module.exports = {
5
+ opts: {
6
+ template: 'node_modules/docdash',
7
+ },
8
+ plugins: ['plugins/markdown'],
9
+ docdash: {
10
+ static: true,
11
+ sort: true,
12
+ search: true,
13
+ collapse: true,
14
+ typedefs: true,
15
+ removeQuotes: 'none',
16
+ scripts: [],
17
+ menu: {
18
+ 'Github repo': {
19
+ href: 'https://github.com/Tenemo/threshold-elgamal',
20
+ target: '_blank',
21
+ class: 'menu-item',
22
+ id: 'repository',
23
+ },
24
+ },
25
+ },
26
+ templates: {
27
+ default: {
28
+ useLongnameInNav: true,
29
+ },
30
+ },
31
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "threshold-elgamal",
3
- "version": "0.1.7",
3
+ "version": "0.1.9",
4
4
  "author": "Piotr Piech <piotr@piech.dev>",
5
5
  "license": "MIT",
6
6
  "description": "threshold-elgamal",
@@ -19,13 +19,13 @@
19
19
  "eslint": "eslint . -c eslint.config.js",
20
20
  "eslint:fix": "eslint . --fix -c eslint.config.js",
21
21
  "tsc": "tsc",
22
- "prebuild": "npm run eslint && npm run tsc && npm run test && rimraf dist",
22
+ "prebuild": "npm run eslint && npm run tsc && npm run test && del-cli dist",
23
23
  "build": "tsc --project tsconfig.build.json",
24
24
  "build:skip": "tsc --project tsconfig.build.json",
25
25
  "test": "vitest --watch=false --reporter=verbose",
26
26
  "test:watch": "vitest --watch=true --reporter=verbose",
27
- "pretypedoc": "rimraf docs",
28
- "typedoc": "typedoc --plugin typedoc-plugin-markdown src --out docs --darkHighlightTheme dark-plus --githubPages false --entryDocument index.md",
27
+ "pretypedoc": "del-cli 'docs/*' '!docs/_config.yml'",
28
+ "typedoc": "typedoc --plugin typedoc-plugin-markdown src --out docs --darkHighlightTheme dark-plus --githubPages false --entryDocument index.md --cleanOutputDir false",
29
29
  "prepublish:public": "npm run prebuild",
30
30
  "publish:public": "npm publish --access public"
31
31
  },
@@ -43,6 +43,7 @@
43
43
  "@types/prettier": "^2.7.3",
44
44
  "@typescript-eslint/eslint-plugin": "^7.5.0",
45
45
  "@typescript-eslint/parser": "^7.5.0",
46
+ "del-cli": "^5.1.0",
46
47
  "eslint": "^8.57.0",
47
48
  "eslint-config-prettier": "^9.1.0",
48
49
  "eslint-import-resolver-typescript": "^3.6.1",
@@ -52,7 +53,6 @@
52
53
  "globals": "^15.0.0",
53
54
  "prettier": "^3.2.5",
54
55
  "prettier-eslint": "^16.3.0",
55
- "rimraf": "^5.0.5",
56
56
  "tsx": "^4.7.2",
57
57
  "typedoc": "^0.25.13",
58
58
  "typedoc-plugin-markdown": "^3.17.1",