Skip to content

[P2] Encryption: Migrate existing plaintext on-chain subscriptions to encrypted format #841

Description

@Calebux

Parent Issue

#824

Summary

Build a migration tool/script that reads existing plaintext subscriptions from the SubscriptionRegistry, encrypts them, and re-stores them.

Details

  • One-time migration script run by each user (since encryption requires their key)
  • Flow: read all user's plaintext subs → derive encryption key → encrypt each → call store_encrypted_subscription → optionally clear plaintext fields
  • Must handle partial migration (resume after failure)
  • Could be triggered from Settings → Privacy → "Encrypt my on-chain data"

Affected Code

  • New: client/app/settings/privacy/migrate-encryption/ — UI component
  • backend/src/services/blockchain-service.ts — migration logic
  • client/lib/stellar-wallet.ts — key derivation for migration

Acceptance Criteria

  • Migration is idempotent (safe to re-run)
  • Progress indicator shown during migration
  • Plaintext data is cleared after successful encryption
  • Migration can resume after interruption

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave programprivacyPrivacy-preserving features

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions