Add end-to-end encryption for signing requests #736
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Implements E2E encryption for threshold signing requests, mirroring the existing pattern used for decryption requests.
Changes
makeSigningRequests()helper to encrypt signing requests using ephemeral session keys and ECDH-derived shared secretsdecryptSigningResponses()helper to decrypt signing responsesSigningCoordinatorAgent.getParticipants()to extractsigningRequestStaticKeyfrom contractPorterClient.signUserOp()to use encrypted requests/responsesdecodeSignature()functionsigningRequestStaticKeymocksImplementation Details
The encryption is transparent to users - the public API (
signUserOp) remains unchanged. The implementation mirrors the decryption request encryption pattern exactly:Dependencies
This PR depends on upstream changes:
ThresholdSigningRequest,EncryptedThresholdSigningRequest, etc.)signingRequestStaticKeyfield inSigningCohortParticipant)Files Changed
packages/taco/src/sign.ts- Main signing logic with encryption helperspackages/shared/src/porter.ts- Porter client with encrypted request/response handlingpackages/shared/src/contracts/agents/signing-coordinator.ts- ExtractsigningRequestStaticKeyfrom contractpackages/taco/test/taco-sign.test.ts- Updated mocks