Skip to content

Commit

Permalink
Revert "Hsm 432/hardcode pub gpg keys"
Browse files Browse the repository at this point in the history
  • Loading branch information
pranavjain97 authored Nov 7, 2024
1 parent 4fd3138 commit 0feaed5
Show file tree
Hide file tree
Showing 11 changed files with 40 additions and 365 deletions.
169 changes: 0 additions & 169 deletions modules/bitgo/test/v2/unit/internal/tssUtils/bitgoMpcGpgPubKeys.ts

This file was deleted.

1 change: 0 additions & 1 deletion modules/express/test/unit/clientRoutes/externalSign.ts
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,6 @@ describe('External signer', () => {
const reqCommitment = {
bitgo: bgTest,
body: {
bitgoGpgPubKey: bitgoGpgKey.public,
txRequest: {
apiVersion: 'full',
walletId: walletID,
Expand Down
2 changes: 0 additions & 2 deletions modules/sdk-core/src/bitgo/keychain/iKeychains.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { IRequestTracer } from '../../api';
import { KeychainsTriplet, KeyPair } from '../baseCoin';
import { BitgoPubKeyType } from '../utils/tss/baseTypes';
import { BackupProvider, IWallet } from '../wallet';
import { BitGoKeyFromOvcShares, OvcToBitGoJSON } from './ovcJsonCodec';

Expand Down Expand Up @@ -40,7 +39,6 @@ export interface Keychain {
commonKeychain?: string;
keyShares?: ApiKeyShare[];
walletHSMGPGPublicKeySigs?: string;
hsmType?: BitgoPubKeyType;
type: KeyType;
source?: SourceType;
coinSpecific?: { [coinName: string]: unknown };
Expand Down
66 changes: 0 additions & 66 deletions modules/sdk-core/src/bitgo/tss/bitgoPubKeys.ts

This file was deleted.

1 change: 0 additions & 1 deletion modules/sdk-core/src/bitgo/tss/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import ECDSAMethods, { ECDSAMethodTypes, DKLSMethods } from './ecdsa';

export { EDDSAMethods, EDDSAMethodTypes, ECDSAMethods, ECDSAMethodTypes, DKLSMethods };
export { ShareKeyPosition } from './types';
export * as BitgoMpcGpgPubKeys from './bitgoPubKeys';

// exporting this types for backward compatibility.
/** @deprecated Use EDDSAMethods */
Expand Down
5 changes: 0 additions & 5 deletions modules/sdk-core/src/bitgo/utils/mpcUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import { AddKeychainOptions, Keychain, KeyType } from '../keychain';
import { BackupProvider } from '../wallet';
import { encryptText, getBitgoGpgPubKey } from './opengpgUtils';
import { IntentRecipient, PopulatedIntent, PrebuildTransactionWithIntentOptions } from './tss/baseTypes';
import { envRequiresBitgoPubGpgKeyConfig, isBitgoMpcPubKey } from '../tss/bitgoPubKeys';

export interface MpcKeyShare {
publicShare: string;
Expand Down Expand Up @@ -53,10 +52,6 @@ export abstract class MpcUtils {
enterprise?: string
): Promise<Keychain> {
const bitgoKey = (await getBitgoGpgPubKey(this.bitgo)).mpcV1;
if (envRequiresBitgoPubGpgKeyConfig(this.bitgo.getEnv())) {
// Ensure the public key is one of the expected BitGo public keys when in test or prod.
assert(isBitgoMpcPubKey(bitgoKey.armor(), 'mpcv1'), 'Invalid BitGo GPG public key');
}
const encUserToBitGoMessage = await encryptText(userKeyShare.privateShare, bitgoKey);
const encBackupToBitGoMessage = await encryptText(backupKeyShare.privateShare, bitgoKey);

Expand Down
Loading

0 comments on commit 0feaed5

Please sign in to comment.