threshold-elgamal 1.0.0 → 1.0.1

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
@@ -41,6 +41,15 @@ npm install threshold-elgamal
41
41
  - Authentication signatures require Web Crypto `Ed25519`.
42
42
  - Transport share exchange requires Web Crypto `X25519`.
43
43
 
44
+ See [Runtime and compatibility](https://tenemo.github.io/threshold-elgamal/guides/runtime-and-compatibility/) for the tested browser and Node matrix.
45
+
46
+ ## Start here
47
+
48
+ - [Verifying a public board](https://tenemo.github.io/threshold-elgamal/guides/verifying-a-public-board/): start here for `tryVerifyElectionCeremony(...)` and `verifyElectionCeremony(...)`.
49
+ - [Browser and worker usage](https://tenemo.github.io/threshold-elgamal/guides/browser-and-worker-usage/): start here for key generation, manifest setup, and encrypted transport envelopes.
50
+ - [Published payload examples](https://tenemo.github.io/threshold-elgamal/guides/published-payload-examples/): start here if you need concrete JSON, posting, or persistence patterns.
51
+ - [Honest-majority voting flow](https://tenemo.github.io/threshold-elgamal/guides/three-participant-voting-flow/): read this for the supported phase-by-phase transcript story.
52
+
44
53
  ## Documentation
45
54
 
46
55
  - Hosted documentation site: [tenemo.github.io/threshold-elgamal](https://tenemo.github.io/threshold-elgamal/)
@@ -49,6 +58,7 @@ npm install threshold-elgamal
49
58
  - Browser and worker usage: [tenemo.github.io/threshold-elgamal/guides/browser-and-worker-usage](https://tenemo.github.io/threshold-elgamal/guides/browser-and-worker-usage/)
50
59
  - Published payload examples: [tenemo.github.io/threshold-elgamal/guides/published-payload-examples](https://tenemo.github.io/threshold-elgamal/guides/published-payload-examples/)
51
60
  - Honest-majority voting flow: [tenemo.github.io/threshold-elgamal/guides/three-participant-voting-flow](https://tenemo.github.io/threshold-elgamal/guides/three-participant-voting-flow/)
61
+ - Runtime and compatibility: [tenemo.github.io/threshold-elgamal/guides/runtime-and-compatibility](https://tenemo.github.io/threshold-elgamal/guides/runtime-and-compatibility/)
52
62
  - Security boundary: [tenemo.github.io/threshold-elgamal/guides/security-and-non-goals](https://tenemo.github.io/threshold-elgamal/guides/security-and-non-goals/)
53
63
  - Production voting safety review: [tenemo.github.io/threshold-elgamal/guides/production-voting-safety-review](https://tenemo.github.io/threshold-elgamal/guides/production-voting-safety-review/)
54
64
  - API docs: [tenemo.github.io/threshold-elgamal/api](https://tenemo.github.io/threshold-elgamal/api/)
@@ -92,11 +102,7 @@ There is no supported `n-of-n` mode and no supported public `k-of-n` configurati
92
102
 
93
103
  Transcript verification requires key-derivation confirmations from every qualified participant.
94
104
 
95
- ## Choose your entry point
96
-
97
- - Verifying a public board: start with the hosted guide for `tryVerifyElectionCeremony(...)` and `verifyElectionCeremony(...)`.
98
- - Browser and worker usage: start with the browser guide for key generation, manifest setup, and encrypted transport envelopes.
99
- - Payload shapes and storage: start with the payload examples guide if you need concrete JSON, posting, or persistence patterns.
105
+ See [Honest-majority voting flow](https://tenemo.github.io/threshold-elgamal/guides/three-participant-voting-flow/) for the full phase-by-phase transcript.
100
106
 
101
107
  ## Getting started
102
108
 
@@ -144,7 +150,7 @@ console.log(majorityThreshold(3)); // 2
144
150
  console.log(sessionId.length); // 64
145
151
  ```
146
152
 
147
- If your application consumes a complete public board, the shortest safe verifier entry point is:
153
+ If your application consumes a complete public board, start with [Verifying a public board](https://tenemo.github.io/threshold-elgamal/guides/verifying-a-public-board/) and then move directly to the verifier entry point:
148
154
 
149
155
  ```typescript
150
156
  import {
@@ -172,11 +178,12 @@ if (!result.ok) {
172
178
  }
173
179
  ```
174
180
 
175
- The root package also exposes public builders for:
181
+ The root package also exposes builders for the signed protocol payloads used across the shipped ceremony, including:
176
182
 
177
183
  - manifest publication
178
184
  - registration
179
185
  - manifest acceptance
186
+ - phase checkpoints
180
187
  - Pedersen commitments
181
188
  - encrypted dual-share envelopes
182
189
  - Feldman commitments
@@ -186,7 +193,14 @@ The root package also exposes public builders for:
186
193
  - decryption shares
187
194
  - tally publication
188
195
 
189
- For concrete integration examples, start with the hosted guides below. The repository integration harness exercises the same workflow, but it is not part of the supported public API.
196
+ For the reveal path, the public root surface is intentionally two-step:
197
+
198
+ - compute each partial share with `createDecryptionShare(...)`
199
+ - prove and publish it with `createDLEQProof(...)` and `createDecryptionSharePayload(...)`
200
+
201
+ After collecting a threshold subset, recover the tally with `combineDecryptionShares(...)`.
202
+
203
+ For concrete posted JSON shapes, use [Published payload examples](https://tenemo.github.io/threshold-elgamal/guides/published-payload-examples/).
190
204
 
191
205
  ## Security boundary
192
206
 
@@ -211,7 +225,7 @@ What it does not claim:
211
225
 
212
226
  `ballot-close` is an auditable administrative cutoff, not a fairness proof about board arrival order. The library proves what was counted, not whether the organizer waited long enough before closing.
213
227
 
214
- For a production-threat-model verdict that maps these boundaries to the shipped verifier and tests, read the production voting safety review in the hosted docs.
228
+ For a production-threat-model verdict that maps these boundaries to the shipped verifier and tests, read the [production voting safety review](https://tenemo.github.io/threshold-elgamal/guides/production-voting-safety-review/).
215
229
 
216
230
  ## Development
217
231
 
@@ -221,6 +235,8 @@ pnpm run lint
221
235
  pnpm run tsc
222
236
  pnpm run test
223
237
  pnpm run build
238
+ pnpm run verify:docs
239
+ pnpm run docs:build:site
224
240
  ```
225
241
 
226
242
  ## License
package/dist/index.d.ts CHANGED
@@ -12,7 +12,7 @@ export { decryptEnvelope, encryptEnvelope } from './transport/envelopes.js';
12
12
  export { exportAuthPublicKey, generateAuthKeyPair } from './transport/auth.js';
13
13
  export { exportTransportPublicKey, generateTransportKeyPair, } from './transport/key-agreement.js';
14
14
  export type { EncodedAuthPublicKey, EncodedTransportPublicKey, EncryptedEnvelope, EnvelopeContext, TransportKeyPair, } from './transport/types.js';
15
- export { combineDecryptionShares } from './threshold/decrypt.js';
15
+ export { combineDecryptionShares, createDecryptionShare, } from './threshold/decrypt.js';
16
16
  export type { DecryptionShare, Share, VerifiedAggregateCiphertext, } from './threshold/types.js';
17
17
  export { deriveJointPublicKey, deriveTranscriptVerificationKey, verifyDKGTranscript, } from './dkg/verification.js';
18
18
  export { decodePedersenShareEnvelope, encodePedersenShareEnvelope, } from './dkg/pedersen-share-codec.js';
package/dist/index.js CHANGED
@@ -9,7 +9,7 @@ export { createSchnorrProof, verifySchnorrProof } from './proofs/schnorr.js';
9
9
  export { decryptEnvelope, encryptEnvelope } from './transport/envelopes.js';
10
10
  export { exportAuthPublicKey, generateAuthKeyPair } from './transport/auth.js';
11
11
  export { exportTransportPublicKey, generateTransportKeyPair, } from './transport/key-agreement.js';
12
- export { combineDecryptionShares } from './threshold/decrypt.js';
12
+ export { combineDecryptionShares, createDecryptionShare, } from './threshold/decrypt.js';
13
13
  export { deriveJointPublicKey, deriveTranscriptVerificationKey, verifyDKGTranscript, } from './dkg/verification.js';
14
14
  export { decodePedersenShareEnvelope, encodePedersenShareEnvelope, } from './dkg/pedersen-share-codec.js';
15
15
  export { generateFeldmanCommitments, verifyFeldmanShare } from './vss/feldman.js';
@@ -1,3 +1,3 @@
1
1
  /** Threshold arithmetic exports used by the shipped ceremony flow. */
2
- export { combineDecryptionShares, lagrangeCoefficient } from './decrypt.js';
2
+ export { combineDecryptionShares, createDecryptionShare, lagrangeCoefficient, } from './decrypt.js';
3
3
  export * from './types.js';
@@ -1,3 +1,3 @@
1
1
  /** Threshold arithmetic exports used by the shipped ceremony flow. */
2
- export { combineDecryptionShares, lagrangeCoefficient } from './decrypt.js';
2
+ export { combineDecryptionShares, createDecryptionShare, lagrangeCoefficient, } from './decrypt.js';
3
3
  export * from './types.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "threshold-elgamal",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "A browser-native TypeScript ElGamal library for Ristretto255-based research prototypes, shipping additive ElGamal, threshold decryption, protocol helpers, board auditing, transport primitives, and log-driven DKG state machines.",
5
5
  "author": "Piotr Piech <piotr@piech.dev>",
6
6
  "license": "MPL-2.0",