Service Offerings

Explore tailored services designed to solve business challenges and support growth

Industries

Discover industry-focused expertise built to meet unique business needs

Partners

Meet our service partners who strengthen delivery and support client success

Learn how to modernize data foundations to enable trusted, scalable AI.

Global supply chain leader in apparel embarks on unified analytics strategy with Microsoft Fabric

See how a unified data strategy built faster insights and scaled analytics.

Microsoft solutions partner for Data & AI

Products

Explore our digital products built to streamline work and drive growth every day

Partners

Meet our product partners who enhance our solutions and expand client value

AI-powered automated
 regression testing: Your
kickstart for 2026

Explore a better way to speed up testing and improve release quality.

Resources

Access blogs, case studies, events, and insights that support smarter decisions.

Latest Resources

CASE STUDY

HamiltonJet transforms regression testing on Infor CloudSuite with Fortest

NEWS

Fortude earns Microsoft Azure Infrastructure Solutions designation

Our People

Discover a culture where you can grow and shape what’s next

Everyone can grow at Fortude

We believe in creating a global workplace where everyone can grow. This is amplified by our teams, who say the best thing about Fortude is our culture, one that is brought to life by a diverse team that spans across continents.

Latest

Fortude builds momentum for women in tech with all-female Ignite 2.0 tech internship

Aug 22, 2025

Pioneering innovation and inculcating learning in the age of AI

Aug 01, 2024

About us

Learn who we are, what we do, and the values that drive our growth

News & events

Stay updated with Fortude news, events, stories, and company highlights.

Contact us

Get in touch with our team to ask questions or start a conversation

Your nearest office- Sri Lanka

Fortude (Pvt) Ltd
146 Kynsey Road, Colombo 7, Sri Lanka

Email – talk-to-us@fortude.co
Phone – +94 11 453 1531

What defines us goes beyond what we do

Every day, we bring together diverse perspectives, strong leadership and responsible thinking to build a business that creates lasting value for our clients, people and communities.

Fortude secures major Solutions Partner achievement with Analytics on Microsoft Azure Specialization

Office locations

Data & AI

Fully homomorphic encryption using a C++ transpiler

3 MIN READ

February 24, 2022

Share

Fully homomorphic encryption using a C++ transpiler

Value, demand, and supply have a very harmonious relationship, so much so that they tend to uplift each other. Data has always been valuable, but since its recent stardom, it now calls itself big data, grown a bit too big for its britches if you ask me. Anything that gets mined, harvested, or produced excessively, hurts the planet. In the case of data, it’s your privacy that takes the hit.

The most interesting emerging religion is Dataism, which venerates neither gods nor man — it worships data.

Home Deus, Yuval Noah Harari

On the upside, the benefits of big data are revolutionary and immensely helpful to the user, everything from recommender systems to fraud prevention. Only if there was a way to share data without violating the user’s privacy? Well, good news. There is, and it’s called homomorphic encryption.

Homomorphic encryption is a way to perform mathematical operations on encrypted data without decrypting them. It was first theorized in the late seventies. Homomorphic encryption refers to partially homomorphic encryption(PHE) and fully homomorphic encryption(FHE) in general. The difference between FHE and its lesser counterpart is that FHE supports addition, subtraction, multiplication, and division, while the other doesn’t.

Imagine you work for a bank, and you want to understand what customers spend their money on, so you can offer your customers better bargains. To achieve this goal, you partner with an organization to perform witchcraft on the data to understand customer spending patterns. As unadulterated as your intentions are, how would the customers feel about it? With FHE you can share the customer data in an encrypted form so that the organization performing the witchcraft only see encrypted random data and not the actual customer information. Let’s see how we can put this to practice.

The good folks at Google recently open-sourced a general-purpose FHE transpiler. The example below performs a simple sum of two numbers. Notice the raw values and the encrypted values.h

You share the encrypted data with the server and the server performs the sum operation on the encrypted data. The result is also returned in encrypted form. The following code snippet shows how data is encrypted and sent to the server for processing.

The client code

The actual code that performs the sum is a plain old C++ code

The server-side function

Let’s look at another example where we compare individuals to identify who is older.

The client-side code

The server-side code

As you can see, the raw values are not exposed to the server, and the server performs the mathematical operations on the encrypted data. However, there is a lot more happening here than what meets the eye. Firstly, if you noticed, there is a key used in the operation. And I did mention the library is a transpiler. Let’s look at these two claims.
What the transpiler does here is to convert regular C++ code to FHE-C++. Most of the actual heavy lifting is done by the transpiler, so you, the developer can focus on solving the business problem. And If you are comfortable writing code in C++, then this is as easy as making pot noodles.

Now to the use of keys. Yes, as you may have guessed, this FHE example works on public-key encryption. It can work on private key encryption as well. If you are interested, you could further look up strong and weak homomorphic encryption as well. For the sake of this example, we generated a key pair and used the private key to encrypt and decrypt the data, and it goes without saying that without access to the private key, you can’t decrypt the data.

Although FHE is a complex concept, the transpiler has made it simple to use. Microsoft SEAL is another attempt to take FHE to the masses. FHE is a versatile concept with a multitude of practical uses from healthcare to finance and everything in between. With everything being digitized and more businesses are moving to the cloud, the uses of FHE could be endless.

Written by:

“ Charlie’s agentic capabilities are specifically designed to address the volatility inherent in fashion and retail planning.”

– John Doe

Global supply chain leader in apparel
embarks on unified analytics

In production, AI agents optimize processes for waste reduction and improved sustainability.

CONTENTS

Fully homomorphic encryption using a C++ transpiler

Receive the latest
Fortude Newsletter
updates.

Share

Receive the latest
Fortude Newsletter
updates.

Share