https://github.com/nucypher/sgfhe.jl
A Julia implementation of Shuhong Gao's FHE scheme
https://github.com/nucypher/sgfhe.jl
Last synced: 8 months ago
JSON representation
A Julia implementation of Shuhong Gao's FHE scheme
- Host: GitHub
- URL: https://github.com/nucypher/sgfhe.jl
- Owner: nucypher
- License: gpl-3.0
- Created: 2018-09-11T20:10:57.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2019-12-20T18:41:41.000Z (over 6 years ago)
- Last Synced: 2025-03-03T21:27:31.881Z (over 1 year ago)
- Language: Julia
- Homepage: https://nucypher.github.io/SGFHE.jl
- Size: 288 KB
- Stars: 3
- Watchers: 9
- Forks: 3
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Shuhong Gao's FHE scheme
Master branch: [](https://circleci.com/gh/nucypher/SGFHE.jl/tree/master) [](https://codecov.io/gh/nucypher/SGFHE.jl)
This package contains a reference implementation of the FHE scheme from [S. Gao, "Efficient fully homomorphic encryption scheme"](https://eprint.iacr.org/2018/637).
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)