Skip to content
A Julia implementation of Shuhong Gao's FHE scheme
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Shuhong Gao's FHE scheme

Master branch: CircleCI codecov

This package contains a reference implementation of the FHE scheme from S. Gao, "Efficient fully homomorphic encryption scheme". The aim is to keep the implementation simple as long as it does not affect the performance too much.

A brief usage example:

using Random
using SGFHE

rng = MersenneTwister()
params = Params(64)
key = PrivateKey(params, rng)
bkey = BootstrapKey(rng, key)

y1 = true
y2 = false

enc_y1 = encrypt(key, rng, y1)
enc_y2 = encrypt(key, rng, y2)

enc_and, enc_or, enc_xor = bootstrap(bkey, rng, enc_y1, enc_y2)
res_and, res_or, res_xor = [decrypt(key, enc_bit) for enc_bit in (enc_and, enc_or, enc_xor)]

@assert res_and == y1 & y2
@assert res_or == y1 | y2
@assert res_xor == xor(y1, y2)
You can’t perform that action at this time.