# US 2021/0281392 A1 · Consistent ciphertext creation

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

- Number: US 2021/0281392 A1
- Document ID: US20210281392A1
- Status: Published application
- Kind: A1
- Application number: 16/812,494
- Filed: 2020-03-09
- Published: 2021-09-09
- Earliest claimed: 2020-03-09
- Assignees: International Business Machines Corporation
- Applicants: International Business Machines Corporation
- Inventors: Anthony Thomas Sofia; Jason Katonica
- Web page: https://patentgrep.com/patent/US20210281392A1

## CPC

- H04L 9/0618: {Block ciphers, i.e. encrypting groups of characters of a plain text message using fixed encryption transformation}
- H04L 9/0631: {Substitution permutation network [SPN], i.e. cipher composed of a number of stages or rounds each involving linear and nonlinear transformations, e.g. AES algorithms}
- H04L 9/0637: {Modes of operation, e.g. cipher block chaining [CBC], electronic codebook [ECB] or Galois/counter mode [GCM]}
- H04L 9/0861: {Generation of secret information including derivation or calculation of cryptographic keys or passwords}
- H04L 9/0894: {Escrow, recovery or storing of secret information, e.g. secret key escrow or cryptographic key storage}
- H04L 9/3242: {involving keyed hash functions, e.g. message authentication codes [MACs], CBC-MAC or HMAC}
- H04L 63/0428: {wherein the data content is protected, e.g. by encrypting or encapsulating the payload}
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)

## Abstract

Aspects of the invention include receiving, by a processor, an unencrypted object that includes plaintext and metadata that describes the plaintext. A data encryption key (DEK) and a nonce key for the unencrypted object are obtained by the processor. The nonce key is different than the DEK. The unencrypted object is encrypted by the processor. The encrypting includes generating a nonce based at least in part of the plaintext and the nonce key. The encrypting also includes generating ciphertext and a metadata authentication tag that includes a signature of the metadata. The generating is based at least in part on the plaintext, the metadata, the DEK, and the nonce. An encrypted object that includes the ciphertext, the metadata, and the metadata authentication tag is created.

## Claims

### Claim 1

A method comprising:
receiving, by a processor, an unencrypted object that comprises plaintext and metadata that describes the plaintext;
obtaining, by the processor, a data encryption key (DEK) and a nonce key for the unencrypted object, the nonce key different than the DEK;
encrypting, by the processor, the unencrypted object, the encrypting comprising:
generating a nonce based at least in part of the plaintext and the nonce key; and
generating ciphertext and a metadata authentication tag comprising a signature of the metadata, the generating based at least in part on the plaintext, the metadata, the DEK, and the nonce; and
creating an encrypted object that includes the ciphertext, the metadata, and the metadata authentication tag.

### Claim 2 (depends on 1)

The method of claim 1, wherein the nonce is generated once, and in response to the encrypted object being created the nonce is linked to the encrypted object via a pointer to the nonce in the encrypted object or linked to the encrypted object via inclusion of the nonce in the encrypted object.

### Claim 3 (depends on 1)

The method of claim 1, wherein the generating the nonce comprises executing a nonce encryption algorithm that takes as input the plaintext and the nonce key, and that outputs the nonce.

### Claim 4 (depends on 3)

The method of claim 3, wherein the nonce encryption algorithm is an Advanced Encryption Standard with Cipher-based Message Authentication Code (AES-CMAC) encryption algorithm.

### Claim 5 (depends on 1)

The method of claim 1, wherein the nonce key is created and linked to the DEK in response to the DEK being created.

### Claim 6 (depends on 1)

The method of claim 1, wherein a plurality of nonce keys correspond to the DEK and the nonce key is included in the plurality of nonce keys.

### Claim 7 (depends on 1)

The method of claim 1, wherein the encrypting the unencrypted object is performed using an Advanced Encryption Standard with Galois/Counter Mode (AES-GCM) encryption algorithm.

