RequantTESTNET
Requant research

GPU Homomorphic Encryption: CKKS, Bootstrap and Energy

Abstract

Does removing a redundant modular product from a real homomorphic-encryption kernel accelerate the complete encrypted application? An isolated, compatible 64-bit HEonGPU change passes exact coefficient checks and full CKKS and bootstrap plaintext validation. Its small timing differences do not establish a material replicated gain. Separately sampled whole-process GPU energy also fails to show a repeatable saving. The result favours retaining the original native arithmetic rather than extrapolating a microbenchmark into application performance.

This is the web edition of a completed experimental follow-up, with its original numerical tables, reproduction instructions and limitations. Read the baseline study for the earlier methods and results, and the completed source report for the retained repository edition. The experiments are from November 2026; this web edition was published on 15 November 2026. It is a Requant technical report, not a peer-reviewed publication or independent external replication.

Experimental report

This supplement resolves the compatible native-arithmetic integration question from the historical report. It does not replace CKKS primes with the earlier 31-bit experimental NTT primes.

Actual library change and exact checks

The isolated attributed patch targets HEonGPU commit 837ffc87aa263bdfebfdfd1d077e5a52c7ae1ed1. In the actual 64-bit ciphertext cross-product kernel, equal input addresses imply equal cross terms. The candidate reuses one modular product for a square instead of computing it twice. General two-operand multiplication retains its original path, and the modulus representation, security parameters, key switching and rescaling rules are unchanged. The original upstream checkout and library/binaries remain untouched.

The independent coefficient program checks 147,456 output coefficients against CPU unsigned-128-bit modular arithmetic, including zero/p-1 boundaries, random inputs, aliased and distinct operands, and 31/50/60-bit moduli. Every coefficient matches. This checks the modified machine arithmetic directly, in addition to later approximate plaintext checks.

The build script reconstructs the original compiler/link commands, replaces one kernel object in a copy of the native static library, and rebuilds device/host links. It uses no duplicate-symbol override or suppressed validation. The paired baseline links the unmodified archive; both variants use identical generated application harnesses and the same explicit host-pool maximum.

Resource setup preserved

The preflight record retains the observed setup failures. Installed GMP/NTL include and runtime-library paths must be provided in this non-system dependency installation. The original fractional host-pool maximum also rejected setup because the library used immediately free RAM: roughly 493 MiB was free while about 54.6 GiB was reclaimably available. Ten percent of the former was below the original 64/128 MiB initial pool sizes.

The new paired harnesses change only that maximum assignment to an explicit 256 MiB via the supported API, retaining the original 64/128 MiB initial sizes. This budget fits the observed free RAM, and every native pool-size/availability check remains enabled. Security/accuracy parameters and the old executed harness sources are preserved. Comparing these new variants is valid; their setup policy is not silently equated to the older campaign's fractional host-pool policy.

Complete CKKS and bootstrap results

The actual CKKS application performs public-key encryption and a homomorphic square followed by relinearization/rescale. Arithmetic timing excludes input ciphertext reset and decryption. The separate full boundary includes encode, encrypt, evaluate, decrypt, decode and synchronization. Setup/keys are retained separately. Every timed result is decrypted and all slots must satisfy the original 0.001 error gate. Library sec128 declarations are retained, not reinterpreted as an independent security audit.

Each native harness uses five warm-ups and thirty measured samples. Whole-harness variant order reverses across the two input seeds; it is not an interleaved within-iteration paired test. Medians, milliseconds:

SeedNVariantSquare/relinearize/rescaleEncode through decode
202611128192baseline0.0757790.226675
202611128192square_alias0.0761990.225209
2026111216384baseline0.1278480.357910
2026111216384square_alias0.1278120.356268
202612128192square_alias0.0766880.222904
202612128192baseline0.0762690.225941
2026121216384square_alias0.1285110.358713
2026121216384baseline0.1283020.358712

