Conversation
| 'v1.mpc.eddsa.initialize': { | ||
| post: httpRoute({ | ||
| method: 'POST', | ||
| path: '/{coin}/mpc/initialize', | ||
| request: httpRequest({ | ||
| params: { coin: t.string }, | ||
| body: MpcInitializeRequest, | ||
| }), | ||
| response: MpcInitializeResponse, | ||
| description: 'Initialize MPC for EdDSA key generation', | ||
| }), | ||
| }, |
| description: 'Initialize MPC for EdDSA key generation', | ||
| }), | ||
| }, | ||
| 'v1.key.mpc.init': { |
There was a problem hiding this comment.
| 'v1.key.mpc.init': { | |
| 'v1.mpc.key.init': { |
| description: 'Initialize Eddsa key generation', | ||
| }), | ||
| }, | ||
| 'v1.mpc.finalize': { |
There was a problem hiding this comment.
| 'v1.mpc.finalize': { | |
| 'v1.mpc.key.finalize': { |
There was a problem hiding this comment.
Just to keep it consistent with v1.multisig.sign nomenclature
| Buffer.from(keyShare.yShares[3].chaincode, 'hex'), | ||
| ]).toString('hex'); | ||
|
|
||
| const bitgoKeyShare = { |
There was a problem hiding this comment.
| const bitgoKeyShare = { | |
| const sourceToBitGoKeyShare = { |
| Buffer.from(keyShare.yShares[2].chaincode, 'hex'), | ||
| ]).toString('hex'); | ||
|
|
||
| const counterPartyKeyShare = { |
There was a problem hiding this comment.
| const counterPartyKeyShare = { | |
| const sourceToCounterPartyKeyShare = { |
| from: source, | ||
| to: source === 'user' ? 'backup' : 'user', | ||
| publicShare: publicKeyShare, | ||
| privateShare: gpgEncrypt(counterPartyPrivateKeyShare, counterPartyGpgPub), |
There was a problem hiding this comment.
are you sure you'll have the backup's gpg key in this case? If this is dynamic, woudn't we need a 3rd round since mbe will first need backup's gpg key?
| } | ||
|
|
||
| await eddsaUtils.verifyWalletSignatures( | ||
| userGpgKey.publicKey, |
There was a problem hiding this comment.
maybe we should use userKey instead of sourceKey, don't know if that will mess up flow
Ticket: WP-000000
e1d7324 to
7ff1b6a
Compare
37ad812 to
721ff8b
Compare
pranavjain97
left a comment
There was a problem hiding this comment.
Nice work! Just requires some polishing
| bitgoAddWalletNock.done(); | ||
| }); | ||
|
|
||
| // it('should generate a TSS wallet by calling the enclaved express service', async () => { |
There was a problem hiding this comment.
Let's get atleast one happy path integration test in with any new feature
| const sourceIndex = source === 'user' ? 1 : 2; | ||
| const counterPartyIndex = source === 'user' ? 2 : 1; | ||
| const bitgoIndex = 3; |
There was a problem hiding this comment.
You could use KeyIndices from the sdk here
There was a problem hiding this comment.
will follow up on
| const previousState = JSON.parse( | ||
| req.bitgo.decrypt({ | ||
| input: encryptedData, | ||
| password: decryptedDataKey.plaintextKey, | ||
| }), | ||
| ); |
There was a problem hiding this comment.
nit: could we type this?
| // Log the constructed keychain for verification | ||
| debugLogger('Constructed keychain:', { | ||
| sourcePrivateShare, | ||
| bitgoToSourceKeyShare, | ||
| counterPartyToSourceKeyShare, | ||
| commonKeychain: bitgoKeyChain.commonKeychain, | ||
| }); |
There was a problem hiding this comment.
Let's remove this, or not log private shares
| @@ -0,0 +1,150 @@ | |||
| import debug from 'debug'; | |||
There was a problem hiding this comment.
can we move these files to api/enclaved/mpc?
| description: 'Generate an independent key', | ||
| }), | ||
| }, | ||
| 'v1.mpc.initialize': { |
There was a problem hiding this comment.
| 'v1.mpc.initialize': { | |
| 'v1.mpc.key.initialize': { |
| description: 'Initialize Eddsa key generation', | ||
| }), | ||
| }, | ||
| 'v1.mpc.finalize': { |
| 'v1.mpc.initialize': { | ||
| post: httpRoute({ | ||
| method: 'POST', | ||
| path: '/api/{coin}/mpc/initialize', |
There was a problem hiding this comment.
| path: '/api/{coin}/mpc/initialize', | |
| path: '/api/{coin}/mpc/key/initialize', |
| 'v1.mpc.finalize': { | ||
| post: httpRoute({ | ||
| method: 'POST', | ||
| path: '/api/{coin}/mpc/finalize', |
There was a problem hiding this comment.
| path: '/api/{coin}/mpc/finalize', | |
| path: '/api/{coin}/mpc/key/finalize', |
| export interface GenerateDataKeyParams { | ||
| keyType: 'AES-256' | 'RSA-2048' | 'ECDSA-P256'; | ||
| } |
There was a problem hiding this comment.
Are u sure kms supports 'RSA-2048' | 'ECDSA-P256';? i got an error when using RSA-2048
pranavjain97
left a comment
There was a problem hiding this comment.
Please do the other changes in quick follow-up
No description provided.