### Claim 8 (depends on 1)

The method of claim 1, further comprising:
receiving, by the processor, a second ciphertext, the second ciphertext previously generated by encrypting a second plaintext based at least in part on the second plaintext, a second nonce, and a copy of the DEK;
comparing the second ciphertext to the ciphertext;
based on the second ciphertext matching the ciphertext, indicating that second plaintext matches the plaintext; and
based on the second ciphertext not matching the ciphertext, indicating that the second plaintext does not match the plaintext.

### Claim 9 (depends on 8)

The method of claim 8, wherein the second nonce matches the nonce when the second plaintext matches the plaintext.

### Claim 10 (depends on 8)

The method of claim 8, wherein the comparing includes a database join operation between a first column in a first database and a second column in a second database.

### Claim 11 (depends on 1)

The method of claim 1, further comprising decrypting, by the processor, the encrypted object, the decrypting comprising executing a decryption algorithm that receives as input the DEK, the ciphertext, the metadata authentication tag, the metadata, the object, and the nonce, and that outputs the plaintext, the metadata, and an indicator of metadata validity.

### Claim 12

A system comprising:
one or more processors for executing computer readable instructions, the computer readable instructions controlling the one or more processors to perform operations comprising:
receiving an unencrypted object that comprises plaintext and metadata that describes the plaintext;
obtaining a data encryption key (DEK) and a nonce key for the unencrypted object, the nonce key different than the DEK;
encrypting the unencrypted object, the encrypting comprising:
generating a nonce based at least in part of the plaintext and the nonce key; and
generating ciphertext and a metadata authentication tag comprising a signature of the metadata, the generating based at least in part on the plaintext, the metadata, the DEK, and the nonce; and
creating an encrypted object that includes the ciphertext, the metadata, and the metadata authentication tag.

### Claim 13 (depends on 12)

The system of claim 12, wherein the nonce is generated once and in response to the encrypted object being created the nonce is linked to the encrypted object via a pointer to the nonce in the encrypted object or linked to the encrypted object via inclusion of the nonce in the encrypted object.

### Claim 14 (depends on 12)

The system of claim 12, wherein the generating the nonce comprises executing a nonce encryption algorithm that takes as input the plaintext and the nonce key, and that outputs the nonce.

### Claim 15 (depends on 14)

The system of claim 14, wherein the nonce encryption algorithm is an Advanced Encryption Standard with Cipher-based Message Authentication Code (AES-CMAC) encryption algorithm.

### Claim 16 (depends on 12)

The system of claim 12, wherein the nonce key is created and linked to the DEK in response to the DEK being created.

### Claim 17 (depends on 12)

The system of claim 12, wherein the encrypting the unencrypted object is performed using an Advanced Encryption Standard with Galois/Counter Mode (AES-GCM) encryption algorithm.

### Claim 18

A computer program product comprising a computer readable storage medium having program instructions embodied therewith, the program instructions executable by a processor to cause the processor to perform operations comprising:
receiving an unencrypted object that comprises plaintext and metadata that describes the plaintext;
obtaining a data encryption key (DEK) and a nonce key for the unencrypted object, the nonce key different than the DEK;
encrypting the object, the encrypting comprising:
generating a nonce based at least in part of the plaintext and the nonce key; and
generating ciphertext and a metadata authentication tag comprising a signature of the metadata, the generating based at least in part on the plaintext, the metadata, the DEK, and the nonce; and
creating an encrypted object that includes the ciphertext, the metadata, and the metadata authentication tag.

### Claim 19 (depends on 18)

The computer program product of claim 18, wherein the generating the nonce comprises executing a nonce encryption algorithm that takes as input the plaintext and the nonce key, and that outputs the nonce.

### Claim 20 (depends on 18)

The computer program product of claim 18, wherein the nonce key is created and linked to the DEK in response to the DEK being created.
