> ## Documentation Index
> Fetch the complete documentation index at: https://docs.blockradar.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Key Management

> Learn how Blockradar achieves innovative, enterprise-grade, no single point of failure security.

Blockradar's key management system represents a revolutionary approach to blockchain security, eliminating the traditional risks associated with private key storage while maintaining full functionality and user control. Our architecture ensures that private keys are never stored, never transmitted, and only computed when absolutely necessary for transaction signing.

## Core Security Principles

### **No Private Key Storage**

Unlike traditional custodial solutions, Blockradar **never stores private keys** on our infrastructure. This fundamental design choice eliminates the single largest attack vector in blockchain applications - private key compromise through storage breaches.

### **Derivation Path Architecture**

Instead of storing private keys, Blockradar stores only **wallet derivation paths** - mathematical instructions that can generate private keys when needed. This approach provides:

* **Zero private key exposure** in our systems
* **Mathematical impossibility** of key extraction from stored data
* **Complete user sovereignty** over cryptographic assets
* **Auditable security model** with verifiable properties

## Business-Level Key Management

### **Dual Seed Phrase System**

Each business account operates with two encrypted seed phrases:

<CardGroup cols={2}>
  <Card title="Mainnet Seed Phrase" icon="shield">
    **Production Environment**

    * Encrypted using advanced AES-256-GCM
    * Generates all mainnet wallet addresses
    * Protected by enterprise-grade encryption
    * Never accessible in plaintext
  </Card>

  <Card title="Testnet Seed Phrase" icon="flask">
    **Development Environment**

    * Separate encrypted seed phrase
    * Isolated testnet operations
    * Same security standards as mainnet
    * Complete environment separation
  </Card>
</CardGroup>

### **Advanced Encryption System**

Blockradar employs a sophisticated multi-layer encryption system for seed phrase protection:

**Encryption Process:**

1. **Seed Generation**: Cryptographically secure seed phrases generated
2. **Advanced Encryption**: Seeds encrypted using AES-256-GCM with custom key derivation
3. **Encrypted Storage**: Only encrypted seeds stored in our infrastructure
4. **Access Control**: Strict authentication and authorization controls

**Security Benefits:**

* **AES-256-GCM Encryption**: Industry-standard authenticated encryption
* **Custom Key Derivation**: PBKDF2-based key derivation with high iteration counts
* **Random IV Generation**: Unique initialization vectors for each encryption
* **Authentication Tags**: Built-in integrity verification for encrypted data

## Real-Time Key Computation

### **On-Demand Private Key Generation**

Private keys are computed **only when transactions need to be signed**:

```mermaid theme={null}
flowchart LR
    %% Main Transaction Flow
    A@{ shape: stadium, label: "Transaction Request" } --> 
    B@{ shape: rounded, label: "Validate Request" } --> 
    C@{ shape: rounded, label: "Retrieve Encrypted Seed" } --> 
    D@{ shape: rounded, label: "AES-256-GCM Decrypt" } --> 
    E@{ shape: rounded, label: "Derive Private Key" } --> 
    F@{ shape: rounded, label: "Sign Transaction" } --> 
    G@{ shape: rounded, label: "Secure Memory Wipe" } --> 
    H@{ shape: stadium, label: "Return Signed Transaction" }

    %% Security Layer
    subgraph SecurityLayer ["Security Layer"]
        direction TB
        I@{ shape: cyl, label: "Encrypted Storage" }
        J@{ shape: rect, label: "Authentication Tags" }
        K@{ shape: rect, label: "Random IV & Salt" }
    end

    %% Real-Time Computation Layer
    subgraph RealTime ["Real-Time Computation"]
        direction TB
        L@{ shape: rect, label: "BIP44 Derivation" }
        M@{ shape: rect, label: "Elliptic Curve Math" }
        N@{ shape: rect, label: "Transaction Signing" }
    end

    %% Memory Protection Layer
    subgraph MemProtect ["Memory Protection"]
        direction TB
        O@{ shape: rect, label: "Secure Allocation" }
        P@{ shape: rect, label: "Cryptographic Clear" }
        Q@{ shape: rect, label: "Zero Persistence" }
    end

    %% Contextual Connections
    C -. "Seed Source" .-> I
    D -. "Tag Validation" .-> J
    D -. "Nonce/Salt" .-> K
    E -.-> L
    E -.-> M
    F -.-> N
    G -.-> O
    G -.-> P
    G -.-> Q

    %% Styling
    classDef mainStep fill:#353553,stroke:#6088FF,stroke-width:2px,color:#fff;
    classDef secLayer fill:#402345,stroke:#D885FF,stroke-width:2px,color:#fff;
    classDef compLayer fill:#18333B,stroke:#36BEBC,stroke-width:2px,color:#fff;
    classDef memLayer fill:#2B3A36,stroke:#88ED79,stroke-width:2px,color:#fff;
    class A,B,C,D,E,F,G,H mainStep;
    class I,J,K secLayer;
    class L,M,N compLayer;
    class O,P,Q memLayer;
```