The unchanged slim bootstrap preset at N=65536 checks every slot for zero, constant, alternating and random inputs. The same five/thirty design measures the complete native bootstrap (setup/key generation excluded):

SeedVariantZero, msConstant, msAlternating, msRandom, ms
20261112baseline175.7272175.8906176.0574176.1107
20261112square_alias176.1536176.2731176.3699176.4319
20261212square_alias176.3639176.4783176.5206176.5539
20261212baseline176.6059176.6613176.7016176.7417

There is no material replicated application gain. CKKS arithmetic differences are below one percent and change interpretation with size; bootstrap changes by roughly two tenths of a percent and reverses sign with cohort/order. Do not describe those differences as an established speedup. All tested outputs remain accurate, but removing one modular product from one kernel does not establish useful acceleration of the complete application. The data do not measure the exact fraction of bootstrap time spent in that kernel, so no unmeasured phase-share or Amdahl claim is made.

GPU-reported energy, measured separately

energy_study.py samples read-only NVML power and cumulative GPU energy while each complete paired bootstrap process executes, including setup, all five warm-ups and thirty samples for each of four input patterns. The official native API reports cumulative energy in millijoules since driver reload; its start/end difference is the primary GPU-reported quantity. The trapezoidal integral of the sampled power is retained independently. This is not CPU or whole-system energy and is not the energy of only one steady-state bootstrap.

SeedVariantObserved process envelope, sGPU-reported counter, JSampled power integral, JSamples
20261112baseline25.7023605.9153828.820243
20261112square_alias25.6213678.6714011.960243
20261212square_alias25.6793714.5364038.816243
20261212baseline25.6753732.1334053.240243

There are only two whole-process energy observations per variant. The candidate consumes more reported GPU energy in the first pair and slightly less in the reversed-order pair; a repeatable energy reduction is not established. Power integration and the cumulative counter differ by about 6–9% under load. The ten-second idle probe also disagrees (counter 126.24 J versus sampled integral 89.83 J), so neither is presented as a calibrated wall meter or silently substituted for the other. The idle probe is not subtracted from the gross process totals. Raw timestamps, sensor values and actual maximum sampling gaps are retained in energy-study.json; energy-summary.csv is independently regenerated by CPU CI.

No readable CPU package energy counter was exposed through the searched powercap/hwmon interfaces for this account. Accordingly these data do not establish CPU-versus-GPU energy efficiency or total application electricity cost. The second card was occupied during these energy observations; after the user's later authorization its services were temporarily stopped for the separate two-GPU erasure campaign. These are different experimental conditions, not one pooled benchmark.

Decision and reproduction

Retain the unmodified native arithmetic for this workload: the candidate is mathematically compatible and experimentally correct but fails the useful application-performance gate. The earlier 31-bit Shoup microbenchmarks remain a distinct arithmetic result; they do not justify replacing the actual wider-prime CKKS pipeline.

integration_study.py recreates the isolated patch, paired executables, exact coefficient qualification and two-seed application campaign from the documented existing native build. Provide the installed dependency include paths through CPATH and library paths through LD_LIBRARY_PATH; invoke python integration_study.py UPSTREAM BUILD --ninja NINJA. The evidence retains generated harness hashes, source/archive/binary hashes, parameters, all timing samples, all-slot errors, memory counters and scope. python verify_followups.py checks these bindings and derives the full median/p95 table. CI preserves all original exact RNS/NTT and application-evidence checks; it does not rerun GPU timing.

GPU campaigns run serially on the same RTX 5060 Ti. Clocks, power limits and unrelated services are unchanged. Production security, whole-system energy efficiency and heterogeneous multi-GPU FHE scaling are not inferred.

Cite this report

Requant. GPU Homomorphic Encryption: CKKS, Bootstrap and Energy. Technical report, 15 November 2026. Canonical web edition. Experimental evidence revision: cfe18e7dbda2. No DOI has been assigned.