# US 2021/0286901 A1 · Batch Cryptography For Hardware Security Modules

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

- Number: US 2021/0286901 A1
- Document ID: US20210286901A1
- Status: Published application
- Kind: A1
- Application number: 17/119,342
- Filed: 2020-12-11
- Published: 2021-09-16
- Earliest claimed: 2020-03-10
- Assignees: Google Inc.
- Applicants: Google LLC
- Inventors: Aditya Sinha; Vanessa Reimer
- Web page: https://patentgrep.com/patent/US20210286901A1

## CPC

- G06F 21/72: in cryptographic circuits
- G06F 9/547: {Remote procedure calls [RPC]; Web services}
- G06F 13/4063: {Device-to-bus coupling}
- G06F 21/602: {Providing cryptographic facilities or services}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Methods, systems, and apparatuses, including computer storage media and hardware security modules, for performing batch cryptography on hardware security modules. A hardware security module can receive a request to perform one or more cryptographic operations. The request can include a batch data structure storing a plurality of data elements. The hardware security module can unbatch the plurality of data elements, perform one or more cryptographic operations on the plurality of data elements to generate a plurality of outputs, generate an output batch data structure storing the plurality of outputs, and transmit the output batch data structure in response to the request. The request and the batch data structure can be formed in accordance with a batch hardware security module application program interface (API) implemented by the hardware security module.

## Claims

### Claim 1

A hardware security module (HSM), comprising a plurality of processors configured to:
receive a request to perform one or more cryptographic operations, wherein the request comprises a first batch data structure storing a plurality of data elements; and
process the first batch data structure in accordance with the received request and the one or more cryptographic operations, wherein to process the first batch data structure the plurality of processors are configured to:
unbatch the plurality of data elements,
perform the one or more cryptographic operations on the plurality of data elements to generate a plurality of outputs, and
generate an output batch data structure storing the plurality of outputs.

### Claim 2 (depends on 1)

The hardware security module of claim 1,
wherein the request is a first request, the one or more cryptographic operations are one or more first cryptographic operations, and the plurality of data elements are a plurality of first data elements, and
wherein the plurality of processors are further configured to:
maintain, in memory coupled to the HSM, one or more cryptographic keys,
receive a second request to perform one or more second cryptographic operations on a second batch data structure, wherein the second batch data structure comprises a key identifier and a plurality of second data elements,
determine whether the key identifier corresponds to a cryptographic key of the one or more cryptographic keys, and
in response to a determination that the key identifier corresponds to an identified cryptographic key, process the second batch data structure in accordance with the second request and use the identified cryptographic key as input to the one or more second cryptographic operations.

### Claim 3 (depends on 1)

The hardware security module of claim 1, wherein the plurality of processors comprise a first processor and a second processor, wherein the first processor is configured to:
receive, as input, the batch data structure,
perform one or more pre-processing operations on the batch data structure,
determine whether the batch data structure is valid for processing, and
in response to a determination that the batch data structure is valid for processing, send the validated batch data structure to the second processor.

### Claim 4 (depends on 3)

The hardware security module of claim 3, wherein the first processor is a general-purpose processor and the second processor is a cryptoprocessor configured to perform the one or more cryptographic operations on the pre-processed batch data structure.

### Claim 5 (depends on 1)

The hardware security module of claim 1, wherein the request and the batch data structure are formed in accordance with a respective definition by a batch HSM application program interface (API).

### Claim 6 (depends on 5)

The hardware security module of claim 5, wherein the one or more cryptographic operations the HSM is configured to perform are defined in accordance with the batch HSM API.

### Claim 7 (depends on 5)

The hardware security module of claim 5, wherein the batch HSM API defines one or more APIs, each API defining a respective cryptographic scheme, comprising defining one or more respective data structures and one or more respective cryptographic operations for performing the respective cryptographic scheme.

### Claim 8 (depends on 7)

The hardware security module of claim 7, wherein the respective cryptographic operations comprise operations for encryption, decryption, key generation, signature generation, signature verification, random number generation, or message authentication.

