# US 2021/0243168 A1 · Policy-based topic-level encryption for message queues

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

- Number: US 2021/0243168 A1
- Document ID: US20210243168A1
- Status: Published application
- Kind: A1
- Application number: 16/782,400
- Filed: 2020-02-05
- Published: 2021-08-05
- Earliest claimed: 2020-02-05
- Assignees: International Business Machines Corporation
- Applicants: International Business Machines Corporation
- Inventors: Christopher J. Giblin
- Web page: https://patentgrep.com/patent/US20210243168A1

## CPC

- H04L 9/088: {Usage controlling of secret information, e.g. techniques for restricting cryptographic keys to pre-authorized uses, different access levels, validity of crypto-period, different key- or password length, or different strong and weak cryptographic algorithms (network architectures or network communication protocols for using time-dependent keys in a packet data network H04L63/068)}
- H04L 63/0428: {wherein the data content is protected, e.g. by encrypting or encapsulating the payload}
- G06F 21/60: Protecting data
- G06F 21/602: {Providing cryptographic facilities or services}
- G06F 21/6245: {Protecting personal data, e.g. for financial or medical purposes}
- G06F 21/64: Protecting data integrity, e.g. using checksums, certificates or signatures
- H04L 9/0822: {using key encryption key}
- H04L 9/083: {involving central third party, e.g. key distribution center [KDC] or trusted third party [TTP]}
- H04L 9/14: using a plurality of keys or algorithms
- H04L 63/105: {Multiple levels of security}
- H04L 63/123: {received data contents, e.g. message integrity}
- H04L 63/205: {involving negotiation or determination of the one or more network security mechanisms to be used, e.g. by negotiation between the client and the server or between peers or by selection according to the capabilities of the entities involved (negotiation of communication capabilities H04L69/24)}
- H04L 51/216: Handling conversation history, e.g. grouping of messages in sessions or threads
- H04L 63/045: {wherein the sending and receiving network entities apply hybrid encryption, i.e. combination of symmetric and asymmetric encryption (cryptographic mechanisms or cryptographic arrangements using a plurality of keys or algorithms H04L9/14)}
- 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

A targeted, topic-based encryption in a publish-subscribe message queue. Topic-based encryption driven by encryption policies for both storing and receiving messages uses activity tracking and logging to ensure confidentiality of certain topics associated with stored encrypted messages. Authentication of both publisher and consumer ensure encryption and decryption keys are used in confidence.

## Claims

### Claim 1

A computer-implemented method comprising:
determining a first topic associated with a first message requires a first encryption level by reference to a topic-based encryption policy;
providing to a first entity an encryption key for encrypting the first message according to the first encryption level to produce a first encrypted message;
storing the first encrypted message in a message queuing system according to the first topic;
receiving from a second entity a request for messages associated with the first topic including the first encrypted message;
identifying a decryption key corresponding to the encrypted message according to the topic-based encryption policy with reference to the first topic; and
sending to the second entity the first encrypted message for decryption by the consumer using the decryption key.

### Claim 2 (depends on 1)

The computer-implemented method of claim 1, further comprising:
recording to a logging system the providing to the first entity the encryption key for producing the first encrypted message and the sending to the second entity the decryption key for the first encrypted message.

### Claim 3 (depends on 2)

The computer-implemented method of claim 2, further comprising:
responsive to an update to the topic-based encryption policy, recording the update to the logging system.

### Claim 4 (depends on 1)

The computer-implemented method of claim 1, further comprising:
receiving, from the first entity, a request to determine whether the first topic requires encryption for storage in the message queuing system.

### Claim 5 (depends on 1)

The computer-implemented method of claim 1, further comprising:
establishing a subscription account for the second entity including assigning authenticating credentials to the second entity; and
the request is received when the second entity subscribes to the first topic via the subscription account.

### Claim 6 (depends on 1)

The computer-implemented method of claim 1, wherein the decryption key is assigned to the first topic by the topic-based encryption policy.

### Claim 7

A computer program product comprising a computer-readable storage medium having a set of instructions stored therein which, when executed by a processor, causes the processor to perform a topic-based encryption in a publish-subscribe messaging queue by:
determining a first topic associated with a first message requires a first encryption level by reference to a topic-based encryption policy;
providing to a first entity an encryption key for encrypting the first message according to the first encryption level to produce a first encrypted message;
storing the first encrypted message in a message queuing system according to the first topic;
receiving from a second entity a request for messages associated with the first topic including the first encrypted message;
identifying a decryption key corresponding to the encrypted message according to the topic-based encryption policy with reference to the first topic; and
sending to the second entity the first encrypted message for decryption by the second entity using the decryption key.

