# US 2024/0405967 A1 · Reshaping data structures for homomorphic computations using multiplication by identity elements

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

- Number: US 2024/0405967 A1
- Document ID: US20240405967A1
- Status: Published application
- Kind: A1
- Application number: 18/328,994
- Filed: 2023-06-05
- Published: 2024-12-05
- Earliest claimed: 2023-06-05
- Assignees: International Business Machines Corporation
- Applicants: International Business Machines Corporation
- Inventors: Nir DRUCKER; Ehud AHARONI; Gilad EZOV; Hayim SHAUL
- Web page: https://patentgrep.com/patent/US20240405967A1

## CPC

- H04L 9/008: {involving homomorphic encryption}
- H04L 9/0618: {Block ciphers, i.e. encrypting groups of characters of a plain text message using fixed encryption transformation}
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)

## Abstract

An example system includes a processor to receive a ciphertext including an encrypted packed plaintext. The processor can, in response to detecting that a reshape is to be executed for a data structure including the packed ciphertext, identify a target shape for the data structure and execute the reshape based on the identified target shape. The reshape is executed using multiplication by an identity element. The processor can then execute a homomorphic computation using the reshaped data structure.

## Claims

### Claim 1

A system, comprising a processor to:
receive a ciphertext comprising an encrypted packed plaintext;
in response to detecting that a reshape is to be executed for a data structure containing the packed plaintext, identify a target shape for the data structure and execute the reshape based on the identified target shape, wherein the reshape is executed using multiplication by an identity element; and
execute a homomorphic computation using the reshaped data structure.

### Claim 2 (depends on 1)

The system of claim 1, wherein the processor is to execute the reshape to transpose the data structure.

### Claim 3 (depends on 1)

The system of claim 1, wherein the processor is to execute a simulation to determine whether to reshape the data structure using the identity element or a general reshape operation.

### Claim 4 (depends on 1)

The system of claim 1, wherein the homomorphic computation comprises a multiplication of a vector and a matrix.

### Claim 5 (depends on 1)

The system of claim 1, wherein the reshape is done by a multiplication with some element other than the identity element, where the results of the multiplication is a modification of data contained in the data structure.

### Claim 6 (depends on 1)

The system of claim 1, wherein the data structure comprises a tile tensor.

### Claim 7 (depends on 1)

The system of claim 1, wherein the ciphertext is encrypted using fully homomorphic encryption.

### Claim 8 (depends on 1)

The system of claim 1, wherein the identity element comprises an identity matrix.

### Claim 9 (depends on 1)

The system of claim 1, wherein the reshape comprises a plurality of multiplications by the identity element.

### Claim 10

A computer-implemented method, comprising:
receiving, via a processor, a ciphertext comprising an encrypted packed plaintext;
identifying, via the processor, in response to detecting that a reshape is to be executed for a data structure containing the packed plaintext, a target shape for the data structure and executing the reshape based on the identified target shape, wherein executing the comprises multiplying the data structure by an identity element; and
executing, via the processor, a homomorphic computation using the reshaped data structure.

### Claim 11 (depends on 10)

The computer-implemented method of claim 10, wherein the reshape comprises a plurality of multiplications by the identity element.

### Claim 12 (depends on 10)

The computer-implemented method of claim 10, wherein the reshape further comprises a permutation.

### Claim 13 (depends on 10)

The computer-implemented method of claim 10, wherein the homomorphic computation comprises a multiplication of matrices.

### Claim 14 (depends on 10)

The computer-implemented method of claim 10, wherein the homomorphic computation comprises a multiplication of a vector and a matrix.

### Claim 15 (depends on 10)

The computer-implemented method of claim 10, comprising executing, via the processor, a simulation to determine whether to reshape the data structure using the identity matrix or a general reshape operation.

### Claim 16

A computer program product for homomorphic computation, the computer program product comprising a computer-readable storage medium having program code embodied therewith, the program code executable by a processor to cause the processor to:
receive a ciphertext comprising an encrypted packed plaintext;
in response to detecting that a reshape is to be executed for a data structure containing the packed plaintext, identify a target shape for the data structure and execute the reshape based on the identified target shape, wherein the reshape is executed using multiplication by an identity element; and
execute a homomorphic computation using the reshaped data structure.

### Claim 17 (depends on 16)

The computer program product of claim 16, further comprising program code executable by the processor to execute a plurality of reshapes on the data structure to reshape the reshaped data structure into the target shape.

### Claim 18 (depends on 16)

The computer program product of claim 16, further comprising program code executable by the processor to permute the data structure using the identity element, wherein the identity element is combined with a permutation element.

### Claim 19 (depends on 16)

The computer program product of claim 16, further comprising program code executable by the processor to execute a matrix multiplication by an identity matrix to reshape the data structure.

### Claim 20 (depends on 16)

The computer program product of claim 16, further comprising program code executable by the processor to execute a simulation to determine whether to reshape the data structure using the identity matrix or a general reshape operation.
