Format-Preserving Encryption for Referentially Consistent LLM Context

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing encryption methods for large language models replace words with keys that are difficult for the model to understand, leading to inconsistent and inaccurate responses, and do not maintain referential integrity or format preservation, making it challenging to protect sensitive information while ensuring the model can draw accurate conclusions.

Innovation Solution

A system that identifies words to be encrypted, generates keys with similar formats to maintain context, and replaces all instances of the word with the same key to ensure referential integrity, while using a large language model to generate outputs based on encrypted information.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Object-affected harmful factors

If standard encryption replaces words with keys, then sensitive information is protected, but the encrypted information becomes difficult for the large language model to understand and use

Engineering Contradiction:
Improveinformation securityVSAvoidmodel usability
Core Design Contradiction:
Object-affected harmful factorsVSEase of operation

Solution Approach 1:

The patent changes the parameters of encryption by generating keys that match the format and characteristics of the original words (e.g., IP addresses remain as IP address formats, URLs remain as URL formats). This allows the LLM to recognize and process encrypted information naturally, maintaining both security and usability.

Inventive Principle:
Principle #35Parameter changes

Solution Approach 2:

The patent introduces a word-key pair database as an intermediary that maps encrypted keys back to original words. This mediator enables the LLM to understand encrypted information by referencing the database, while still maintaining encryption for security purposes.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Object-affected harmful factors

If words are replaced with encryption keys, then data protection is achieved, but referential integrity is lost making it difficult to track and analyze information

Engineering Contradiction:
Improvedata protectionVSAvoidreferential integrity
Core Design Contradiction:
Object-affected harmful factorsVSReliability

Solution Approach 1:

The patent ensures referential integrity by maintaining consistent key assignments for the same word across all contexts. The word-key pair database stores these consistent mappings, allowing the LLM to track references accurately while data remains protected.

Inventive Principle:
Principle #35Parameter changes

3Stability of the object's composition

If format preservation is implemented during encryption, then context and structure are maintained, but encryption complexity increases

Engineering Contradiction:
Improveformat preservationVSAvoidencryption complexity
Core Design Contradiction:
Stability of the object's compositionVSDevice complexity

Solution Approach 1:

The patent implements format preservation by generating encryption keys that match the original word's format (IP addresses, URLs, domain names, etc.). This maintains context and structure without requiring complex additional processing, as the format matching is done through straightforward key generation algorithms.

Inventive Principle:
Principle #35Parameter changes

Data Source

PatentUS20250252195A1Enhanced encryption with format preservation and referential integrity for use with a large language model
Publication Date: 2025.08.07 INSIGHT DIRECT USA INC
  • US20250252195A1 patent drawing
  • US20250252195A1 patent drawing
  • US20250252195A1 patent drawing

AI summary

A system for encrypting information for use with a large language model can include unencrypted information; an identification module configured to identify words to be encrypted in the unencrypted information; a key generation module configured to generate keys corresponding to the words to be encrypted in the unencrypted information, the keys having a similar format as the corresponding words so that the keys preserves the format of the corresponding words to maintain a similar context; a replacement module configured to replace the words with the corresponding keys; and a prompt module configured to determine a prompt to the large language model requesting the large language model to determine an encrypted output based upon the encrypted information, wherein, in response to the reception of the encrypted output from the large language model, the replacement module is configured to replace the keys with the corresponding words to form an unencrypted output.