P-Adic Rational Encoding for Overflow-Safe FHE Computation

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current Homomorphic Encryption (HE) schemes face challenges in efficiently converting real/rational data types to integers or polynomials, leading to inefficiencies and potential overflow issues during homomorphic computations, particularly in AGCD-based and RLWE-based HE schemes.

Innovation Solution

A p-adic encoding scheme (PIE) is developed to transform rational numbers into integers using p-adic arithmetic, ensuring homomorphic properties and preventing overflow by mapping rationals to a bounded domain, compatible with both AGCD-based and RLWE-based HE schemes.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If rational data is converted to integers using conventional methods in HE schemes, then homomorphic computations can be performed, but overflow issues occur and input space is limited

Engineering Contradiction:
Improvecomputation accuracyVSAvoidinput space size
Core Design Contradiction:
ReliabilityVSAdaptability or versatility

Solution Approach 1:

The patent applies parameter changes by transforming the encoding approach from conventional integer conversion to p-adic encoding. This changes the mathematical parameters used in the encoding process, allowing rational numbers to be represented in a way that prevents overflow during homomorphic computations while expanding the acceptable input space. The p-adic encoding parameter transformation enables the system to handle a broader range of rational inputs without compromising computation accuracy.

Inventive Principle:
Principle #35Parameter changes

Solution Approach 2:

The patent introduces p-adic encoding as an intermediary transformation layer between rational data and integer representation in HE schemes. This intermediary encoding mechanism converts rational numbers into a specialized integer format that preserves the homomorphic properties while avoiding overflow issues. The p-adic encoding acts as a mediator that bridges the gap between rational input requirements and integer-based homomorphic computation constraints.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Productivity

If conventional encoding is used to convert rational data to integers, then HE operations can proceed, but circuit depth is compromised and efficiency decreases

Engineering Contradiction:
Improvecomputation efficiencyVSAvoidcircuit depth
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The patent changes the encoding parameters from conventional methods to p-adic encoding, which fundamentally alters how rational numbers are represented as integers. This parameter transformation reduces the circuit depth required for homomorphic operations by optimizing the mathematical structure of the encoded data. The p-adic encoding parameters are specifically chosen to minimize computational complexity while maintaining efficiency in homomorphic arithmetic operations.

Inventive Principle:
Principle #35Parameter changes

3Ease of manufacture

If rational numbers are mapped to unbounded integer domains, then encoding is simpler, but overflow occurs during homomorphic computations

Engineering Contradiction:
Improveencoding simplicityVSAvoidoverflow prevention
Core Design Contradiction:
Ease of manufactureVSReliability

Solution Approach 1:

The patent applies preliminary action by performing p-adic encoding transformation before the rational numbers are processed in homomorphic computations. This preliminary encoding step pre-establishes a bounded representation that inherently prevents overflow during subsequent operations. By preparing the data in advance with p-adic encoding, the system ensures that overflow cannot occur during the homomorphic computation process, while maintaining relative encoding simplicity through the structured p-adic transformation.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS12587357B2Methods and systems for <i>p</i>-adic encoding and decoding of rational data for FHE systems
Publication Date: 2026.03.24 ALGEMETRIC INC
  • US12587357B2 patent drawing
  • US12587357B2 patent drawing

AI summary

Disclosed are methods and systems to provide homomorphic compatible, p-adic arithmetic based encoding and decoding of rational numbers to integers and back to rational numbers for use with existing Fully Homomorphic Encryption (FHE) systems. Embodiments support both Approximate Greatest Common Devisor (AGCD) systems such as those with an Integer—Dijk, Gentry, Halevi, and Vaikuntanathan (IDGHV) scheme, and Ring Learning With Error (RLWE) systems such as a Fan and Vercauteren (FV) scheme modified for encrypting integers (ModFV). Encoded integers are provided to an FHE system on a source device that may optionally deliver the encrypted ciphertext to an intermediary device for performance of homomorphic algebra operations, and, the resultant and/or original ciphertext is delivered to a destination device for decryption of the ciphertext, and decoding of the decrypted integer back to a rational number.