### **Transaction Signing Flow**

```rust theme={null}
// Simplified transaction signing process
async fn sign_transaction(derivation_path: &str, transaction: &Transaction) -> Result<SignedTransaction, Error> {
    // 1. Retrieve encrypted seed phrase
    let encrypted_seed = get_encrypted_seed(derivation_path).await?;
    
    // 2. Decrypt using advanced AES-256-GCM
    let seed_phrase = advanced_decrypt(&encrypted_seed).await?;
    
    // 3. Compute private key
    let private_key = derive_private_key(&seed_phrase, derivation_path)?;
    
    // 4. Sign transaction
    let signed_tx = sign_with_private_key(&private_key, transaction)?;
    
    // 5. Securely clear private key from memory
    secure_clear(&private_key);
    
    Ok(signed_tx)
}
```

## Security Architecture Benefits

### **Eliminated Attack Vectors**

Our architecture eliminates common attack vectors:

<CardGroup cols={2}>
  <Card title="Database Breaches" icon="database">
    **Traditional Risk**: Private keys stored in database
    **Our Solution**: Only encrypted derivation paths stored
    **Result**: Database breach reveals no usable private keys
  </Card>

  <Card title="Memory Dumps" icon="memory">
    **Traditional Risk**: Private keys in memory dumps
    **Our Solution**: Keys computed and destroyed immediately
    **Result**: Memory dumps contain no private key data
  </Card>

  <Card title="Insider Threats" icon="user-shield">
    **Traditional Risk**: Employees with key access
    **Our Solution**: Keys only computed during transactions
    **Result**: No persistent access to private keys
  </Card>

  <Card title="Network Interception" icon="wifi">
    **Traditional Risk**: Private keys transmitted over network
    **Our Solution**: Keys never leave secure environment
    **Result**: Network interception reveals no private keys
  </Card>
</CardGroup>

### **Compliance & Auditing**

* **SOC 2 Type II**: Comprehensive security controls audit
* **ISO 27001**: Information security management certification
* **PCI DSS**: Payment card industry security standards
* **GDPR Compliance**: Data protection and privacy regulations

<Note>
  Blockradar's key management system provides enterprise-grade security while maintaining the flexibility and ease of use that modern applications require. Our architecture ensures that your private keys are never at risk, even in the event of a complete system compromise.
</Note>

## Related Documentation

<CardGroup cols={2}>
  <Card title="Our Approach" href="/en/security/our-approach" icon="shield">
    Learn about Blockradar's overall security philosophy and approach to protecting your funds.
  </Card>

  <Card title="Disaster Recovery" href="/en/security/disaster-recovery" icon="arrows-rotate">
    Understand how Blockradar ensures business continuity and fund security during disasters.
  </Card>

  <Card title="Shared Responsibility" href="/en/security/shared-responsibility" icon="users">
    Learn about the shared responsibility model for security between Blockradar and your organization.
  </Card>

  <Card title="Report Vulnerability" href="/en/security/report-vulnerability" icon="triangle-exclamation">
    Learn how to report security vulnerabilities to help improve our platform.
  </Card>
</CardGroup>
