# US 2023/0412368 A1 · Enabling using external tenant master keys

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

- Number: US 2023/0412368 A1
- Document ID: US20230412368A1
- Status: Published application
- Kind: A1
- Application number: 18/242,137
- Filed: 2023-09-05
- Published: 2023-12-21
- Earliest claimed: 2021-09-27
- Assignees: Workday, Inc.
- Applicants: Workday, Inc.
- Inventors: Miguel Leonardo Chinchilla Cartagena; Karina Si-Woon Chan; Aswani Kaushik Chimthapalli; Michael Clarke; Amol Anant Deshmukh; Subha Gopalakrishnan; Bjorn Brook Hamel; Louis James LaTouche; Atlee Glen Lyden; Marcus Anthony Sanchez; Jasmine Teresa Schladen; Devaki Ajinkya Tarkunde; Harrison Yu
- Web page: https://patentgrep.com/patent/US20230412368A1

## CPC

- H04L 9/0825: {using asymmetric-key encryption or public key infrastructure [PKI], e.g. key signature or public key certificates}
- H04L 9/0822: {using key encryption key}
- H04L 9/0894: {Escrow, recovery or storing of secret information, e.g. secret key escrow or cryptographic key storage}
- H04L 9/14: using a plurality of keys or algorithms
- H04L 67/561: Adding application-functional data or data for application control, e.g. adding metadata
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)

## Abstract

The present application discloses a method, system, and computer system for managing data using keys. The method includes receiving a request to access data stored within a tenant database associated with a tenant, wherein the data is encrypted based at least in part on a tenant service encryption key (TSEK) corresponding to the tenant database, determining a wrapper key used in connection with encrypting the TSEK based at least in part on a TSEK metadata stored in association with the TSEK, determining a top-level key used in connection with encrypting the wrapper key based at least in part on wrapper key metadata stored in association with the encrypted version of the wrapper key, obtaining the data stored within the tenant database, comprising decrypting at least part of the data based at least in part on (i) the TSEK, (ii) the wrapper key, and (iii) the top-level key, and providing the data in response to the request. The TSEK metadata is stored in the tenant database. An encrypted version of the wrapper key is stored in a key management service that is in communication with the tenant database.

## Claims

### Claim 1

A system, comprising:
a key management service (KMS), wherein the KMS is in communication with a tenant database, wherein the tenant database is associated with a tenant, wherein the tenant is associated with an entity, and wherein data is stored in the tenant database is encrypted based at least in part on a tenant service encryption key (TSEK);
one or more processors configured to:
receive an indication to determine a wrapper key, wherein the wrapper key is used in connection with the TSEK based at least in part on a TSEK metadata stored in the tenant database in association with the TSEK;
determine a tenant key encryption key (TKEK) based at least in part on a mapping of the TKEK to a key used to encrypt the TSEK;
store an encrypted version of the TKEK in the tenant database;
determine the wrapper key based at least in part on a TKEK metadata stored in is association with the TKEK, wherein the wrapper key is associated with the entity;
encrypt the wrapper key to generate an encrypted version of the wrapper key using a top-level key; and
store the encrypted version of the wrapper key and wrapper key metadata in the KMS.

### Claim 2 (depends on 1)

The system of claim 1, wherein an encrypted version of the TSEK is stored in the tenant database.

### Claim 3 (depends on 1)

The system of claim 1, wherein the TSEK is encrypted based at least in part on the TKEK, and an encrypted version of the TKEK is stored in the tenant database.

### Claim 4 (depends on 1)

The system of claim 1, wherein an encrypted version of the TKEK metadata is stored in the tenant database.

### Claim 5 (depends on 1)

The system of claim 1, wherein the TKEK metadata indicates an identifier corresponding to the wrapper key.

### Claim 6 (depends on 1)

The system of claim 1, wherein the one or more processors is further configured to:
determine a Bring-your-own-key Tenant Wrapper Key (BTWK) that is used in connection with encrypting a key envelope comprising the TKEK, wherein:
the key envelope comprising the TKEK is encrypted using the wrapper key;
the BTWK is determined based at least in part on the wrapper key metadata; and
the identifier of the BTWK is stored in the tenant database.

### Claim 7 (depends on 6)

The system of claim 6, wherein:
the BTWK corresponds to an entity provided tenant wrapper key that is provided by the entity; and
a ciphertext created based on encrypting the TKEK with the wrapper key is encrypted with the BTWK.

### Claim 8 (depends on 1)

