@ocap/mpc-hsm 0.0.0-stage → 1.33.6
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/esm/constants.d.mts +76 -0
- package/esm/constants.mjs +78 -0
- package/esm/dkg.d.mts +279 -0
- package/esm/dkg.mjs +903 -0
- package/esm/index.d.mts +9 -0
- package/esm/index.mjs +10 -0
- package/esm/mta.d.mts +63 -0
- package/esm/mta.mjs +275 -0
- package/esm/ot.d.mts +187 -0
- package/esm/ot.mjs +593 -0
- package/esm/presign.d.mts +242 -0
- package/esm/presign.mjs +951 -0
- package/esm/secp256k1-scalar.d.mts +141 -0
- package/esm/secp256k1-scalar.mjs +465 -0
- package/esm/sign.d.mts +113 -0
- package/esm/sign.mjs +225 -0
- package/esm/tweak.d.mts +100 -0
- package/esm/tweak.mjs +168 -0
- package/lib/constants.cjs +136 -0
- package/lib/constants.d.cts +76 -0
- package/lib/dkg.cjs +910 -0
- package/lib/dkg.d.cts +279 -0
- package/lib/index.cjs +171 -0
- package/lib/index.d.cts +9 -0
- package/lib/mta.cjs +280 -0
- package/lib/mta.d.cts +63 -0
- package/lib/ot.cjs +609 -0
- package/lib/ot.d.cts +187 -0
- package/lib/presign.cjs +954 -0
- package/lib/presign.d.cts +242 -0
- package/lib/secp256k1-scalar.cjs +518 -0
- package/lib/secp256k1-scalar.d.cts +141 -0
- package/lib/sign.cjs +233 -0
- package/lib/sign.d.cts +113 -0
- package/lib/tweak.cjs +178 -0
- package/lib/tweak.d.cts +100 -0
- package/package.json +75 -4
- package/README.md +0 -3
package/lib/dkg.d.cts
ADDED
|
@@ -0,0 +1,279 @@
|
|
|
1
|
+
import { MPC_PROTOCOL_VERSION, MpcRootLifecycleState } from "./constants.cjs";
|
|
2
|
+
import { RandomBytesFn, SchnorrPokProof } from "./secp256k1-scalar.cjs";
|
|
3
|
+
|
|
4
|
+
//#region src/dkg.d.ts
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* 4-Step Commit-Reveal Joint-Feldman DKG Core (`design.md` §4.3):
|
|
8
|
+
* - Commits OCAP consensus anchor + `escapeColdWallet` immutably into `ctx_dkg` & `H_dkg`.
|
|
9
|
+
* - Authenticates Step-1 `(commitment32, ephemeralX25519Pub32)` under roster identity keys BEFORE
|
|
10
|
+
* Step-2 Shamir share encryption.
|
|
11
|
+
* - Persistent, fail-closed, exclusive-file-locked `AppendOnlyDkgEchoLock` (`dkg-echo-lock.json`)
|
|
12
|
+
* written BEFORE emitting `\sigma^{echo}_j` and **NEVER cleared on ceremony abort**.
|
|
13
|
+
* - Enforces non-zero polynomial degree & non-identity points (`P_root != O`, `F_{t-1} != O`,
|
|
14
|
+
* `C^{cold}_{t_c-1} != O`, `X_m != O`, `Y_k != O`).
|
|
15
|
+
* - Pluggable `ColdBackupPlugin` hook for PR 2 Direct Bit-ElGamal VES (`verifyRecoveryPackage`).
|
|
16
|
+
* - Strictly single-node Step-4 promotion (`promoteNodeRecordAfterSelfTests`) verifying all
|
|
17
|
+
* `C(n_parties, t)` subset signatures and `ColdBackupPlugin` without ever concentrating multiple
|
|
18
|
+
* party shares in one process.
|
|
19
|
+
*/
|
|
20
|
+
interface OcapConsensusAnchor {
|
|
21
|
+
readonly ocapChainId: string;
|
|
22
|
+
readonly genesisHash: Uint8Array | string;
|
|
23
|
+
readonly initialValidatorEpoch: bigint;
|
|
24
|
+
readonly initialClusterConfigHash: Uint8Array | string;
|
|
25
|
+
readonly quorumRule: string;
|
|
26
|
+
}
|
|
27
|
+
interface DkgRosterEntry {
|
|
28
|
+
readonly slot: number;
|
|
29
|
+
readonly nodeDid: string;
|
|
30
|
+
/** Compressed 33-byte secp256k1 identity key authenticating Step-1 ephemeral keys and Step-3 echoes. */
|
|
31
|
+
readonly echoVerifyPublicKeyComp33: Uint8Array;
|
|
32
|
+
}
|
|
33
|
+
interface DkgCeremonyConfig {
|
|
34
|
+
readonly protocolVersion: typeof MPC_PROTOCOL_VERSION;
|
|
35
|
+
readonly t: number;
|
|
36
|
+
readonly nParties: number;
|
|
37
|
+
readonly tCold: number;
|
|
38
|
+
readonly nCold: number;
|
|
39
|
+
readonly clusterId: string;
|
|
40
|
+
readonly rootId: string;
|
|
41
|
+
readonly keyEpoch: bigint;
|
|
42
|
+
readonly ceremonyId: string;
|
|
43
|
+
readonly escapeColdWallet: string;
|
|
44
|
+
readonly ocapAnchor: OcapConsensusAnchor;
|
|
45
|
+
readonly roster: ReadonlyArray<DkgRosterEntry>;
|
|
46
|
+
readonly guardianPublicKeysComp33: ReadonlyArray<Uint8Array>;
|
|
47
|
+
readonly requireColdBackupPlugin?: boolean;
|
|
48
|
+
}
|
|
49
|
+
interface ColdBackupDealerInput {
|
|
50
|
+
readonly ctxDkg32: Uint8Array;
|
|
51
|
+
readonly dealerSlot: number;
|
|
52
|
+
readonly coldCommitmentsComp33: ReadonlyArray<Uint8Array>;
|
|
53
|
+
readonly guardianPublicKeysComp33: ReadonlyArray<Uint8Array>;
|
|
54
|
+
/** Dealer `i`'s cold evaluations `y_{i,k} = g_i(k) mod n` (`k = 1..nCold`). */
|
|
55
|
+
readonly coldEvaluationsByGuardian: ReadonlyArray<{
|
|
56
|
+
readonly guardianIndex: number;
|
|
57
|
+
readonly evaluationScalar: bigint;
|
|
58
|
+
readonly guardianPublicKeyComp33: Uint8Array;
|
|
59
|
+
}>;
|
|
60
|
+
}
|
|
61
|
+
interface ColdBackupPlugin {
|
|
62
|
+
createDealerContribution(input: ColdBackupDealerInput): Uint8Array;
|
|
63
|
+
verifyDealerContribution(input: {
|
|
64
|
+
readonly ctxDkg32: Uint8Array;
|
|
65
|
+
readonly dealerSlot: number;
|
|
66
|
+
readonly coldCommitmentsComp33: ReadonlyArray<Uint8Array>;
|
|
67
|
+
readonly guardianPublicKeysComp33: ReadonlyArray<Uint8Array>;
|
|
68
|
+
readonly payload: Uint8Array;
|
|
69
|
+
}): boolean;
|
|
70
|
+
aggregateRecoveryPackage(input: {
|
|
71
|
+
readonly ctxDkg32: Uint8Array;
|
|
72
|
+
readonly hDkg32: Uint8Array;
|
|
73
|
+
readonly rootPublicKeyComp33: Uint8Array;
|
|
74
|
+
readonly aggColdCommitmentsComp33: ReadonlyArray<Uint8Array>;
|
|
75
|
+
readonly guardianColdPublicSharesComp33: ReadonlyArray<Uint8Array>;
|
|
76
|
+
readonly guardianPublicKeysComp33: ReadonlyArray<Uint8Array>;
|
|
77
|
+
readonly dealerPayloads: ReadonlyArray<{
|
|
78
|
+
readonly dealerSlot: number;
|
|
79
|
+
readonly payload: Uint8Array;
|
|
80
|
+
}>;
|
|
81
|
+
}): {
|
|
82
|
+
readonly recoveryPackageBytes: Uint8Array;
|
|
83
|
+
readonly recoveryPackageHash32: Uint8Array;
|
|
84
|
+
};
|
|
85
|
+
verifyRecoveryPackage(recoveryPackageBytes: Uint8Array, expected?: {
|
|
86
|
+
readonly ctxDkg32: Uint8Array;
|
|
87
|
+
readonly rootPublicKeyComp33: Uint8Array;
|
|
88
|
+
readonly aggColdCommitmentsComp33: ReadonlyArray<Uint8Array>;
|
|
89
|
+
readonly guardianPublicKeysComp33: ReadonlyArray<Uint8Array>;
|
|
90
|
+
}): boolean;
|
|
91
|
+
}
|
|
92
|
+
interface DkgEchoLock {
|
|
93
|
+
/**
|
|
94
|
+
* Atomically binds `ceremonyId -> hDkg32` (and optionally `epochScopeKey -> ceremonyId`).
|
|
95
|
+
* - Idempotent if `ceremonyId` is already bound to the exact same `hDkg32`.
|
|
96
|
+
* - Throws `DKG_ECHO_LOCK_CONFLICT` if `ceremonyId` is bound to a different `hDkg32` or if
|
|
97
|
+
* `epochScopeKey` (`clusterId|rootId|keyEpoch`) was already locked to another `ceremonyId`.
|
|
98
|
+
* - NEVER deletes or clears bindings on ceremony abort!
|
|
99
|
+
*/
|
|
100
|
+
recordAndVerify(ceremonyId: string, hDkg32: Uint8Array, epochScopeKey?: string): void;
|
|
101
|
+
getLockedTranscriptHex(ceremonyId: string): string | undefined;
|
|
102
|
+
}
|
|
103
|
+
declare function assertSafeCeremonyId(ceremonyId: string): void;
|
|
104
|
+
/**
|
|
105
|
+
* Append-only, fail-closed `DkgEchoLock` supporting in-memory and `0600` exclusive-file-locked
|
|
106
|
+
* atomic `temp+fsync+rename` persisted JSON (`dkg-echo-lock.json`, `design.md` §3.2(3)).
|
|
107
|
+
* Serializes `[ceremonyId, hDkgHex]` tuples (immune to prototype-key collisions) and exposes
|
|
108
|
+
* ZERO delete/clear methods.
|
|
109
|
+
*/
|
|
110
|
+
declare class AppendOnlyDkgEchoLock implements DkgEchoLock {
|
|
111
|
+
private readonly entries;
|
|
112
|
+
private readonly epochScopes;
|
|
113
|
+
private readonly filePath?;
|
|
114
|
+
constructor(options?: {
|
|
115
|
+
filePath?: string;
|
|
116
|
+
});
|
|
117
|
+
get size(): number;
|
|
118
|
+
getLockedTranscriptHex(ceremonyId: string): string | undefined;
|
|
119
|
+
private loadAndValidateFromDisk;
|
|
120
|
+
private withExclusiveFileLock;
|
|
121
|
+
recordAndVerify(ceremonyId: string, hDkg32: Uint8Array, epochScopeKey?: string): void;
|
|
122
|
+
private verifyAndCommitInMemory;
|
|
123
|
+
private persistAtomicFsync;
|
|
124
|
+
}
|
|
125
|
+
declare function validateAndComputeDkgContext(config: DkgCeremonyConfig): {
|
|
126
|
+
ctxDkg32: Uint8Array;
|
|
127
|
+
normalizedEscapeColdWallet: string;
|
|
128
|
+
sortedRoster: ReadonlyArray<DkgRosterEntry>;
|
|
129
|
+
};
|
|
130
|
+
declare function computeDkgContextHash32(config: DkgCeremonyConfig): Uint8Array;
|
|
131
|
+
/**
|
|
132
|
+
* Deterministic 32-byte message digest signed by subset `S` during DKG Step-4 self-testing,
|
|
133
|
+
* bound to `(DST_DKG_SELFTEST_V2, ctxDkg32, sortedSubsetBytes(S))`.
|
|
134
|
+
*/
|
|
135
|
+
declare function computeDkgSubsetSelfTestDigest32(ctxDkg32: Uint8Array, subset: ReadonlyArray<number>): Uint8Array;
|
|
136
|
+
interface DkgRound1CommitMessage {
|
|
137
|
+
readonly dealerSlot: number;
|
|
138
|
+
readonly commitment32: Uint8Array;
|
|
139
|
+
readonly ephemeralX25519Pub32: Uint8Array;
|
|
140
|
+
/** Authenticates `(ctxDkg32, u32be(dealerSlot), commitment32, ephemeralX25519Pub32)` under roster identity key. */
|
|
141
|
+
readonly step1AuthPok: SchnorrPokProof;
|
|
142
|
+
}
|
|
143
|
+
interface DkgRound2RevealPayload {
|
|
144
|
+
readonly dealerSlot: number;
|
|
145
|
+
readonly comSalt32: Uint8Array;
|
|
146
|
+
readonly ephemeralX25519Pub32: Uint8Array;
|
|
147
|
+
readonly onlineCommitmentsComp33: ReadonlyArray<Uint8Array>;
|
|
148
|
+
readonly coldCommitmentsComp33: ReadonlyArray<Uint8Array>;
|
|
149
|
+
readonly onlineCoeffPoks: ReadonlyArray<SchnorrPokProof>;
|
|
150
|
+
readonly coldExtraCoeffPoks: ReadonlyArray<SchnorrPokProof>;
|
|
151
|
+
readonly coldVesPayload: Uint8Array;
|
|
152
|
+
}
|
|
153
|
+
interface DkgEncryptedShareEnvelope {
|
|
154
|
+
readonly dealerSlot: number;
|
|
155
|
+
readonly recipientSlot: number;
|
|
156
|
+
readonly iv12: Uint8Array;
|
|
157
|
+
readonly ciphertext32: Uint8Array;
|
|
158
|
+
readonly authTag16: Uint8Array;
|
|
159
|
+
}
|
|
160
|
+
interface DkgRound3EchoMessage {
|
|
161
|
+
readonly slot: number;
|
|
162
|
+
readonly hDkg32: Uint8Array;
|
|
163
|
+
readonly echoSignaturePok: SchnorrPokProof;
|
|
164
|
+
}
|
|
165
|
+
interface DkgSubsetSelfTestSignature {
|
|
166
|
+
readonly subset: ReadonlyArray<number>;
|
|
167
|
+
readonly rHex: string;
|
|
168
|
+
readonly sHex: string;
|
|
169
|
+
readonly yParity: 0 | 1;
|
|
170
|
+
}
|
|
171
|
+
interface MpcNodeProvisionedKeyRecord {
|
|
172
|
+
readonly slot: number;
|
|
173
|
+
readonly rootId: string;
|
|
174
|
+
readonly keyEpoch: bigint;
|
|
175
|
+
readonly t: number;
|
|
176
|
+
readonly nParties: number;
|
|
177
|
+
readonly tCold: number;
|
|
178
|
+
readonly nCold: number;
|
|
179
|
+
readonly lifecycleState: MpcRootLifecycleState;
|
|
180
|
+
readonly ctxDkg32: Uint8Array;
|
|
181
|
+
readonly hDkg32: Uint8Array;
|
|
182
|
+
readonly escapeColdWallet: string;
|
|
183
|
+
readonly ocapAnchor: OcapConsensusAnchor;
|
|
184
|
+
readonly rootPublicKeyComp33: Uint8Array;
|
|
185
|
+
readonly rootEthAddress: string;
|
|
186
|
+
readonly onlineFeldmanCommitmentsComp33: ReadonlyArray<Uint8Array>;
|
|
187
|
+
readonly coldFeldmanCommitmentsComp33: ReadonlyArray<Uint8Array>;
|
|
188
|
+
readonly onlinePublicSharesComp33BySlot: ReadonlyMap<number, Uint8Array>;
|
|
189
|
+
readonly guardianColdPublicSharesComp33: ReadonlyArray<Uint8Array>;
|
|
190
|
+
readonly recoveryPackageBytes?: Uint8Array;
|
|
191
|
+
readonly recoveryPackageHash32?: Uint8Array;
|
|
192
|
+
/** Node's own Shamir secret share `x_slot` (`x_root` is NEVER materialized!). */
|
|
193
|
+
readonly secretShareBytes32: Uint8Array;
|
|
194
|
+
}
|
|
195
|
+
declare class DkgParticipantSession {
|
|
196
|
+
readonly slot: number;
|
|
197
|
+
readonly config: DkgCeremonyConfig;
|
|
198
|
+
readonly ctxDkg32: Uint8Array;
|
|
199
|
+
readonly normalizedEscapeColdWallet: string;
|
|
200
|
+
private readonly sortedRoster;
|
|
201
|
+
private readonly echoSigningKeyBytes32;
|
|
202
|
+
private readonly echoLock;
|
|
203
|
+
private readonly coldBackupPlugin?;
|
|
204
|
+
private readonly requireColdBackupPlugin;
|
|
205
|
+
private readonly rng;
|
|
206
|
+
private phase;
|
|
207
|
+
private readonly onlinePolyBytes32;
|
|
208
|
+
private readonly coldPolyBytes32;
|
|
209
|
+
private readonly x25519Secret32;
|
|
210
|
+
private readonly x25519Pub32;
|
|
211
|
+
private ownReveal;
|
|
212
|
+
private step1CommitsBySlot;
|
|
213
|
+
private verifiedRevealsBySlot;
|
|
214
|
+
private hDkg32;
|
|
215
|
+
private accumulatedOwnShareBytes32;
|
|
216
|
+
constructor(params: {
|
|
217
|
+
slot: number;
|
|
218
|
+
config: DkgCeremonyConfig;
|
|
219
|
+
echoSigningSecretBytes32: Uint8Array;
|
|
220
|
+
echoLock: DkgEchoLock;
|
|
221
|
+
coldBackupPlugin?: ColdBackupPlugin;
|
|
222
|
+
requireColdBackupPlugin?: boolean;
|
|
223
|
+
rng?: RandomBytesFn;
|
|
224
|
+
});
|
|
225
|
+
abort(): void;
|
|
226
|
+
private wipeDealerSecrets;
|
|
227
|
+
/**
|
|
228
|
+
* Step 1: Computes Feldman commitments `{A_{i,l}}`, `{C_{i,l}}`, Schnorr PoK `\pi^{pok}_i`,
|
|
229
|
+
* optional `VES_i`, and broadcasts `Com_i` + `epk^{x25519}_i` authenticated under the node's
|
|
230
|
+
* roster identity key (`ARC-MPC-DKG-STEP1-AUTH-V1`).
|
|
231
|
+
*/
|
|
232
|
+
step1CreateCommitment(): DkgRound1CommitMessage;
|
|
233
|
+
/**
|
|
234
|
+
* Step 2: Verifies every peer's Step-1 roster authentication signature over
|
|
235
|
+
* `(ctxDkg32, u32be(j), commitment32, ephemeralX25519Pub32)` BEFORE encrypting any Shamir share,
|
|
236
|
+
* then reveals `Reveal_i` and seals `f_i(j) mod n` via `X25519 + HKDF-SHA256 + AES-256-GCM`.
|
|
237
|
+
*/
|
|
238
|
+
step2CreateRevealAndShares(allCommitments: ReadonlyArray<DkgRound1CommitMessage>): {
|
|
239
|
+
reveal: DkgRound2RevealPayload;
|
|
240
|
+
encryptedShares: ReadonlyArray<DkgEncryptedShareEnvelope>;
|
|
241
|
+
};
|
|
242
|
+
/**
|
|
243
|
+
* Step 3a: Verifies all `Com_m`, `\pi^{pok}_m`, `A_{m,0} == C_{m,0} != O`, non-zero degree
|
|
244
|
+
* commitments, `VES_m`, and Feldman share equations; appends `ceremonyId -> H_dkg` to the
|
|
245
|
+
* append-only `DkgEchoLock` **before** signing `\sigma^{echo}_j`!
|
|
246
|
+
*/
|
|
247
|
+
step3VerifyAndCreateLockedEcho(params: {
|
|
248
|
+
allReveals: ReadonlyArray<DkgRound2RevealPayload>;
|
|
249
|
+
encryptedSharesForMe: ReadonlyArray<DkgEncryptedShareEnvelope>;
|
|
250
|
+
}): DkgRound3EchoMessage;
|
|
251
|
+
/**
|
|
252
|
+
* Step 3b: Requires unanimous authenticated echoes over `H_dkg`, checks non-zero degree and
|
|
253
|
+
* non-identity invariants (`P_root != O`, `F_{t-1} != O`, `C^{cold}_{t_c-1} != O`, `X_m != O`,
|
|
254
|
+
* `Y_k != O`), validates aggregated `recoveryPackageBytes` (`<= MAX_RECOVERY_PACKAGE_BYTES`,
|
|
255
|
+
* `sha256` match, `verifyRecoveryPackage === true`) BEFORE releasing `shareCopy`, and outputs
|
|
256
|
+
* the node's key record in `INITIALIZING` state ready for Step-4 subset self-tests.
|
|
257
|
+
*/
|
|
258
|
+
step3FinalizeFromEchoes(allEchoes: ReadonlyArray<DkgRound3EchoMessage>): MpcNodeProvisionedKeyRecord;
|
|
259
|
+
}
|
|
260
|
+
/**
|
|
261
|
+
* Strictly single-node Step-4 promotion (`design.md` §4.3):
|
|
262
|
+
* - Takes ONLY this node's own `INITIALIZING` record (`ownRecord`) — ZERO peer secret shares ever
|
|
263
|
+
* enter this function!
|
|
264
|
+
* - Validates `ownRecord` invariants (`ctxDkg32`, `rootPublicKeyComp33`, `x_slot * G == X_slot`,
|
|
265
|
+
* and fail-closed `ColdBackupPlugin` / `sha256(recoveryPackageBytes)` verification).
|
|
266
|
+
* - Verifies that `subsetSignatures` covers EVERY `C(nParties, t)` canonical subset `S` and
|
|
267
|
+
* cryptographically `ecrecover`s each signature against `ownRecord.rootPublicKeyComp33` over
|
|
268
|
+
* `computeDkgSubsetSelfTestDigest32(ownRecord.ctxDkg32, S)`.
|
|
269
|
+
* - Zeroizes `ownRecord.secretShareBytes32` before rethrowing on ANY failure!
|
|
270
|
+
*/
|
|
271
|
+
declare function promoteNodeRecordAfterSelfTests(params: {
|
|
272
|
+
ownRecord: MpcNodeProvisionedKeyRecord;
|
|
273
|
+
config: DkgCeremonyConfig;
|
|
274
|
+
subsetSignatures: ReadonlyArray<DkgSubsetSelfTestSignature>;
|
|
275
|
+
coldBackupPlugin?: ColdBackupPlugin;
|
|
276
|
+
requireColdBackupPlugin?: boolean;
|
|
277
|
+
}): MpcNodeProvisionedKeyRecord;
|
|
278
|
+
//#endregion
|
|
279
|
+
export { AppendOnlyDkgEchoLock, ColdBackupDealerInput, ColdBackupPlugin, DkgCeremonyConfig, DkgEchoLock, DkgEncryptedShareEnvelope, DkgParticipantSession, DkgRosterEntry, DkgRound1CommitMessage, DkgRound2RevealPayload, DkgRound3EchoMessage, DkgSubsetSelfTestSignature, MpcNodeProvisionedKeyRecord, OcapConsensusAnchor, assertSafeCeremonyId, computeDkgContextHash32, computeDkgSubsetSelfTestDigest32, promoteNodeRecordAfterSelfTests, validateAndComputeDkgContext };
|
package/lib/index.cjs
ADDED
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
const require_constants = require('./constants.cjs');
|
|
2
|
+
const require_secp256k1_scalar = require('./secp256k1-scalar.cjs');
|
|
3
|
+
const require_tweak = require('./tweak.cjs');
|
|
4
|
+
const require_dkg = require('./dkg.cjs');
|
|
5
|
+
const require_ot = require('./ot.cjs');
|
|
6
|
+
const require_mta = require('./mta.cjs');
|
|
7
|
+
const require_presign = require('./presign.cjs');
|
|
8
|
+
const require_sign = require('./sign.cjs');
|
|
9
|
+
let _noble_curves_secp256k1_js = require("@noble/curves/secp256k1.js");
|
|
10
|
+
let _noble_hashes_utils_js = require("@noble/hashes/utils.js");
|
|
11
|
+
|
|
12
|
+
exports.AppendOnlyDkgEchoLock = require_dkg.AppendOnlyDkgEchoLock;
|
|
13
|
+
exports.BSGS_M = require_constants.BSGS_M;
|
|
14
|
+
exports.DEFAULT_COLD_GUARDIANS = require_constants.DEFAULT_COLD_GUARDIANS;
|
|
15
|
+
exports.DEFAULT_COLD_THRESHOLD = require_constants.DEFAULT_COLD_THRESHOLD;
|
|
16
|
+
exports.DEFAULT_ONLINE_PARTIES = require_constants.DEFAULT_ONLINE_PARTIES;
|
|
17
|
+
exports.DEFAULT_ONLINE_THRESHOLD = require_constants.DEFAULT_ONLINE_THRESHOLD;
|
|
18
|
+
exports.DST_BASEOT_KEY_V1 = require_constants.DST_BASEOT_KEY_V1;
|
|
19
|
+
exports.DST_BASEOT_S_POK_V1 = require_constants.DST_BASEOT_S_POK_V1;
|
|
20
|
+
exports.DST_CHILD_TWEAK_V1 = require_constants.DST_CHILD_TWEAK_V1;
|
|
21
|
+
exports.DST_COT_ROW_V1 = require_constants.DST_COT_ROW_V1;
|
|
22
|
+
exports.DST_DKG_COM_V2 = require_constants.DST_DKG_COM_V2;
|
|
23
|
+
exports.DST_DKG_CTX_V2 = require_constants.DST_DKG_CTX_V2;
|
|
24
|
+
exports.DST_DKG_ECHO_V2 = require_constants.DST_DKG_ECHO_V2;
|
|
25
|
+
exports.DST_DKG_POK_V2 = require_constants.DST_DKG_POK_V2;
|
|
26
|
+
exports.DST_DKG_SELFTEST_V2 = require_constants.DST_DKG_SELFTEST_V2;
|
|
27
|
+
exports.DST_DKG_SHARE_AAD_V2 = require_constants.DST_DKG_SHARE_AAD_V2;
|
|
28
|
+
exports.DST_DKG_STEP1_AUTH_V1 = require_constants.DST_DKG_STEP1_AUTH_V1;
|
|
29
|
+
exports.DST_DKG_TRANSCRIPT_V2 = require_constants.DST_DKG_TRANSCRIPT_V2;
|
|
30
|
+
exports.DST_DKG_X25519_HKDF_V2 = require_constants.DST_DKG_X25519_HKDF_V2;
|
|
31
|
+
exports.DST_KOS15_CHI_V1 = require_constants.DST_KOS15_CHI_V1;
|
|
32
|
+
exports.DST_LHL_GADGET_V1 = require_constants.DST_LHL_GADGET_V1;
|
|
33
|
+
exports.DST_MTA_ETA_V1 = require_constants.DST_MTA_ETA_V1;
|
|
34
|
+
exports.DST_OT_CTR_IV_V1 = require_constants.DST_OT_CTR_IV_V1;
|
|
35
|
+
exports.DST_PRESIG_COM_V1 = require_constants.DST_PRESIG_COM_V1;
|
|
36
|
+
exports.DST_PRESIG_ID_V1 = require_constants.DST_PRESIG_ID_V1;
|
|
37
|
+
exports.DST_PRESIG_PI_LIN_K_V1 = require_constants.DST_PRESIG_PI_LIN_K_V1;
|
|
38
|
+
exports.DST_PRESIG_PI_POK_Z_V1 = require_constants.DST_PRESIG_PI_POK_Z_V1;
|
|
39
|
+
exports.DST_PRESIG_POK_B_V1 = require_constants.DST_PRESIG_POK_B_V1;
|
|
40
|
+
exports.DST_PRESIG_POK_CK_V1 = require_constants.DST_PRESIG_POK_CK_V1;
|
|
41
|
+
exports.DST_PRESIG_POK_GAMMA_V1 = require_constants.DST_PRESIG_POK_GAMMA_V1;
|
|
42
|
+
exports.DST_PRESIG_RERAND_V1 = require_constants.DST_PRESIG_RERAND_V1;
|
|
43
|
+
exports.DST_PRESIG_ZETA_HKDF_V1 = require_constants.DST_PRESIG_ZETA_HKDF_V1;
|
|
44
|
+
exports.DST_PRESIG_ZETA_V1 = require_constants.DST_PRESIG_ZETA_V1;
|
|
45
|
+
exports.DST_RULE_TWEAK_V1 = require_constants.DST_RULE_TWEAK_V1;
|
|
46
|
+
exports.DkgParticipantSession = require_dkg.DkgParticipantSession;
|
|
47
|
+
exports.ESCAPE_DRILL_MAX_AGE_SECONDS = require_constants.ESCAPE_DRILL_MAX_AGE_SECONDS;
|
|
48
|
+
exports.FORBIDDEN_ONLINE_ROLE_ESCAPE_CANARY = require_constants.FORBIDDEN_ONLINE_ROLE_ESCAPE_CANARY;
|
|
49
|
+
exports.Fn = require_secp256k1_scalar.Fn;
|
|
50
|
+
exports.H_scalar = require_secp256k1_scalar.H_scalar;
|
|
51
|
+
exports.MAX_MPC_CLUSTER_NODES = require_constants.MAX_MPC_CLUSTER_NODES;
|
|
52
|
+
exports.MAX_MPC_PEER_MESSAGE_BYTES = require_constants.MAX_MPC_PEER_MESSAGE_BYTES;
|
|
53
|
+
exports.MAX_MPC_SIGN_REQUEST_BYTES = require_constants.MAX_MPC_SIGN_REQUEST_BYTES;
|
|
54
|
+
exports.MAX_ON_DEMAND_SILENCE_SECONDS = require_constants.MAX_ON_DEMAND_SILENCE_SECONDS;
|
|
55
|
+
exports.MAX_RECOVERY_PACKAGE_BYTES = require_constants.MAX_RECOVERY_PACKAGE_BYTES;
|
|
56
|
+
exports.MAX_RULE_DAG_NODES = require_constants.MAX_RULE_DAG_NODES;
|
|
57
|
+
exports.MAX_RULE_YAML_BYTES = require_constants.MAX_RULE_YAML_BYTES;
|
|
58
|
+
exports.MPC_PROTOCOL_VERSION = require_constants.MPC_PROTOCOL_VERSION;
|
|
59
|
+
exports.MpcProtocolError = require_constants.MpcProtocolError;
|
|
60
|
+
exports.OT_BASE_PARTIAL_BITS = require_constants.OT_BASE_PARTIAL_BITS;
|
|
61
|
+
exports.OT_COLUMN_BYTES = require_constants.OT_COLUMN_BYTES;
|
|
62
|
+
exports.OT_EXTENSION_ROWS = require_constants.OT_EXTENSION_ROWS;
|
|
63
|
+
exports.OT_GADGET_BITS = require_constants.OT_GADGET_BITS;
|
|
64
|
+
exports.OT_KAPPA_BITS = require_constants.OT_KAPPA_BITS;
|
|
65
|
+
exports.OT_KAPPA_BYTES = require_constants.OT_KAPPA_BYTES;
|
|
66
|
+
exports.OT_LHL_EXTRA_BITS = require_constants.OT_LHL_EXTRA_BITS;
|
|
67
|
+
exports.OT_SACRIFICE_BITS = require_constants.OT_SACRIFICE_BITS;
|
|
68
|
+
exports.PEDERSEN_H = require_secp256k1_scalar.PEDERSEN_H;
|
|
69
|
+
exports.PEDERSEN_H_COMP33 = require_secp256k1_scalar.PEDERSEN_H_COMP33;
|
|
70
|
+
exports.PEDERSEN_H_COMPRESSED_HEX = require_constants.PEDERSEN_H_COMPRESSED_HEX;
|
|
71
|
+
exports.PEDERSEN_H_DST = require_constants.PEDERSEN_H_DST;
|
|
72
|
+
exports.PEDERSEN_H_MESSAGE = require_constants.PEDERSEN_H_MESSAGE;
|
|
73
|
+
exports.PresignPartySession = require_presign.PresignPartySession;
|
|
74
|
+
exports.SECP256K1_G = require_secp256k1_scalar.SECP256K1_G;
|
|
75
|
+
exports.SECP256K1_HALF_N = require_constants.SECP256K1_HALF_N;
|
|
76
|
+
exports.SECP256K1_N = require_constants.SECP256K1_N;
|
|
77
|
+
exports.SECP256K1_P = require_constants.SECP256K1_P;
|
|
78
|
+
exports.SECP256K1_ZERO = require_secp256k1_scalar.SECP256K1_ZERO;
|
|
79
|
+
exports.VolatilePresignaturePool = require_presign.VolatilePresignaturePool;
|
|
80
|
+
exports.addModN = require_secp256k1_scalar.addModN;
|
|
81
|
+
exports.aggregateOnlineSignature = require_sign.aggregateOnlineSignature;
|
|
82
|
+
exports.applyAdditiveTweak = require_tweak.applyAdditiveTweak;
|
|
83
|
+
exports.assertAllowedOnlineRole = require_tweak.assertAllowedOnlineRole;
|
|
84
|
+
exports.assertSafeCeremonyId = require_dkg.assertSafeCeremonyId;
|
|
85
|
+
exports.assertScalarInField = require_secp256k1_scalar.assertScalarInField;
|
|
86
|
+
exports.assertScalarNonZero = require_secp256k1_scalar.assertScalarNonZero;
|
|
87
|
+
exports.assertValidX25519PublicKey = require_secp256k1_scalar.assertValidX25519PublicKey;
|
|
88
|
+
exports.baseOtReceiverStep2 = require_ot.baseOtReceiverStep2;
|
|
89
|
+
exports.baseOtSenderStep1 = require_ot.baseOtSenderStep1;
|
|
90
|
+
exports.baseOtSenderStep3 = require_ot.baseOtSenderStep3;
|
|
91
|
+
exports.bytes16ToU128LE = require_ot.bytes16ToU128LE;
|
|
92
|
+
exports.bytes32ToScalarNonZero = require_secp256k1_scalar.bytes32ToScalarNonZero;
|
|
93
|
+
exports.bytes32ToScalarStrict = require_secp256k1_scalar.bytes32ToScalarStrict;
|
|
94
|
+
exports.bytesToBigIntBE = require_secp256k1_scalar.bytesToBigIntBE;
|
|
95
|
+
exports.bytesToHex = _noble_hashes_utils_js.bytesToHex;
|
|
96
|
+
exports.computeDkgContextHash32 = require_dkg.computeDkgContextHash32;
|
|
97
|
+
exports.computeDkgSubsetSelfTestDigest32 = require_dkg.computeDkgSubsetSelfTestDigest32;
|
|
98
|
+
exports.computeRerandomizedNoncePoint = require_sign.computeRerandomizedNoncePoint;
|
|
99
|
+
exports.computeSubsetBoundPresigId = require_presign.computeSubsetBoundPresigId;
|
|
100
|
+
exports.computeX25519SharedSecret = require_secp256k1_scalar.computeX25519SharedSecret;
|
|
101
|
+
exports.concatBytes = require_secp256k1_scalar.concatBytes;
|
|
102
|
+
exports.constantTimeEqual = require_secp256k1_scalar.constantTimeEqual;
|
|
103
|
+
exports.createLinearPedersenDleqProof = require_secp256k1_scalar.createLinearPedersenDleqProof;
|
|
104
|
+
exports.createOnlineSignShare = require_sign.createOnlineSignShare;
|
|
105
|
+
exports.createPedersenPok = require_secp256k1_scalar.createPedersenPok;
|
|
106
|
+
exports.createSchnorrPokInBase = require_secp256k1_scalar.createSchnorrPokInBase;
|
|
107
|
+
exports.decodePointCompressed = require_secp256k1_scalar.decodePointCompressed;
|
|
108
|
+
exports.decomposeScalarWithLhlGadget = require_mta.decomposeScalarWithLhlGadget;
|
|
109
|
+
exports.defaultRandomBytes = require_secp256k1_scalar.defaultRandomBytes;
|
|
110
|
+
exports.deriveDualPadFromCotRow = require_mta.deriveDualPadFromCotRow;
|
|
111
|
+
exports.deriveGrothShoupRerandScalar = require_sign.deriveGrothShoupRerandScalar;
|
|
112
|
+
exports.deriveRoleBoundChild = require_tweak.deriveRoleBoundChild;
|
|
113
|
+
exports.deriveRuleBoundChild = require_tweak.deriveRuleBoundChild;
|
|
114
|
+
exports.deriveUntweakedChild = require_tweak.deriveUntweakedChild;
|
|
115
|
+
exports.ecrecoverEthAddress = require_tweak.ecrecoverEthAddress;
|
|
116
|
+
exports.eklundhTranspose128x1024 = require_ot.eklundhTranspose128x1024;
|
|
117
|
+
exports.encodePointCompressed = require_secp256k1_scalar.encodePointCompressed;
|
|
118
|
+
exports.enumerateCombinations = require_secp256k1_scalar.enumerateCombinations;
|
|
119
|
+
exports.evaluateConsumedPresigShareWithRerand = require_sign.evaluateConsumedPresigShareWithRerand;
|
|
120
|
+
exports.evaluateFeldmanCommitments = require_secp256k1_scalar.evaluateFeldmanCommitments;
|
|
121
|
+
exports.evaluatePolynomialModN = require_secp256k1_scalar.evaluatePolynomialModN;
|
|
122
|
+
exports.expandKos15ChiWeights = require_ot.expandKos15ChiWeights;
|
|
123
|
+
exports.gadgetMtaReceiverVerifyAndFinish = require_mta.gadgetMtaReceiverVerifyAndFinish;
|
|
124
|
+
exports.gadgetMtaSenderCreateMessage = require_mta.gadgetMtaSenderCreateMessage;
|
|
125
|
+
exports.getGadgetVector768 = require_mta.getGadgetVector768;
|
|
126
|
+
exports.gf128Mul = require_ot.gf128Mul;
|
|
127
|
+
exports.hashTranscriptSha256 = require_secp256k1_scalar.hashTranscriptSha256;
|
|
128
|
+
exports.hexToBytes = _noble_hashes_utils_js.hexToBytes;
|
|
129
|
+
exports.invModN = require_secp256k1_scalar.invModN;
|
|
130
|
+
exports.lagrangeCoefficientAtZero = require_secp256k1_scalar.lagrangeCoefficientAtZero;
|
|
131
|
+
exports.lengthPrefixedEncode = require_secp256k1_scalar.lengthPrefixedEncode;
|
|
132
|
+
exports.modN = require_secp256k1_scalar.modN;
|
|
133
|
+
exports.mulBaseG = require_secp256k1_scalar.mulBaseG;
|
|
134
|
+
exports.mulModN = require_secp256k1_scalar.mulModN;
|
|
135
|
+
exports.mulPoint = require_secp256k1_scalar.mulPoint;
|
|
136
|
+
exports.negModN = require_secp256k1_scalar.negModN;
|
|
137
|
+
exports.normalizeHexBytes = require_secp256k1_scalar.normalizeHexBytes;
|
|
138
|
+
exports.normalizeSortedSubset = require_secp256k1_scalar.normalizeSortedSubset;
|
|
139
|
+
exports.otExtendReceiverStep1 = require_ot.otExtendReceiverStep1;
|
|
140
|
+
exports.otExtendReceiverStep3 = require_ot.otExtendReceiverStep3;
|
|
141
|
+
exports.otExtendSenderStep2 = require_ot.otExtendSenderStep2;
|
|
142
|
+
exports.otExtendSenderStep4VerifyBeforePads = require_ot.otExtendSenderStep4VerifyBeforePads;
|
|
143
|
+
exports.parseStrictEthAddress = require_tweak.parseStrictEthAddress;
|
|
144
|
+
exports.pedersenCommit = require_secp256k1_scalar.pedersenCommit;
|
|
145
|
+
exports.pointToEthAddress = require_tweak.pointToEthAddress;
|
|
146
|
+
exports.promoteNodeRecordAfterSelfTests = require_dkg.promoteNodeRecordAfterSelfTests;
|
|
147
|
+
exports.recombineGadgetBitsModN = require_mta.recombineGadgetBitsModN;
|
|
148
|
+
exports.sampleScalarNonZero = require_secp256k1_scalar.sampleScalarNonZero;
|
|
149
|
+
exports.scalarToBytes32 = require_secp256k1_scalar.scalarToBytes32;
|
|
150
|
+
exports.secp256k1 = _noble_curves_secp256k1_js.secp256k1;
|
|
151
|
+
exports.sortedSubsetBytes = require_secp256k1_scalar.sortedSubsetBytes;
|
|
152
|
+
exports.subModN = require_secp256k1_scalar.subModN;
|
|
153
|
+
exports.subsetsEqual = require_secp256k1_scalar.subsetsEqual;
|
|
154
|
+
exports.toEip55ChecksumAddress = require_tweak.toEip55ChecksumAddress;
|
|
155
|
+
exports.u128ToBytes16LE = require_ot.u128ToBytes16LE;
|
|
156
|
+
exports.u16be = require_secp256k1_scalar.u16be;
|
|
157
|
+
exports.u32be = require_secp256k1_scalar.u32be;
|
|
158
|
+
exports.u64be = require_secp256k1_scalar.u64be;
|
|
159
|
+
exports.u8 = require_secp256k1_scalar.u8;
|
|
160
|
+
exports.utf8Bytes = require_secp256k1_scalar.utf8Bytes;
|
|
161
|
+
exports.validateAndComputeDkgContext = require_dkg.validateAndComputeDkgContext;
|
|
162
|
+
exports.verifyAndDeriveRequestChildKey = require_sign.verifyAndDeriveRequestChildKey;
|
|
163
|
+
exports.verifyLinearPedersenDleqProof = require_secp256k1_scalar.verifyLinearPedersenDleqProof;
|
|
164
|
+
exports.verifyOnlineSignShare = require_sign.verifyOnlineSignShare;
|
|
165
|
+
exports.verifyPedersenPok = require_secp256k1_scalar.verifyPedersenPok;
|
|
166
|
+
exports.verifySchnorrPokInBase = require_secp256k1_scalar.verifySchnorrPokInBase;
|
|
167
|
+
exports.wipeBaseOtReceiverState = require_ot.wipeBaseOtReceiverState;
|
|
168
|
+
exports.wipeBaseOtSenderState = require_ot.wipeBaseOtSenderState;
|
|
169
|
+
exports.wipeVerifiedCotReceiverRows = require_ot.wipeVerifiedCotReceiverRows;
|
|
170
|
+
exports.wipeVerifiedCotSenderRows = require_ot.wipeVerifiedCotSenderRows;
|
|
171
|
+
exports.zeroizeBytes = require_secp256k1_scalar.zeroizeBytes;
|
package/lib/index.d.cts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BSGS_M, DEFAULT_COLD_GUARDIANS, DEFAULT_COLD_THRESHOLD, DEFAULT_ONLINE_PARTIES, DEFAULT_ONLINE_THRESHOLD, DST_BASEOT_KEY_V1, DST_BASEOT_S_POK_V1, DST_CHILD_TWEAK_V1, DST_COT_ROW_V1, DST_DKG_COM_V2, DST_DKG_CTX_V2, DST_DKG_ECHO_V2, DST_DKG_POK_V2, DST_DKG_SELFTEST_V2, DST_DKG_SHARE_AAD_V2, DST_DKG_STEP1_AUTH_V1, DST_DKG_TRANSCRIPT_V2, DST_DKG_X25519_HKDF_V2, DST_KOS15_CHI_V1, DST_LHL_GADGET_V1, DST_MTA_ETA_V1, DST_OT_CTR_IV_V1, DST_PRESIG_COM_V1, DST_PRESIG_ID_V1, DST_PRESIG_PI_LIN_K_V1, DST_PRESIG_PI_POK_Z_V1, DST_PRESIG_POK_B_V1, DST_PRESIG_POK_CK_V1, DST_PRESIG_POK_GAMMA_V1, DST_PRESIG_RERAND_V1, DST_PRESIG_ZETA_HKDF_V1, DST_PRESIG_ZETA_V1, DST_RULE_TWEAK_V1, ESCAPE_DRILL_MAX_AGE_SECONDS, FORBIDDEN_ONLINE_ROLE_ESCAPE_CANARY, MAX_MPC_CLUSTER_NODES, MAX_MPC_PEER_MESSAGE_BYTES, MAX_MPC_SIGN_REQUEST_BYTES, MAX_ON_DEMAND_SILENCE_SECONDS, MAX_RECOVERY_PACKAGE_BYTES, MAX_RULE_DAG_NODES, MAX_RULE_YAML_BYTES, MPC_PROTOCOL_VERSION, MpcErrorCode, MpcProtocolError, MpcRootLifecycleState, OT_BASE_PARTIAL_BITS, OT_COLUMN_BYTES, OT_EXTENSION_ROWS, OT_GADGET_BITS, OT_KAPPA_BITS, OT_KAPPA_BYTES, OT_LHL_EXTRA_BITS, OT_SACRIFICE_BITS, PEDERSEN_H_COMPRESSED_HEX, PEDERSEN_H_DST, PEDERSEN_H_MESSAGE, SECP256K1_HALF_N, SECP256K1_N, SECP256K1_P } from "./constants.cjs";
|
|
2
|
+
import { Fn, H_scalar, LinearPedersenDleqProof, PEDERSEN_H, PEDERSEN_H_COMP33, PedersenPokProof, RandomBytesFn, SECP256K1_G, SECP256K1_ZERO, SchnorrPokProof, Secp256k1Point, addModN, assertScalarInField, assertScalarNonZero, assertValidX25519PublicKey, bytes32ToScalarNonZero, bytes32ToScalarStrict, bytesToBigIntBE, bytesToHex, computeX25519SharedSecret, concatBytes, constantTimeEqual, createLinearPedersenDleqProof, createPedersenPok, createSchnorrPokInBase, decodePointCompressed, defaultRandomBytes, encodePointCompressed, enumerateCombinations, evaluateFeldmanCommitments, evaluatePolynomialModN, hashTranscriptSha256, hexToBytes, invModN, lagrangeCoefficientAtZero, lengthPrefixedEncode, modN, mulBaseG, mulModN, mulPoint, negModN, normalizeHexBytes, normalizeSortedSubset, pedersenCommit, sampleScalarNonZero, scalarToBytes32, secp256k1, sortedSubsetBytes, subModN, subsetsEqual, u16be, u32be, u64be, u8, utf8Bytes, verifyLinearPedersenDleqProof, verifyPedersenPok, verifySchnorrPokInBase, zeroizeBytes } from "./secp256k1-scalar.cjs";
|
|
3
|
+
import { AppendOnlyDkgEchoLock, ColdBackupDealerInput, ColdBackupPlugin, DkgCeremonyConfig, DkgEchoLock, DkgEncryptedShareEnvelope, DkgParticipantSession, DkgRosterEntry, DkgRound1CommitMessage, DkgRound2RevealPayload, DkgRound3EchoMessage, DkgSubsetSelfTestSignature, MpcNodeProvisionedKeyRecord, OcapConsensusAnchor, assertSafeCeremonyId, computeDkgContextHash32, computeDkgSubsetSelfTestDigest32, promoteNodeRecordAfterSelfTests, validateAndComputeDkgContext } from "./dkg.cjs";
|
|
4
|
+
import { DerivedChildKey, MpcChildDerivationSpec, MpcTweakMode, applyAdditiveTweak, assertAllowedOnlineRole, deriveRoleBoundChild, deriveRuleBoundChild, deriveUntweakedChild, ecrecoverEthAddress, parseStrictEthAddress, pointToEthAddress, toEip55ChecksumAddress } from "./tweak.cjs";
|
|
5
|
+
import { BaseOtReceiverState, BaseOtSenderPendingSession, BaseOtSenderState, BaseOtStep1Message, BaseOtStep2Message, OtExtReceiverPendingState, OtExtSenderPendingState, OtExtStep1Message, OtExtStep2Message, OtExtStep3Message, VerifiedCotReceiverRows, VerifiedCotSenderRows, baseOtReceiverStep2, baseOtSenderStep1, baseOtSenderStep3, bytes16ToU128LE, eklundhTranspose128x1024, expandKos15ChiWeights, gf128Mul, otExtendReceiverStep1, otExtendReceiverStep3, otExtendSenderStep2, otExtendSenderStep4VerifyBeforePads, u128ToBytes16LE, wipeBaseOtReceiverState, wipeBaseOtSenderState, wipeVerifiedCotReceiverRows, wipeVerifiedCotSenderRows } from "./ot.cjs";
|
|
6
|
+
import { GadgetMtaPayload, decomposeScalarWithLhlGadget, deriveDualPadFromCotRow, gadgetMtaReceiverVerifyAndFinish, gadgetMtaSenderCreateMessage, getGadgetVector768, recombineGadgetBitsModN } from "./mta.cjs";
|
|
7
|
+
import { MpcPartyBaseOtChannels, MpcPublicClusterInfo, MtaInstanceKind, PresignMtaOtStep1Bundle, PresignMtaOtStep2Bundle, PresignMtaOtStep3Bundle, PresignMtaStep4PayloadBundle, PresignPartySession, PresignRound1CommitmentMsg, PresignRound1RevealMsg, PresignRound3BroadcastMsg, PresignRound4BroadcastMsg, PresignaturePublicVerification, PresignatureShareRecord, VolatilePresignaturePool, computeSubsetBoundPresigId } from "./presign.cjs";
|
|
8
|
+
import { MpcAggregatedSignature, MpcOnlineSignRequest, MpcOnlineSignShare, RerandomizedNonceResult, aggregateOnlineSignature, computeRerandomizedNoncePoint, createOnlineSignShare, deriveGrothShoupRerandScalar, evaluateConsumedPresigShareWithRerand, verifyAndDeriveRequestChildKey, verifyOnlineSignShare } from "./sign.cjs";
|
|
9
|
+
export { AppendOnlyDkgEchoLock, BSGS_M, BaseOtReceiverState, BaseOtSenderPendingSession, BaseOtSenderState, BaseOtStep1Message, BaseOtStep2Message, ColdBackupDealerInput, ColdBackupPlugin, DEFAULT_COLD_GUARDIANS, DEFAULT_COLD_THRESHOLD, DEFAULT_ONLINE_PARTIES, DEFAULT_ONLINE_THRESHOLD, DST_BASEOT_KEY_V1, DST_BASEOT_S_POK_V1, DST_CHILD_TWEAK_V1, DST_COT_ROW_V1, DST_DKG_COM_V2, DST_DKG_CTX_V2, DST_DKG_ECHO_V2, DST_DKG_POK_V2, DST_DKG_SELFTEST_V2, DST_DKG_SHARE_AAD_V2, DST_DKG_STEP1_AUTH_V1, DST_DKG_TRANSCRIPT_V2, DST_DKG_X25519_HKDF_V2, DST_KOS15_CHI_V1, DST_LHL_GADGET_V1, DST_MTA_ETA_V1, DST_OT_CTR_IV_V1, DST_PRESIG_COM_V1, DST_PRESIG_ID_V1, DST_PRESIG_PI_LIN_K_V1, DST_PRESIG_PI_POK_Z_V1, DST_PRESIG_POK_B_V1, DST_PRESIG_POK_CK_V1, DST_PRESIG_POK_GAMMA_V1, DST_PRESIG_RERAND_V1, DST_PRESIG_ZETA_HKDF_V1, DST_PRESIG_ZETA_V1, DST_RULE_TWEAK_V1, DerivedChildKey, DkgCeremonyConfig, DkgEchoLock, DkgEncryptedShareEnvelope, DkgParticipantSession, DkgRosterEntry, DkgRound1CommitMessage, DkgRound2RevealPayload, DkgRound3EchoMessage, DkgSubsetSelfTestSignature, ESCAPE_DRILL_MAX_AGE_SECONDS, FORBIDDEN_ONLINE_ROLE_ESCAPE_CANARY, Fn, GadgetMtaPayload, H_scalar, LinearPedersenDleqProof, MAX_MPC_CLUSTER_NODES, MAX_MPC_PEER_MESSAGE_BYTES, MAX_MPC_SIGN_REQUEST_BYTES, MAX_ON_DEMAND_SILENCE_SECONDS, MAX_RECOVERY_PACKAGE_BYTES, MAX_RULE_DAG_NODES, MAX_RULE_YAML_BYTES, MPC_PROTOCOL_VERSION, type MpcAggregatedSignature, MpcChildDerivationSpec, MpcErrorCode, MpcNodeProvisionedKeyRecord, type MpcOnlineSignRequest, type MpcOnlineSignShare, MpcPartyBaseOtChannels, MpcProtocolError, MpcPublicClusterInfo, MpcRootLifecycleState, MpcTweakMode, MtaInstanceKind, OT_BASE_PARTIAL_BITS, OT_COLUMN_BYTES, OT_EXTENSION_ROWS, OT_GADGET_BITS, OT_KAPPA_BITS, OT_KAPPA_BYTES, OT_LHL_EXTRA_BITS, OT_SACRIFICE_BITS, OcapConsensusAnchor, OtExtReceiverPendingState, OtExtSenderPendingState, OtExtStep1Message, OtExtStep2Message, OtExtStep3Message, PEDERSEN_H, PEDERSEN_H_COMP33, PEDERSEN_H_COMPRESSED_HEX, PEDERSEN_H_DST, PEDERSEN_H_MESSAGE, PedersenPokProof, PresignMtaOtStep1Bundle, PresignMtaOtStep2Bundle, PresignMtaOtStep3Bundle, PresignMtaStep4PayloadBundle, PresignPartySession, PresignRound1CommitmentMsg, PresignRound1RevealMsg, PresignRound3BroadcastMsg, PresignRound4BroadcastMsg, PresignaturePublicVerification, PresignatureShareRecord, RandomBytesFn, type RerandomizedNonceResult, SECP256K1_G, SECP256K1_HALF_N, SECP256K1_N, SECP256K1_P, SECP256K1_ZERO, SchnorrPokProof, Secp256k1Point, VerifiedCotReceiverRows, VerifiedCotSenderRows, VolatilePresignaturePool, addModN, aggregateOnlineSignature, applyAdditiveTweak, assertAllowedOnlineRole, assertSafeCeremonyId, assertScalarInField, assertScalarNonZero, assertValidX25519PublicKey, baseOtReceiverStep2, baseOtSenderStep1, baseOtSenderStep3, bytes16ToU128LE, bytes32ToScalarNonZero, bytes32ToScalarStrict, bytesToBigIntBE, bytesToHex, computeDkgContextHash32, computeDkgSubsetSelfTestDigest32, computeRerandomizedNoncePoint, computeSubsetBoundPresigId, computeX25519SharedSecret, concatBytes, constantTimeEqual, createLinearPedersenDleqProof, createOnlineSignShare, createPedersenPok, createSchnorrPokInBase, decodePointCompressed, decomposeScalarWithLhlGadget, defaultRandomBytes, deriveDualPadFromCotRow, deriveGrothShoupRerandScalar, deriveRoleBoundChild, deriveRuleBoundChild, deriveUntweakedChild, ecrecoverEthAddress, eklundhTranspose128x1024, encodePointCompressed, enumerateCombinations, evaluateConsumedPresigShareWithRerand, evaluateFeldmanCommitments, evaluatePolynomialModN, expandKos15ChiWeights, gadgetMtaReceiverVerifyAndFinish, gadgetMtaSenderCreateMessage, getGadgetVector768, gf128Mul, hashTranscriptSha256, hexToBytes, invModN, lagrangeCoefficientAtZero, lengthPrefixedEncode, modN, mulBaseG, mulModN, mulPoint, negModN, normalizeHexBytes, normalizeSortedSubset, otExtendReceiverStep1, otExtendReceiverStep3, otExtendSenderStep2, otExtendSenderStep4VerifyBeforePads, parseStrictEthAddress, pedersenCommit, pointToEthAddress, promoteNodeRecordAfterSelfTests, recombineGadgetBitsModN, sampleScalarNonZero, scalarToBytes32, secp256k1, sortedSubsetBytes, subModN, subsetsEqual, toEip55ChecksumAddress, u128ToBytes16LE, u16be, u32be, u64be, u8, utf8Bytes, validateAndComputeDkgContext, verifyAndDeriveRequestChildKey, verifyLinearPedersenDleqProof, verifyOnlineSignShare, verifyPedersenPok, verifySchnorrPokInBase, wipeBaseOtReceiverState, wipeBaseOtSenderState, wipeVerifiedCotReceiverRows, wipeVerifiedCotSenderRows, zeroizeBytes };
|