Skip to content

Commit

Permalink
Merge pull request #5327 from BitGo/WP-3393
Browse files Browse the repository at this point in the history
refactor(sdk-core): remove vssProof from Eddsa singing
  • Loading branch information
alebusse authored Jan 2, 2025
2 parents b70bcb3 + 5885d88 commit 9680124
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 26 deletions.
4 changes: 0 additions & 4 deletions modules/bitgo/test/v2/unit/tss/eddsa.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
9 changes: 1 addition & 8 deletions modules/sdk-core/src/bitgo/tss/eddsa/eddsa.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<void> {
const rShare: RShare = userSignShare.rShares[ShareKeyPosition.BITGO];
Expand All @@ -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
Expand All @@ -235,7 +228,7 @@ export async function offerUserToBitgoRShare(
encryptedSignerShare,
'eddsa',
apiMode,
userPublicGpgKey,
undefined,
reqId
);
}
Expand Down
14 changes: 0 additions & 14 deletions modules/sdk-core/src/bitgo/utils/tss/eddsa/eddsa.ts
Original file line number Diff line number Diff line change
Expand Up @@ -527,10 +527,6 @@ export class EddsaUtils extends baseTSSUtils<KeyShare> {
rShare,
encryptedSignerShare.share,
apiVersion,
undefined,
undefined,
undefined,
undefined,
reqId
);
const bitgoToUserRShare = await getBitgoToUserRShare(this.bitgo, this.wallet.id(), txRequestId, reqId);
Expand Down Expand Up @@ -596,12 +592,6 @@ export class EddsaUtils extends baseTSSUtils<KeyShare> {
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');

Expand All @@ -625,10 +615,6 @@ export class EddsaUtils extends baseTSSUtils<KeyShare> {
userSignShare,
userToBitgoEncryptedSignerShare,
apiVersion,
vssProof,
privateShareProof,
userPublicGpgKey,
publicShare,
params.reqId
);

Expand Down

0 comments on commit 9680124

Please sign in to comment.