Snapshot: Fully homomorphic encryption with Julia

In today’s world, data security and privacy are critical, especially when sensitive information is processed on potentially insecure systems, such as in cloud computing. Fully Homomorphic Encryption (FHE) offers a promising solution by enabling secure computations on encrypted data without the need for decryption.

Over the past year, Arseniy and Michael of the HPSC Lab have brought to life the idea of performing secure numerical simulations using the Julia programming language. Building upon the efficient C++ implementation of the Cheon-Kim-Kim-Song (CKKS) scheme for real-number arithmetic in the OpenFHE library, we have created the [OpenFHE.jl](https://github.com/hpsc-lab/OpenFHE.jl) package, which allows the functionalities of OpenFHE to be used from within Julia.

Our research group has also introduced the SecureArithmetic.jl package, which provides a user-friendly interface for cryptographically secure arithmetic operations. This package includes a backend for OpenFHE-secured computations using OpenFHE.jl, as well as an unencrypted backend for fast verification of computation pipelines. Additionally, SecureArithmetic.jl has expanded the functionality of OpenFHE.jl's vector-based arithmetic operations to support some matrix-based computations.

The OpenFHE.jl and SecureArithmetic.jl packages were also the focus of our talk, Secure numerical computations using fully homomorphic encryption, at JuliaCon 2024 (a YouTube recording of the talk can be found here). As part of the experimental segment of this talk, we implemented secure versions of well-known finite difference schemes for the linear advection equation, utilizing OpenFHE.jl and SecureArithmetic.jl. The figure below illustrates the results of the 2D linear advection secure simulations at the final time step, with periodic boundary conditions and a sine wave as the initial condition.

Secure numerical simulation of the 2D linear advection equation using finite difference schemes

Together with Erik Faulhaber, Sven Berger, Christian Weißenfels und Gregor Gassner, we have submitted our paper "Robust and efficient pre-processing techniques for particle-based methods including dynamic boundary generation".

 

arXiv:2506.21206 reproduce me!

 

 

Abstract

Obtaining high-quality particle distributions for stable and accurate particle-based simulations poses significant challenges, especially for complex geometries. We introduce a preprocessing technique for 2D and 3D geometries, optimized for smoothed particle hydrodynamics (SPH) and other particle-based methods. Our pipeline begins with the generation of a resolution-adaptive point cloud near the geometry's surface employing a face-based neighborhood search. This point cloud forms the basis for a signed distance field, enabling efficient, localized computations near surface regions. To create an initial particle configuration, we apply a hierarchical winding number method for fast and accurate inside-outside segmentation. Particle positions are then relaxed using an SPH-inspired scheme, which also serves to pack boundary particles. This ensures full kernel support and promotes isotropic distributions while preserving the geometry interface. By leveraging the meshless nature of particle-based methods, our approach does not require connectivity information and is thus straightforward to integrate into existing particle-based frameworks. It is robust to imperfect input geometries and memory-efficient without compromising performance. Moreover, our experiments demonstrate that with increasingly higher resolution, the resulting particle distribution converges to the exact geometry.

Search