### Claim 8 (depends on 7)

The computer program product of claim 7, further causing the processor to perform a topic-based encryption in a publish-subscribe messaging queue by:
recording to a logging system the providing to the user the encryption key for producing the first encrypted message and the sending to the second entity the decryption key for the first encrypted message.

### Claim 9 (depends on 8)

The computer program product of claim 8, further causing the processor to perform a topic-based encryption in a publish-subscribe messaging queue by:
responsive to an update to the topic-based encryption policy, recording the update to the logging system.

### Claim 10 (depends on 7)

The computer program product of claim 7, further causing the processor to perform a topic-based encryption in a publish-subscribe messaging queue by:
receiving, from the first entity, a request to determine whether the first topic requires encryption for storage in the message queuing system.

### Claim 11 (depends on 7)

The computer program product of claim 7, further causing the processor to perform a topic-based encryption in a publish-subscribe messaging queue by:
establishing a subscription account for the second entity including assigning authenticating credentials to the second entity; and
the request is received when the second entity subscribes to the first topic via the subscription account.

### Claim 12 (depends on 7)

The computer program product of claim 7, wherein the decryption key is assigned to the first topic by the topic-based encryption policy.

### Claim 13

A computer system comprising:
a processor set; and
a computer readable storage medium having program instructions stored therein;
wherein:
the processor set executes the program instructions that cause the processor set to perform a topic-based encryption in a publish-subscribe messaging queue by:
determining a first topic associated with a first message requires a first encryption level by reference to a topic-based encryption policy;
providing to a first entity an encryption key for encrypting the first message according to the first encryption level to produce a first encrypted message;
storing the first encrypted message in a message queuing system according to the first topic;
receiving from a second entity a request for messages associated with the first topic including the first encrypted message;
identifying a decryption key corresponding to the encrypted message according to the topic-based encryption policy with reference to the first topic; and
sending to the second entity the first encrypted message for decryption by the second entity using the decryption key.

### Claim 14 (depends on 13)

The computer system of claim 13, further causing the processor set to perform a topic-based encryption in a publish-subscribe messaging queue by:
recording to a logging system the providing to the first entity the encryption key for producing the first encrypted message and the sending to the second entity the decryption key for the first encrypted message.

### Claim 15 (depends on 14)

The computer system of claim 14, further causing the processor to perform a topic-based encryption in a publish-subscribe messaging queue by:
responsive to an update to the topic-based encryption policy, recording the update to the logging system.

### Claim 16 (depends on 13)

The computer system of claim 13, further causing the processor to perform a topic-based encryption in a publish-subscribe messaging queue by:
receiving, from the first entity, a request to determine whether the first topic requires encryption for storage in the message queuing system.

### Claim 17 (depends on 13)

The computer system of claim 13, further causing the processor to perform a topic-based encryption in a publish-subscribe messaging queue by:
establishing a subscription account for the second entity including assigning authenticating credentials to the second entity; and
the request is received when the second entity subscribes to the first topic via the subscription account.

### Claim 18 (depends on 13)

The computer system of claim 13, wherein the decryption key is assigned to the first topic by the topic-based encryption policy.

### Claim 19

A computer-implemented method comprising:
determining, by a producer, a first topic associated with a first message requires a first encryption level by reference to a topic-based encryption policy;
encrypting, by the producer, the first message according to the first encryption level to produce an encrypted message;
storing the encrypted message in a message queuing system according to the first topic;
receiving from a consumer a subscription for messages associated with the first topic including the first message;
identifying, by the consumer, a decryption key corresponding to the encrypted message according to the topic-based encryption policy with reference to the first topic; and
decrypting, by the consumer, the encrypted message with the decryption key to reproduce the first message.

### Claim 20 (depends on 19)

The computer-implemented method of claim 19, further comprising:
receiving the first message associated with the first topic from the producer.

### Claim 21 (depends on 19)

The computer-implemented method of claim 19, wherein the message queueing system is a Kafka system.

### Claim 22 (depends on 19)

The computer-implemented method of claim 19, wherein identifying the decryption key includes:
referring to the topic-based encryption policy to determine whether the subscription for messages associated with the first topic includes encrypted messages.

### Claim 23 (depends on 19)

The computer-implemented method of claim 19, wherein:
the encrypted message includes a message authentication code; and
the subscription for messages includes the encrypted message only when the message authentication code is provided by the consumer.
