Public Key Exposure Analysis
Learning Objectives
Distinguish between exposed and unexposed public keys on XRPL
Categorize your holdings by quantum risk level
Analyze the blockchain to identify exposed keys
Prioritize migration actions based on actual exposure
Implement exposure-minimizing practices
Quantum Attack Requirements:
1. Obtain the PUBLIC KEY (not just address)
2. Run Shor's algorithm to derive private key
3. Sign transaction transferring funds
Critical Insight:
├── XRPL addresses are HASHES of public keys
├── Hash cannot be reversed to get public key
├── Public key only revealed when signing transactions
└── Never-used addresses have hidden public keys
Public Key Exposure Categories:
UNEXPOSED (Low Risk):
├── Address has never sent a transaction
├── May have received funds (deposits don't expose key)
├── Public key hidden behind SHA-256 + RIPEMD-160 hash
└── Quantum attack: Must break hash first (infeasible)
EXPOSED (High Risk):
├── Address has sent at least one transaction
├── Public key visible in transaction signature
├── Recorded permanently on ledger
└── Quantum attack: Shor's algorithm directly applicable
PARTIALLY EXPOSED:
├── Multi-sig where some signers exposed, others not
├── Regular key exposed but master key hidden
└── Complex risk assessment required
Actions That EXPOSE Public Key:
✗ Sending XRP or tokens
✗ Creating/modifying trust lines
✗ Placing DEX orders
✗ Setting regular key
✗ Enabling/disabling features
✗ Creating escrows
✗ Opening payment channels
✗ Any transaction requiring signature
Actions That DON'T Expose Key:
✓ Receiving XRP or tokens
✓ Being destination of escrow
✓ Being payment channel recipient
✓ Account creation (by someone else sending XRP)
```
How to Check Your Key Exposure:
Method 1: Transaction History
├── Check if account has any SENT transactions
├── Tools: XRPL Explorer, Bithomp, XRPScan
├── Any outgoing transaction = EXPOSED
└── Only incoming = UNEXPOSED
Method 2: Direct Ledger Query
├── Account info shows public key if exposed
├── API: account_info method
├── PublicKey field present = EXPOSED
└── No PublicKey = UNEXPOSED
Method 3: Account Flags
├── Check account sequence number
├── Sequence > 1 = At least one transaction sent
├── Sequence = 1 = Possibly unexposed (check further)
└── Note: Account creation sets sequence to 1
Quantum Risk Assessment Matrix:
| Short-term Hold | Long-term Hold
--------------------|-----------------|----------------
Key UNEXPOSED | MINIMAL | LOW
Key EXPOSED | MODERATE | HIGH/CRITICAL
Reasoning:
├── Unexposed keys: Attacker can't apply Shor's algorithm
├── Short-term: Less time in HNDL vulnerability window
├── Long-term exposed: Maximum HNDL risk
└── Highest priority: Large, long-term, exposed holdings
MINIMAL RISK:
├── Unexposed key
├── Any time horizon
├── Defense: Hash must be broken first
└── Action: Monitor, no urgency
LOW RISK:
├── Unexposed key, long-term hold
├── OR: Exposed key, very short-term
└── Action: Plan migration, not urgent
MODERATE RISK:
├── Exposed key, active trading account
├── Funds regularly moving
├── Some HNDL exposure but limited window
└── Action: Migrate when convenient
HIGH RISK:
├── Exposed key, substantial holdings
├── Long-term hold strategy
├── Prime HNDL target
└── Action: Prioritize migration
CRITICAL RISK:
├── Exposed key + Very large holdings
├── "Whale" addresses with public history
├── Maximum value, maximum exposure
└── Action: Immediate migration planning
```
Step-by-Step Exposure Audit:
1. Inventory All Addresses:
1. Check Each Address:
1. Categorize by Risk:
1. Calculate Exposure Metrics:
Example Portfolio Audit:
Address A: r9XXXX...
├── Balance: 50,000 XRP
├── Transaction history: 47 sent transactions
├── Purpose: Active trading
├── Exposure: EXPOSED
├── Hold period: Short-term (active)
└── Risk: MODERATE
Address B: rYYYY...
├── Balance: 200,000 XRP
├── Transaction history: 1 sent (initial setup)
├── Purpose: Long-term cold storage
├── Exposure: EXPOSED
├── Hold period: Long-term (5+ years)
└── Risk: HIGH/CRITICAL ⚠️
Address C: rZZZZ...
├── Balance: 100,000 XRP
├── Transaction history: 0 sent (receive only)
├── Purpose: Cold storage
├── Exposure: UNEXPOSED
├── Hold period: Long-term
└── Risk: MINIMAL ✓
Portfolio Summary:
├── Total: 350,000 XRP
├── Exposed: 250,000 XRP (71%)
├── High-risk exposed: 200,000 XRP (57%)
├── Unexposed: 100,000 XRP (29%)
└── Priority: Migrate Address B urgently
Best Practices (Pre-Quantum Era):
1. Receive-Only Addresses:
1. Fresh Address Per Large Deposit:
1. One-Time Use Pattern:
Migration Strategies:
Pre-Amendment (Now):
├── Cannot eliminate exposure on current keys
├── CAN consolidate to fewer addresses for easier future migration
├── CAN move to hardware wallet (still same algorithm)
└── Preparation, not solution
Post-Amendment (Future):
├── Create new PQ-protected address
├── Transfer all funds to new address
├── Old exposed address becomes empty
├── New address has PQ-safe keys
Intermediate Option:
├── Move funds to unexposed address (new, receive-only)
├── Wait for PQ amendment
├── Migrate unexposed address to PQ when available
└── Reduces HNDL window
Why Address Reuse Increases Risk:
Each Transaction From Address:
├── Re-exposes same public key
├── Provides more signature samples
├── Increases certainty of HNDL capture
└── NO additional quantum weakness (already exposed)
Address Reuse vs. Fresh Addresses:
├── Reuse: One exposed key, concentrated risk
├── Fresh: Multiple addresses, distributed risk
├── For quantum: Fresh addresses don't help if already exposed
└── For privacy: Fresh addresses always better
Recommendation:
├── For high-value storage: Never reuse, receive-only
├── For active use: Accept exposure, minimize balance
└── Post-quantum: All signatures equally vulnerable
Proven: Public key exposure is binary—either visible on ledger or hidden. Unexposed keys have additional hash barrier.
Uncertain: How much recorded blockchain data adversaries actually harvest; when CRQC will make HNDL data actionable.
Risky: Assuming unexposed means "safe forever" (hash security could weaken); ignoring exposure status in migration planning.
Assignment: Conduct a complete quantum exposure audit of your XRPL holdings.
Part 1: Inventory all addresses you control (15%)
Part 2: Check exposure status of each address (25%)
Part 3: Categorize by risk level using provided matrix (25%)
Part 4: Calculate portfolio exposure metrics (15%)
Part 5: Develop prioritized migration plan (20%)
Time Investment: 2-3 hours
1. What exposes a public key on XRPL? Answer: Sending any transaction
2. An address that has only received funds has what risk level? Answer: Minimal (unexposed)
3. Highest quantum risk category? Answer: Exposed key + large balance + long-term hold
4. Can address reuse be reversed to "unexpose" a key? Answer: No, exposure is permanent
5. Best practice for cold storage quantum resistance? Answer: Receive-only addresses (never send)
End of Lesson 6
Key Takeaways
Exposure is the critical variable
— Unexposed keys have additional hash protection; exposed keys face direct Shor's attack
Any sent transaction exposes your public key
— Permanent, irreversible, recorded on ledger
Long-term exposed holdings are highest risk
— Prime HNDL targets with unlimited attack window
Receive-only addresses minimize exposure
— New addresses that only receive remain unexposed
Audit your portfolio by exposure status
— Prioritize migration for high-value exposed addresses ---