### Claim 9 (depends on 1)

The hardware security module of claim 1,
wherein the request is a first request,
wherein the HSM is coupled to a computing device, and
wherein the plurality of processors are further configured to receive and process a second request comprising a second batch data structure comprising data elements batched by the computing device.

### Claim 10

A system comprising:
a computing device comprising a plurality of processors and coupled to a hardware security module, wherein the plurality of processors are configured to:
receive a plurality of requests to perform one or more cryptographic operations in one or more respective data elements of each request,
batch the one or more respective data elements of each request into a first batch data structure,
send, to the hardware security module, the first batch data structure as part of a batch request to perform the one or more cryptographic operations on first data elements of the first batch data structure, and
receive, in response to the batch request, an output batch data structure comprising output data elements generated as output by the hardware security module performing the one or more cryptographic operations on the data elements of the first batch data structure.

### Claim 11 (depends on 10)

The system of claim 10,
wherein each of the plurality of requests corresponds to a first key identifier, and wherein the batch request further comprises the first key identifier.

### Claim 12 (depends on 11)

The system of claim 11,
wherein the computing device is a first computing device, and wherein the plurality of processors are further configured to:
receive requests from one or more requesting computing devices coupled to the computing device, wherein each request of the received requests from the one or more requesting computing devices is a request to perform one or more respective cryptographic operations and comprises a respective key identifier;
store data elements for similar received requests in a first buffer of one or more buffers in memory coupled to the computing device, wherein two requests are similar if each of the two requests comprises the same key identifier or are obtained from a same source device;
determine whether the first buffer meets one or more conditions for sending data elements of similar received requests stored in the first buffer to the hardware security module; and
in response to the determination that the first buffer meets the one or more conditions, batch each data element in the first buffer and send a batch data structure comprising each data element in the first buffer as part of a second request to the hardware security module.

### Claim 13 (depends on 12)

The system of claim 12, wherein the plurality of processors are further configured to:
for each unique key identifier received as part of the requests received from the one or more requesting computing devices, assign the unique key identifier to a respective buffer, and
store data elements corresponding to a received request comprising a first key identifier in a buffer assigned the first key identifier.

### Claim 14 (depends on 12)

The system of claim 12, wherein the one or more conditions for sending data elements in the first buffer comprise meeting a predetermined maximum age for a data element stored in the first buffer, wherein the age for a data element is measured from the time the data element is stored in the first buffer to the current time.

### Claim 15 (depends on 12)

The system of claim 12, wherein the one or more conditions for sending data elements in the first buffer comprise meeting a predetermined maximum number of data elements stored in the first buffer.

### Claim 16 (depends on 10)

The system of claim 10, wherein the requests from the one or more requesting computing devices and the first batch data structure are formed in accordance with a batch HSM application program interface (API).

### Claim 17 (depends on 16)

The system of claim 16, wherein the one or more cryptographic operations are defined in accordance with the batch HSM API.

### Claim 18 (depends on 16)

The system of claim 16, wherein the batch HSM API defines one or more APIs, each API defining a respective cryptographic scheme, comprising defining one or more respective data structures and one or more respective cryptographic operations for performing the respective cryptographic scheme.

### Claim 19

A computer-implemented method, comprising:
receiving, by a hardware security module, a request to perform one or more cryptographic operations, wherein the request comprises a first batch data structure storing a plurality of data elements; and
processing, by the hardware security module, the first batch data structure in accordance with the received request and the one or more cryptographic operations, wherein processing the first batch data structure comprises:
unbatching the plurality of data elements,
performing the one or more cryptographic operations on the plurality of data elements to generate a plurality of outputs, and
generating an output batch data structure storing the plurality of outputs.

### Claim 20 (depends on 19)

The method of claim 19, wherein the one or more cryptographic operations comprise operations for encryption, decryption, key generation, signature generation, signature verification, random number generation, or message authentication.
