# US 2024/0004801 A1 · Data encryption suitable for use in systems with processing-in-memory

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

- Number: US 2024/0004801 A1
- Document ID: US20240004801A1
- Status: Published application
- Kind: A1
- Application number: 17/853,340
- Filed: 2022-06-29
- Published: 2024-01-04
- Earliest claimed: 2022-06-29
- Assignees: Advanced Micro Devices, Inc.
- Applicants: Advanced Micro Devices, Inc.
- Inventors: Nuwan Jayasena; Shaizeen Dilawarhusen Aga; Vignesh Adhinarayanan
- Web page: https://patentgrep.com/patent/US20240004801A1

## CPC

- G06F 21/72: in cryptographic circuits
- G06F 9/30029: {Logical and Boolean instructions, e.g. XOR, NOT}
- G06F 9/3004: {to perform operations on memory}
- G06F 12/1408: {by using cryptography (for digital transmission H04L9/00)}
- G06F 21/79: in semiconductor storage media, e.g. directly-addressable memories
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

An encryption circuit includes an iterative block cipher circuit. The iterative block cipher circuit has a counter input for a row index, a key input for receiving a secret key, and an output for providing an encrypted counter value in response to performing a block cipher process using the row index as a counter the secret key. The encryption circuit uses the iterative block cipher circuit during a row operation to a memory.

## Claims

### Claim 1

An encryption circuit, comprising:
an iterative block cipher circuit having a counter input for a row index, a key input for receiving a secret key, and an output for providing an encrypted counter value in response to performing a block cipher process using said row index as a counter and said secret key; and
wherein the encryption circuit uses said iterative block cipher circuit during a row operation to a memory.

### Claim 2 (depends on 1)

The encryption circuit of claim 1, wherein the encryption circuit further comprises:
a data encryption/decryption circuit responsive to said encrypted counter value for encrypting a data element of a memory access using said encrypted counter value,
wherein the encryption circuit uses said data encryption/decryption circuit (440) during a column operation to the memory.

### Claim 3 (depends on 2)

The encryption circuit of claim 2, wherein said data encryption/decryption circuit comprises:
a plurality of exclusive-OR gates having first inputs for receiving a corresponding bit of said encrypted counter value, a second input for receiving a data value, and an output for providing a modified data value,
wherein during an encryption operation, said data value is plaintext and said modified data value is encrypted, and during a during a decryption operation, said data value is encrypted and said modified data value is plaintext.

### Claim 4 (depends on 1)

The encryption circuit of claim 1, further comprising:
an adjustment circuit for adjusting said encrypted counter value to another width according to a deterministic algorithm, wherein the other width is a width of a data access during column command.

### Claim 5 (depends on 1)

The encryption circuit of claim 1, wherein said iterative block cipher circuit uses said secret key and a key fragment provided by one of a host processor and an associated processor-in-memory to generate a second key, and uses said second key to perform said block cipher process.

### Claim 6

A data processing system comprising:
a host processor;
a memory coupled to said host processor;
a processor-in-memory coupled to said memory,
wherein each of said host processor and said processor-in-memory comprises an encryption circuit comprising:
an iterative block cipher circuit having a counter input for a row index, a key input for receiving a secret key, and an output for providing an encrypted counter value in response to performing a block cipher process using said row index as a counter and said secret key; and
wherein said encryption circuit uses said iterative block cipher circuit during a row operation to a memory.

### Claim 7 (depends on 6)

The data processing system of claim 6, wherein the encryption circuit further comprises:
a data encryption/decryption circuit responsive to said encrypted counter value for encrypting a data element of a memory access using said encrypted counter value,
wherein the encryption circuit uses said data encryption/decryption circuit (440) during a column operation to the memory.

### Claim 8 (depends on 7)

The data processing system of claim 7, wherein said data encryption/decryption circuit comprises:
a plurality of exclusive-OR gates having first inputs for receiving a corresponding bit of said encrypted counter value, a second input for receiving a data value, and an output for providing a modified data value,
wherein during an encryption operation, said data value is plaintext and said modified data value is encrypted, and during a during a decryption operation, said data value is encrypted and said modified data value is plaintext.

### Claim 9 (depends on 6)

The data processing system of claim 6, further comprising:
an adjustment circuit for adjusting said encrypted counter value to another width according to a deterministic algorithm, wherein the other width is a width of data of a data access during a column access command.

### Claim 10 (depends on 6)

The data processing system of claim 6, wherein said encryption circuit is part of the host processor and the host processor further comprises:
an address decoder circuit having an input for receiving an address of a memory access, and an output for providing said row index, said address decoder circuit generating said row index from a row address portion of said address of said memory access using configuration information.

### Claim 11 (depends on 10)

The data processing system of claim 10, wherein said address decoder circuit comprises:
a memory configuration decoder having an input for receiving said address of said memory access, and an output for providing a preliminary row index; and
a deterministic function circuit having an input coupled to said output of said memory configuration decoder, and an output for providing said row index.

### Claim 12 (depends on 6)

The data processing system of claim 6, wherein said iterative block cipher circuit uses said secret key and a key fragment provided by one of said host processor and said processor-in-memory to generate a second key, and uses said second key to perform said block cipher process.

### Claim 13

A method for securely storing data in a memory, comprising:
generating a memory access request;
if a memory row of said memory access request is not open:
opening said memory row in the memory;
generating an encrypted value based on an index of said memory row and a secret key;
thereafter:
encrypting data of said memory access request using said encrypted value if said memory access request is a write command; and
decrypting data of said memory access request using said encrypted value if said memory access request is a read command.

### Claim 14 (depends on 13)

The method of claim 13, wherein generating said encrypted value comprises:
generating said encrypted value using an iterative algorithm performed over a plurality of clock cycles.

### Claim 15 (depends on 13)

The method of claim 13, wherein:
opening said memory row in the memory comprises sending an activate command with a row index to the memory.

### Claim 16 (depends on 15)

The method of claim 15, generating said encrypted value further comprises:
using an iterative block cipher in counter mode.

### Claim 17 (depends on 16)

The method of claim 16, wherein said using said iterative block cipher in said counter mode comprises:
forming an initial counter value in response to said row index; and
generating said encrypted value using said secret key in response to said forming.

### Claim 18 (depends on 17)

The method of claim 17, wherein said forming comprises:
forming said initial counter value in response to said row index modified by a deterministic logic function.

### Claim 19 (depends on 13)

The method of claim 13, wherein said encrypting said data comprises:
changing said data to encrypted data by performing a bit-by-bit exclusive-OR operation on bits of data with corresponding bits of said encrypted value.

### Claim 20 (depends on 13)

The method of claim 13, wherein said generating said encrypted value comprises:
adjusting said encrypted value to another width according to a deterministic algorithm.
