From 5885d88f9c8a05f5810aaea73625c322f2bd3c48 Mon Sep 17 00:00:00 2001 From: Alejandro Busse Date: Thu, 2 Jan 2025 14:12:36 -0300 Subject: [PATCH] refactor(sdk-core): remove vssProof from Eddsa singing Removed vssProof from MPC Eddsa signing is not needed and not being used WP-3393 TICKET: WP-3393 --- modules/bitgo/test/v2/unit/tss/eddsa.ts | 4 ---- modules/sdk-core/src/bitgo/tss/eddsa/eddsa.ts | 9 +-------- .../sdk-core/src/bitgo/utils/tss/eddsa/eddsa.ts | 14 -------------- 3 files changed, 1 insertion(+), 26 deletions(-) diff --git a/modules/bitgo/test/v2/unit/tss/eddsa.ts b/modules/bitgo/test/v2/unit/tss/eddsa.ts index 355fc29d38..fb52d1ea8d 100644 --- a/modules/bitgo/test/v2/unit/tss/eddsa.ts +++ b/modules/bitgo/test/v2/unit/tss/eddsa.ts @@ -561,10 +561,6 @@ describe('test tss helper functions', function () { validUserSignShare, 'signerShare', undefined, - undefined, - undefined, - undefined, - undefined, reqId ).should.be.fulfilled(); nock.isDone().should.equal(true); diff --git a/modules/sdk-core/src/bitgo/tss/eddsa/eddsa.ts b/modules/sdk-core/src/bitgo/tss/eddsa/eddsa.ts index cd2ced6dba..1530bb3494 100644 --- a/modules/sdk-core/src/bitgo/tss/eddsa/eddsa.ts +++ b/modules/sdk-core/src/bitgo/tss/eddsa/eddsa.ts @@ -203,10 +203,6 @@ export async function offerUserToBitgoRShare( userSignShare: SignShare, encryptedSignerShare: string, apiMode: 'full' | 'lite' = 'lite', - vssProof?: string, - privateShareProof?: string, - userPublicGpgKey?: string, - publicShare?: string, reqId?: IRequestTracer ): Promise { const rShare: RShare = userSignShare.rShares[ShareKeyPosition.BITGO]; @@ -220,9 +216,6 @@ export async function offerUserToBitgoRShare( from: SignatureShareType.USER, to: SignatureShareType.BITGO, share: rShare.r + rShare.R, - vssProof, - privateShareProof, - publicShare, }; // TODO (BG-57944): implement message signing for EDDSA @@ -235,7 +228,7 @@ export async function offerUserToBitgoRShare( encryptedSignerShare, 'eddsa', apiMode, - userPublicGpgKey, + undefined, reqId ); } diff --git a/modules/sdk-core/src/bitgo/utils/tss/eddsa/eddsa.ts b/modules/sdk-core/src/bitgo/utils/tss/eddsa/eddsa.ts index 0181c0b77d..c98311aa85 100644 --- a/modules/sdk-core/src/bitgo/utils/tss/eddsa/eddsa.ts +++ b/modules/sdk-core/src/bitgo/utils/tss/eddsa/eddsa.ts @@ -527,10 +527,6 @@ export class EddsaUtils extends baseTSSUtils { rShare, encryptedSignerShare.share, apiVersion, - undefined, - undefined, - undefined, - undefined, reqId ); const bitgoToUserRShare = await getBitgoToUserRShare(this.bitgo, this.wallet.id(), txRequestId, reqId); @@ -596,12 +592,6 @@ export class EddsaUtils extends baseTSSUtils { const bitgoGpgKey = await this.pickBitgoPubGpgKeyForSigning(false, params.reqId, txRequestResolved.enterpriseId); const userToBitgoEncryptedSignerShare = await encryptText(signerShare, bitgoGpgKey); - const userGpgKey = await generateGPGKeyPair('secp256k1'); - const privateShareProof = await createShareProof(userGpgKey.privateKey, signingKey.yShares[bitgoIndex].u, 'eddsa'); - const vssProof = signingKey.yShares[bitgoIndex].v; - const userPublicGpgKey = userGpgKey.publicKey; - const publicShare = signingKey.yShares[bitgoIndex].y + signingKey.yShares[bitgoIndex].chaincode; - const userToBitgoCommitment = userSignShare.rShares[bitgoIndex].commitment; assert(userToBitgoCommitment, 'Missing userToBitgoCommitment commitment'); @@ -625,10 +615,6 @@ export class EddsaUtils extends baseTSSUtils { userSignShare, userToBitgoEncryptedSignerShare, apiVersion, - vssProof, - privateShareProof, - userPublicGpgKey, - publicShare, params.reqId );