Skip to content

Conversation

@theref
Copy link
Contributor

@theref theref commented Nov 5, 2025

Implements E2E encryption for threshold signing requests, mirroring the existing pattern used for decryption requests.

Changes

  • Add makeSigningRequests() helper to encrypt signing requests using ephemeral session keys and ECDH-derived shared secrets
  • Add decryptSigningResponses() helper to decrypt signing responses
  • Update SigningCoordinatorAgent.getParticipants() to extract signingRequestStaticKey from contract
  • Update PorterClient.signUserOp() to use encrypted requests/responses
  • Remove old plaintext signing types and decodeSignature() function
  • Update tests with signingRequestStaticKey mocks

Implementation Details

The encryption is transparent to users - the public API (signUserOp) remains unchanged. The implementation mirrors the decryption request encryption pattern exactly:

  1. Request encryption: Client generates ephemeral session key, derives shared secrets via ECDH with each signer's static key, encrypts signing requests
  2. Response decryption: Client decrypts responses using the same shared secrets

Dependencies

This PR depends on upstream changes:

Files Changed

  • packages/taco/src/sign.ts - Main signing logic with encryption helpers
  • packages/shared/src/porter.ts - Porter client with encrypted request/response handling
  • packages/shared/src/contracts/agents/signing-coordinator.ts - Extract signingRequestStaticKey from contract
  • packages/taco/test/taco-sign.test.ts - Updated mocks

Implements E2E encryption for threshold signing requests, mirroring the
existing pattern used for decryption requests.

Key changes:
- Add makeSigningRequests() helper to encrypt signing requests using
  ephemeral session keys and ECDH-derived shared secrets
- Add decryptSigningResponses() helper to decrypt signing responses
- Update SigningCoordinatorAgent.getParticipants() to extract
  signingRequestStaticKey from contract
- Update PorterClient.signUserOp() to use encrypted requests/responses
- Remove old plaintext signing types and decodeSignature() function
- Update tests with signingRequestStaticKey mocks

The encryption is transparent to users - the public API (signUserOp)
remains unchanged.

Depends on:
- nucypher-core PR nucypher#116 (encryption types)
- nucypher-contracts PR nucypher#438 (signingRequestStaticKey field)
- nucypher PR #3666 (Porter encrypted signing endpoint)
@derekpierre
Copy link
Member

Subsumed by #737

@derekpierre derekpierre closed this Nov 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants