# US 2023/0409492 A1 · Method, apparatus, and system for storing memory encryption realm key ids

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2023/0409492 A1
- Document ID: US20230409492A1
- Status: Published application
- Kind: A1
- Application number: 18/456,683
- Filed: 2023-08-28
- Published: 2023-12-21
- Earliest claimed: 2018-01-09
- Assignees: QUALCOMM Incorporated
- Applicants: QUALCOMM Incorporated
- Inventors: Darren Lasko; Roberto Avanzi; Thomas Philip Speier; Harb Abdulhamid; Vikramjit Sethi
- Web page: https://patentgrep.com/patent/US20230409492A1

## CPC

- G06F 12/1408: {by using cryptography (for digital transmission H04L9/00)}
- H04L 9/0894: {Escrow, recovery or storing of secret information, e.g. secret key escrow or cryptographic key storage}
- G06F 12/1045: associated with a data cache
- G06F 12/1441: {for a range}
- G06F 12/1466: {Key-lock mechanism}
- G06F 21/602: {Providing cryptographic facilities or services}
- G06F 21/72: in cryptographic circuits
- H04L 9/0643: {Hash functions, e.g. MD5, SHA, HMAC or f9 MAC}
- H04L 9/14: using a plurality of keys or algorithms
- H04L 9/3239: {involving non-keyed hash functions, e.g. modification detection codes [MDCs], MD5, SHA or RIPEMD}
- G06F 9/45558: {Hypervisor-specific management and integration aspects}
- G06F 2009/45583: {Memory management, e.g. access or allocation}
- G06F 2009/45587: {Isolation or security of virtual machine instances}
- G06F 2212/1041: Resource optimization
- G06F 2212/1052: Security improvement
- G06F 2212/402: Encrypted data
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)

## Abstract

A method, apparatus, and system for storing memory encryption realm key IDs is disclosed. A method comprises accessing a memory ownership table with a physical address to determine a realm ID associated with the physical address, accessing a key ID association structure with the realm ID to determine a realm key IS associated with the realm ID, and initiating a memory transaction based on the realm key ID. Once retrieved, the realm key ID may be stored in a translation lookaside buffer.

## Claims

### Claim 1

A method comprising:
accessing a memory ownership table with a physical address to determine a realm ID associated with the physical address;
accessing a key ID association structure with the realm ID to determine a realm key ID associated with the realm ID; and
initiating a memory transaction based on the realm key ID.

### Claim 2 (depends on 1)

The method of claim 1, further comprising caching the realm key ID in a translation lookaside buffer.

### Claim 3 (depends on 1)

The method of claim 1, further comprising caching the realm key ID in a key association cache.

### Claim 4 (depends on 1)

The method of claim 1, wherein the key ID association structure is a hash table indexed by a current hash function, and wherein accessing the key ID association structure with the realm ID comprises hashing with the current hash function based on the realm ID.

### Claim 5 (depends on 4)

The method of claim 4, wherein the key ID association structure is further indexed by a second current hash function, and wherein accessing the key ID association structure with the realm ID comprises hashing with the current hash function based on the realm ID, and if a collision is detected, hashing with the second current hash function based on the realm ID.

### Claim 6 (depends on 4)

The method of claim 4, further comprising, in response to detecting that a number of collisions in an entry of the key ID association table has exceeded a threshold, establishing a scratch key ID association table having a scratch hash function different from the current hash function.

### Claim 7 (depends on 6)

The method of claim 6, wherein the threshold of the number of collisions is programmable.

### Claim 8 (depends on 6)

The method of claim 6, further comprising:
evaluating the scratch hash function for collisions; and
replacing the current hash function of the key ID association table with the scratch hash function if the number of collisions is below a second threshold; or
selecting a new scratch hash function different from the current hash function and repeating the evaluation if the number of collisions is not below a second threshold.

### Claim 9

A non-transitory computer-readable medium comprising instructions which, when executed by a processor, cause the processor to:
access a memory ownership table with a physical address to determine a realm ID associated with the physical address;
access a key ID association structure with the realm ID to determine a realm key ID associated with the realm ID; and
initiate a memory transaction based on the realm key ID.