The system of claim 1, wherein the top-level key used in connection with encrypting the wrapper key is determined based at least in part on the wrapper key metadata and includes performing a lookup in the tenant database for information stored with respect to the wrapper key to determine the top-level key most recently used in connection with encrypting the wrapper key.

### Claim 9 (depends on 8)

The system of claim 8, wherein determining the top-level key comprises:
performing a lookup in the tenant database of a last entry in the tenant database storing mappings of an organization wrapper keys to top-level keys; and
determining the top-level key used in connection with encryption for a last entry in the mappings of organization wrapper keys to the top-level keys, the last entry being a most recent entry for an organization.

### Claim 10 (depends on 1)

The system of claim 1, wherein the top-level key corresponds to a top-level entity provided key that is provided by an entity associated with the tenant.

### Claim 11 (depends on 1)

The system of claim 1, wherein the KMS that manages the wrapper key is provided access to the top-level key via one or more third party KMSs.

### Claim 12 (depends on 1)

The system of claim 1, wherein the top-level key corresponds to a top-level service provided key that is provided by a service provider that provides access to the data stored within the tenant database.

### Claim 13 (depends on 1)

The system of claim 1, wherein obtaining data stored within the tenant database comprises:
decrypting the encrypted version of the wrapper key based at least in part on the top-level key to obtain the wrapper key;
decrypting an encrypted version of the TSEK based at least in part on the wrapper key to obtain the TSEK; and
decrypting the data stored within the tenant database using the TSEK to obtain the data.

### Claim 14 (depends on 13)

The system of claim 13, wherein the decrypting the encrypted version of the TSEK based at least in part on the wrapper key to obtain the TSEK further comprises:
decrypting an encrypted version of the TKEK based at least in part on the wrapper key to obtain the TKEK; and
decrypting an encrypted version of the TSEK based at least in part on the TKEK to obtain the TSEK.

### Claim 15 (depends on 14)

The system of claim 14, wherein the decrypting an encrypted version of TKEK based at least in part on the wrapper key to obtain the TKEK comprises:
decrypting the encrypted version of the TKEK based at least in part on the wrapper key and a Bring-your-own-key Tenant Wrapper Key (BTWK) to obtain the TKEK key, wherein:
the BTWK key is determined based at least in part on wrapper metadata.

### Claim 16 (depends on 1)

The system of claim 1, wherein the KMS is configured to connect a plurality of third party KMSs.

### Claim 17 (depends on 16)

The system of claim 16, wherein the KMS determines from among the plurality of third party KMSs a tenant third party service associated with the tenant and storing the top-level key used to encrypt the wrapper key.

### Claim 18

A method, comprising:
receiving an indication to determine a wrapper key, wherein the wrapper key is used in connection with the TSEK based at least in part on a TSEK metadata stored in the tenant database in association with the TSEK;
determining, using a processor, a tenant key encryption key (TKEK) based at least in part on a mapping of the TKEK to a key used to encrypt the TSEK;
storing an encrypted version of the TKEK in the tenant database;
determining the wrapper key based at least in part on a TKEK metadata stored in association with the TKEK, wherein the wrapper key is associated with the entity;
encrypting the wrapper key to generate an encrypted version of the wrapper key using a top-level key; and
storing the encrypted version of the wrapper key and wrapper key metadata in a key management service (KMS), wherein the KMS is in communication with a tenant database, wherein the tenant database is associated with a tenant, wherein the tenant is associated with an entity, and wherein data is stored in the tenant database is encrypted based at least in part on a tenant service encryption key (TSEK).

### Claim 19

A computer program product embodied in a non-transitory computer readable medium and comprising computer instructions for:
receiving an indication to determine a wrapper key, wherein the wrapper key is used in connection with the TSEK based at least in part on a TSEK metadata stored in the tenant database in association with the TSEK;
determining, using a processor, a tenant key encryption key (TKEK) based at least in part on a mapping of the TKEK to a key used to encrypt the TSEK;
storing an encrypted version of the TKEK in the tenant database;
determining the wrapper key based at least in part on a TKEK metadata stored in association with the TKEK, wherein the wrapper key is associated with the entity;
encrypting the wrapper key to generate an encrypted version of the wrapper key using a top-level key; and
storing the encrypted version of the wrapper key and wrapper key metadata in a key management service (KMS), wherein the KMS is in communication with a tenant database, wherein the tenant database is associated with a tenant, wherein the tenant is associated with an entity, and wherein data is stored in the tenant database is encrypted based at least in part on a tenant service encryption key (TSEK).
