# US 2020/0396229 A1 · Hardware security module systems and methods

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

- Number: US 2020/0396229 A1
- Document ID: US20200396229A1
- Status: Published application
- Kind: A1
- Application number: 17/005,533
- Filed: 2020-08-28
- Published: 2020-12-17
- Earliest claimed: 2018-02-06
- Assignees: AO Kaspersky Lab
- Applicants: Ao Kaspersky Lab
- Inventors: Dmitry A. Kulagin; Pavel V. Dyakin
- Web page: https://patentgrep.com/patent/US20200396229A1

## CPC

- H04L 63/123: {received data contents, e.g. message integrity}
- G06F 11/3476: {Data logging (G06F11/14, G06F11/2205 take precedence)}
- G06F 21/64: Protecting data integrity, e.g. using checksums, certificates or signatures
- G06F 21/86: Secure or tamper-resistant housings
- H04L 9/0643: {Hash functions, e.g. MD5, SHA, HMAC or f9 MAC}
- H04L 9/0877: {using additional device, e.g. trusted platform module [TPM], smartcard, USB or hardware security module [HSM]}
- H04L 9/3242: {involving keyed hash functions, e.g. message authentication codes [MACs], CBC-MAC or HMAC}
- H04L 63/12: {Applying verification of the received information (cryptographic mechanisms or cryptographic arrangements for data integrity or data verification H04L9/32)}
- G06F 2221/2107: File encryption
- H04L 9/50: {using hash chains, e.g. blockchains or hash trees}
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Systems and methods for ensuring data security. A MAC is computed sequentially for each selected message from a data log that contains at least two messages. To build a data block, a preset encryption key is used for a first message and an encryption key for the previous message is used for subsequent messages. A determination that the data log is compromised can be made based on MAC data block data and an independent calculation of a MAC.

## Claims

### Claim at position 1

1-20. (canceled)

### Claim 21

A system for detecting compromised data, the system comprising:
at least one processor and a memory operably coupled to the at least one processor; and
instructions that, when executed on the at least one processor, cause the at least one processor to implement:
an encryption key building tool configured to—
provide a Hardware Security Module (HSM) to physically protect the encryption key building tool from tampering,
build an initial pre-shared key during creation of the HSM, the initial pre-shared key based on at least one characteristic of the HSM,
build an encryption key based on a previously-built key, wherein a first instance of the encryption key is based on the initial pre-shared key, and
provide the encryption key to a message authentication code (MAC) computing tool.

### Claim 22 (depends on 21)

The system of claim 21, wherein the HSM is configured to provide real-time data as the at least one characteristic of the HSM and the encryption key building tool is further configured to build the initial pre-shared key based on the real-time data provided by the HSM.

### Claim 23 (depends on 22)

The system of claim 22, wherein the HSM includes:
a real-time clock configured to generate a current time, wherein the real-time data provided by the HSM is the current time.

### Claim 24 (depends on 23)

The system of claim 23, wherein the encryption key building tool utilizes the current time to build the initial pre-shared key such that an attacker is unable to assign data log records earlier than the current time.

### Claim 25 (depends on 21)

The system of claim 21, wherein the instructions that, when executed on the at least one processor, cause the at least one processor to further implement:
the MAC computing tool, the MAC computing tool configured to—
receive the encryption key from the encryption key building tool;
intercept a first message;
generate a MAC for the first message using the initial pre-shared key and the first message, the initial pre-shared key being shared with the MAC computing tool prior to intercepting the first message;
intercept a second message;
build a data block including the second message and the MAC generated for the first message;
generate a MAC for the second message based on the encryption key and the data block built for the second message; and
write a record to a data log, the record including the first message and the second message and the MAC generated for the second message.

### Claim 26 (depends on 25)

The system of claim 25, wherein the HSM is configured to generate a current time and a new initial preset key based on the current time, and the MAC computing tool is further configured to evaluate the new initial preset key for validity against the current time.

### Claim 27 (depends on 25)

The system of claim 25, wherein the HSM is configured to generate a current time and the initial pre-shared key based on the current time, and the MAC computing tool is further configured to restore the initial pre-shared key using the current time.

### Claim 28 (depends on 27)

The system of claim 27, wherein the MAC computing tool is further configured to evaluate the current time for validity against the restored initial pre-shared key.

### Claim 29 (depends on 25)

The system of claim 25, wherein the instructions that, when executed on the at least one processor, cause the at least one processor to further implement:
a check tool configured to—
generate an expected MAC using the initial pre-shared key and the record;
determine whether the MAC for the second message in the record matches the expected MAC; and
indicate data is compromised when MAC for the second message in the record does not match the expected MAC.

### Claim 30

A method for detecting compromised data, the method comprising:
providing a Hardware Security Module (HSM) to physically protect an encryption key building tool from tampering;
building an initial pre-shared key during creation of the HSM, the initial pre-shared key based on at least one characteristic of the HSM; and
building an encryption key based on a previously-built key, wherein a first instance of the encryption key is based on the initial pre-shared key.

### Claim 31 (depends on 30)

The method of claim 30, wherein the HSM is configured to provide real-time data as the at least one characteristic of the HSM, the method further comprising:
building the initial pre-shared key based on the real-time data provided by the HSM.

### Claim 32 (depends on 31)

The method of claim 31, wherein the HSM includes a real-time clock configured to generate a current time, wherein the real-time data provided by the HSM is the current time.

### Claim 33 (depends on 32)

The method of claim 32, further comprising:
utilizing the current time to build the initial pre-shared key such that an attacker is unable to assign data log records earlier than the current time.

### Claim 34 (depends on 30)

The method of claim 30, further comprising:
intercepting a first message;
generating a MAC for the first message using the initial pre-shared key and the first message;
intercepting a second message;
building a data block including the second message and the MAC generated for the first message;
generating a MAC for the second message based on the encryption key and the data block built for the second message; and
writing a record to a data log, the record including the first message and the second message and the MAC generated for the second message.

### Claim 35 (depends on 34)

The method of claim 34, wherein the HSM is configured to generate a current time and a new initial preset key based on the current time, the method further comprising:
evaluating the new initial preset key for validity against the current time.

### Claim 36 (depends on 34)

The method of claim 34, wherein the HSM is configured to generate a current time and the initial pre-shared key based on the current time, the method further comprising:
restoring the initial pre-shared key using the current time.

### Claim 37 (depends on 36)

The method of claim 36, further comprising:
evaluating the current time for validity against the restored initial pre-shared key.

### Claim 38 (depends on 34)

The method of claim 34, further comprising:
generating an expected MAC using the initial pre-shared key and the record;
determining whether the MAC for the second message in the record matches the expected MAC; and
indicating data is compromised when MAC for the second message in the record does not match the expected MAC.
