Encrypted Branch Prediction Table for Microprocessor Security

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Modern microprocessors' branch prediction tables are susceptible to malicious attacks, allowing unauthorized access to sensitive data through manipulation of branch prediction information, which existing security measures fail to detect effectively.

Innovation Solution

Incorporating a security tag field into branch prediction tables to store machine context information and encrypting branch prediction information using a cipher that performs multiple XOR operations and cipher rounds in parallel, ensuring valid access and preventing unauthorized updates.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If branch prediction information is stored in plain text in branch prediction tables, then access and processing is fast and simple, but the system becomes vulnerable to malicious attacks and unauthorized access to sensitive data

Engineering Contradiction:
ImprovesecurityVSAvoidcomplexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent applies preliminary action by encrypting branch prediction information before it is stored in the branch prediction table. The encryption operation is performed in advance on the target address and direction information, so that when a branch prediction occurs, the encrypted data is already in place and can be quickly decrypted and used, minimizing the impact on performance while maintaining security

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent introduces encryption and decryption operations as intermediary steps between the branch prediction table and the branch execution logic. These intermediary cryptographic operations protect the sensitive branch prediction information while still allowing legitimate access through proper decryption, thus adding a security layer without completely blocking the functional path

Inventive Principle:
Principle #24Intermediary (Mediator)

2Reliability

If encryption operations are performed on branch prediction information, then security is enhanced, but processing time and latency increase

Engineering Contradiction:
ImprovesecurityVSAvoidlatency
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The encryption is performed preliminarily when the branch prediction information is first generated or updated in the branch prediction table, rather than at the moment of prediction. This allows the encrypted data to be pre-prepared and stored, so that during actual branch prediction, only decryption is needed, reducing the time penalty

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent applies encryption selectively to specific fields in the branch prediction table (such as target address and direction information) rather than encrypting the entire table structure. This localized approach minimizes the amount of data that needs to be encrypted and decrypted, reducing the overall time overhead while still protecting the critical sensitive information

Inventive Principle:
Principle #3Local quality

3Reliability

If security tag fields are added to store machine context information, then unauthorized access is prevented, but the table structure and access complexity increase

Engineering Contradiction:
ImprovesecurityVSAvoidstructure
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent merges the security tag field with the existing branch prediction table structure by storing the machine context information in the same table entries alongside the encrypted branch prediction information. This combining approach allows security verification to occur within the existing table access framework, avoiding the need for completely separate security data structures

Inventive Principle:
Principle #5Merging (Combining)

Solution Approach 2:

The branch prediction table entries are designed to serve multiple functions: storing encrypted target address information, storing direction information, and storing machine context security tags. This multi-functionality allows a single data structure to handle both the predictive functionality and security verification, reducing the need for additional separate structures

Inventive Principle:
Principle #6Universality (Multi-functionality)

Data Source

PatentUS11995446B2Branch predictor storing encrypted information
Publication Date: 2024.05.28 APPLE INC
  • US11995446B2 patent drawing
  • US11995446B2 patent drawing
  • US11995446B2 patent drawing

AI summary

Techniques are disclosed relating to protecting branch prediction information. In various embodiments, an integrated circuit includes branch prediction logic having a table that maintains a plurality of entries storing encrypted target address information for branch instructions. The branch prediction logic is configured to receive machine context information for a branch instruction having a target address being predicted by the branch prediction logic, the machine context information including a program counter associated with the branch instruction. The branch prediction logic is configured to use the machine context information to decrypt encrypted target address information stored in one of the plurality of entries identified based on the program counter. In some embodiments, the branch prediction logic decrypts the encrypted target address information by performing a cipher to encrypt the machine context information and performing a Boolean exclusive-OR operation of the encrypted machine context information and the encrypted target address information.