PCIe 5.0+ SECURITY

IDE (Integrity & Data Encryption)

Link IDE, Selective IDE, SPDM authentication, encryption algorithms, and TEE integration

1. What is IDE?

What is Integrity and Data Encryption?

IDE (Integrity and Data Encryption) is a PCIe security feature that provides cryptographic protection for PCIe transactions, ensuring data confidentiality and integrity across the PCIe fabric.

IDE Goals

IDE Modes

Mode Description Use Case
Link IDE Encrypts all traffic on a link Server interconnects, external cables
Selective IDE Encrypts traffic to/from specific devices TEE device assignment, VM isolation

2. Why IDE?

Threat Model

    Physical/Interposer Attacks:
    
    ┌────────┐                    ┌────────┐
    │  CPU   │════════════════════│ Device │
    │        │    PCIe Link       │        │
    └────────┘         ▲          └────────┘
                       │
                  ┌────┴────┐
                  │ ATTACKER│  ← Can snoop, modify, inject
                  │ (probe) │
                  └─────────┘
    
    Without IDE:
    - Attacker can read sensitive data
    - Attacker can modify transactions
    - Attacker can replay old transactions
    
    With IDE:
    - Data encrypted (confidential)
    - Modifications detected (MAC check fails)
    - Replays detected (sequence check fails)

Use Cases

3. Link IDE

What is Link IDE?

Link IDE encrypts all TLP traffic on a PCIe link between two directly connected ports. It provides link-level security, re-encrypting at each hop.

Link IDE Architecture

    ┌──────────────────┐         ┌──────────────────┐
    │    Port A        │         │    Port B        │
    │                  │         │                  │
    │  TLP ──► Encrypt │═════════│ Decrypt ──► TLP  │
    │         (AES-GCM)│ Cipher  │ (AES-GCM)        │
    │                  │ Text    │                  │
    └──────────────────┘         └──────────────────┘
    
    Key: Unique per link direction (A→B, B→A)
    Scope: Single link only (re-encrypt at switch)

Link IDE Characteristics

4. Selective IDE

What is Selective IDE?

Selective IDE provides end-to-end encryption for traffic between specific endpoints, regardless of intermediate hops. Traffic is identified by stream ID and encrypted/decrypted only at endpoints.

Selective IDE Architecture

    ┌─────────┐                              ┌─────────┐
    │  Host   │     ┌────────┐               │ Device  │
    │  TEE    │─────│ Switch │───────────────│  (VF)   │
    │         │     │        │               │         │
    └────┬────┘     └────────┘               └────┬────┘
         │                                        │
         │   Encrypt                    Decrypt   │
         │◄─────────────────────────────────────►│
         │         (End-to-End IDE)               │
         │                                        │
         │  Switch forwards encrypted TLPs       │
         │  without decryption                   │

Selective IDE Streams

5. IDE Encryption Details

Algorithm: AES-GCM

IDE TLP Format

    IDE-Protected TLP Structure:
    
    ┌──────────────────────────────────────────────────────────┐
    │                    TLP Header                             │
    │               (Modified for IDE)                          │
    ├──────────────────────────────────────────────────────────┤
    │                  Encrypted Payload                        │
    │              (AES-256-GCM ciphertext)                    │
    ├──────────────────────────────────────────────────────────┤
    │                      MAC Tag                              │
    │                    (12 bytes)                             │
    └──────────────────────────────────────────────────────────┘
    
    MAC covers: Header (AAD) + Encrypted payload

Replay Protection

6. SPDM Key Establishment

What is SPDM?

SPDM (Security Protocol and Data Model) is a DMTF standard for device authentication and key exchange. PCIe IDE uses SPDM for secure key establishment.

SPDM Flow

  1. GET_VERSION: Negotiate SPDM version
  2. GET_CAPABILITIES: Exchange capabilities
  3. NEGOTIATE_ALGORITHMS: Agree on crypto algorithms
  4. GET_DIGESTS: Get certificate chain digest
  5. GET_CERTIFICATE: Retrieve device certificate
  6. CHALLENGE: Authenticate device
  7. KEY_EXCHANGE: Establish session key
  8. FINISH: Complete handshake

Key Hierarchy

    Root Key (Device Certificate)
         │
         ▼
    Session Key (SPDM KEY_EXCHANGE)
         │
         ▼
    IDE Key (derived for IDE encryption)
         │
         ├──► TX Key (transmit direction)
         │
         └──► RX Key (receive direction)

7. TDISP (TEE Device Interface Security Protocol)

What is TDISP?

TDISP extends IDE to support Trusted Execution Environment (TEE) device assignment, enabling secure attachment of devices to confidential VMs (CVMs).

TDISP States

State Description
CONFIG_UNLOCKED Device configuration accessible
CONFIG_LOCKED Configuration locked for TEE use
RUN Device operational, IDE active
ERROR Security error occurred

TDISP + IDE Flow

  1. VMM assigns device to CVM
  2. SPDM authentication and key exchange
  3. TDISP locks device configuration
  4. Selective IDE stream established
  5. CVM accesses device via encrypted path
  6. VMM cannot snoop CVM-device traffic

8. IDE Extended Capability

Offset Register
00h Extended Capability Header (ID = 0030h)
04h IDE Capability
08h IDE Control
0Ch+ Stream Registers (per stream)

Key Capability Fields

9. System Configuration

Enabling Link IDE

  1. Verify Link IDE support on both ports
  2. Perform SPDM authentication
  3. Establish session and derive keys
  4. Program IDE keys into hardware
  5. Enable Link IDE in control register
  6. Send IDE_SYNC message to synchronize

Enabling Selective IDE

  1. Verify Selective IDE support
  2. Allocate Stream ID
  3. SPDM authentication with endpoint
  4. Configure stream routing at switches
  5. Program per-stream keys
  6. Enable stream
Performance Consideration

IDE encryption/decryption adds latency (~10-30ns) and may impact throughput. Hardware acceleration (AES-NI equivalent in device) minimizes overhead.