Skip to main content

The DESILO FHE Library

Welcome to the DESILO FHE library!

The DESILO FHE library is a homomorphic encryption library that is fast and intuitive. It delivers state-of-the-art performance, maximum accuracy, and versatile usability. Designed to be accessible and efficient for everyone, from beginners unfamiliar with homomorphic encryption to experts developing advanced algorithms.

Built on C++ and CUDA, the DESILO FHE library is optimized for both CPUs and NVIDIA GPUs. It includes a Python wrapper for easy use and seamless integration into existing AI workflows. Additionally, it supports CPU parallelization for environments without GPU access.

Currently, the DESILO FHE library supports real and complex number operations based on the RNS-CKKS scheme, with plans to expand to various integer-based schemes in the future. It provides a powerful solution adaptable to diverse environments and requirements.

Documentation

Please refer to the official documentation for detailed installation instructions, examples, and documentation.

Quickstart

Encrypt / Decrypt

Encryption and decryption can be done with a secret key. You can encrypt and decrypt data as shown below. Note that CKKS is a real-number-based scheme, so a very small error is introduced during encryption and decryption.

from desilofhe import Engine

engine = Engine()

secret_key = engine.create_secret_key()

data = [1, 2, 3]
encrypted = engine.encrypt(data, secret_key)
decrypted = engine.decrypt(encrypted, secret_key)

print(decrypted[:3]) # [1. 2. 3.]

Encryption can also be done with a public key, which is genereated from a secret key.

from desilofhe import Engine

engine = Engine()

secret_key = engine.create_secret_key()
public_key = engine.create_public_key(secret_key)

data = [1, 2, 3]
encrypted = engine.encrypt(data, public_key)
decrypted = engine.decrypt(encrypted, secret_key)

print(decrypted[:3]) # [1. 2. 3.]

Add / Subtract

To add or subtract ciphertext, no additional keys are required beyond the public and secret keys. You can encrypt data separately and then perform addition and subtraction as follows:

from desilofhe import Engine

engine = Engine()

secret_key = engine.create_secret_key()

data1 = [1, 2, 3]
encrypted1 = engine.encrypt(data1, secret_key)

data2 = [4, 5, 6]
encrypted2 = engine.encrypt(data2, secret_key)

added = engine.add(encrypted1, encrypted2)
subtracted = engine.subtract(encrypted1, encrypted2)

decrypted1 = engine.decrypt(added, secret_key)
decrypted2 = engine.decrypt(subtracted, secret_key)

print(decrypted1[:3], decrypted2[:3]) # [5. 7. 9.] [-3. -3. -3.]

Multiply

To multiply ciphertexts, a special key called the relinearization key is required due to the nature of homomorphic encryption. You can encrypt data and perform multiplication as shown below. Note that ciphertexts in homomorphic encryption have a maximum multiplication depth, which will decrease after multiplication.

from desilofhe import Engine

engine = Engine()

secret_key = engine.create_secret_key()
relinearization_key = engine.create_relinearization_key(secret_key)

data1 = [1, 2, 3]
encrypted1 = engine.encrypt(data1, secret_key)

data2 = [4, 5, 6]
encrypted2 = engine.encrypt(data2, secret_key)

multiplied = engine.multiply(encrypted1, encrypted2, relinearization_key)

decrypted = engine.decrypt(multiplied, secret_key)

print(decrypted[:3]) # [~4 ~10 ~18]
print(encrypted1.level, encrypted2.level, multiplied.level) # 7 7 6

Contact

If you have any questions, please contact us at library@desilo.ai.

Metadata

Release files for desilofhe 2.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for desilofhe 2.0.0
File Actions
desilofhe-2.0.0-cp314-cp314-musllinux_1_2_x86_64.whl CPython 3.14 CPython 3.14 Linux musl 1.2+ x86-64 Details for desilofhe-2.0.0-cp314-cp314-musllinux_1_2_x86_64.whl
desilofhe-2.0.0-cp314-cp314-manylinux_2_34_x86_64.whl CPython 3.14 CPython 3.14 Linux glibc 2.34+ x86-64 Details for desilofhe-2.0.0-cp314-cp314-manylinux_2_34_x86_64.whl
desilofhe-2.0.0-cp314-cp314-macosx_11_0_x86_64.whl CPython 3.14 CPython 3.14 macOS 11.0+ x86-64 Details for desilofhe-2.0.0-cp314-cp314-macosx_11_0_x86_64.whl
desilofhe-2.0.0-cp314-cp314-macosx_11_0_arm64.whl CPython 3.14 CPython 3.14 macOS 11.0+ ARM64 Details for desilofhe-2.0.0-cp314-cp314-macosx_11_0_arm64.whl
desilofhe-2.0.0-cp313-cp313-musllinux_1_2_x86_64.whl CPython 3.13 CPython 3.13 Linux musl 1.2+ x86-64 Details for desilofhe-2.0.0-cp313-cp313-musllinux_1_2_x86_64.whl
desilofhe-2.0.0-cp313-cp313-manylinux_2_34_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.34+ x86-64 Details for desilofhe-2.0.0-cp313-cp313-manylinux_2_34_x86_64.whl
desilofhe-2.0.0-cp313-cp313-macosx_11_0_x86_64.whl CPython 3.13 CPython 3.13 macOS 11.0+ x86-64 Details for desilofhe-2.0.0-cp313-cp313-macosx_11_0_x86_64.whl
desilofhe-2.0.0-cp313-cp313-macosx_11_0_arm64.whl CPython 3.13 CPython 3.13 macOS 11.0+ ARM64 Details for desilofhe-2.0.0-cp313-cp313-macosx_11_0_arm64.whl
desilofhe-2.0.0-cp312-cp312-musllinux_1_2_x86_64.whl CPython 3.12 CPython 3.12 Linux musl 1.2+ x86-64 Details for desilofhe-2.0.0-cp312-cp312-musllinux_1_2_x86_64.whl
desilofhe-2.0.0-cp312-cp312-manylinux_2_34_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.34+ x86-64 Details for desilofhe-2.0.0-cp312-cp312-manylinux_2_34_x86_64.whl
desilofhe-2.0.0-cp312-cp312-macosx_11_0_x86_64.whl CPython 3.12 CPython 3.12 macOS 11.0+ x86-64 Details for desilofhe-2.0.0-cp312-cp312-macosx_11_0_x86_64.whl
desilofhe-2.0.0-cp312-cp312-macosx_11_0_arm64.whl CPython 3.12 CPython 3.12 macOS 11.0+ ARM64 Details for desilofhe-2.0.0-cp312-cp312-macosx_11_0_arm64.whl
desilofhe-2.0.0-cp311-cp311-musllinux_1_2_x86_64.whl CPython 3.11 CPython 3.11 Linux musl 1.2+ x86-64 Details for desilofhe-2.0.0-cp311-cp311-musllinux_1_2_x86_64.whl
desilofhe-2.0.0-cp311-cp311-manylinux_2_34_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.34+ x86-64 Details for desilofhe-2.0.0-cp311-cp311-manylinux_2_34_x86_64.whl
desilofhe-2.0.0-cp311-cp311-macosx_11_0_x86_64.whl CPython 3.11 CPython 3.11 macOS 11.0+ x86-64 Details for desilofhe-2.0.0-cp311-cp311-macosx_11_0_x86_64.whl
desilofhe-2.0.0-cp311-cp311-macosx_11_0_arm64.whl CPython 3.11 CPython 3.11 macOS 11.0+ ARM64 Details for desilofhe-2.0.0-cp311-cp311-macosx_11_0_arm64.whl
desilofhe-2.0.0-cp310-cp310-musllinux_1_2_x86_64.whl CPython 3.10 CPython 3.10 Linux musl 1.2+ x86-64 Details for desilofhe-2.0.0-cp310-cp310-musllinux_1_2_x86_64.whl
desilofhe-2.0.0-cp310-cp310-manylinux_2_34_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.34+ x86-64 Details for desilofhe-2.0.0-cp310-cp310-manylinux_2_34_x86_64.whl
desilofhe-2.0.0-cp310-cp310-macosx_11_0_x86_64.whl CPython 3.10 CPython 3.10 macOS 11.0+ x86-64 Details for desilofhe-2.0.0-cp310-cp310-macosx_11_0_x86_64.whl
desilofhe-2.0.0-cp310-cp310-macosx_11_0_arm64.whl CPython 3.10 CPython 3.10 macOS 11.0+ ARM64 Details for desilofhe-2.0.0-cp310-cp310-macosx_11_0_arm64.whl

Total release size: 29.1 MB

Release files / desilofhe-2.0.0-cp314-cp314-musllinux_1_2_x86_64.whl

Download URL desilofhe-2.0.0-cp314-cp314-musllinux_1_2_x86_64.whl
Size 2.5 MB
Tags CPython 3.14 Linux musl 1.2+ x86-64
SHA-256 checksum
How to use checksums
eb95d82419542c78747faa11015e93757f36fc37e8a861739e666132f2482e93
BLAKE2b-256 checksum
How to use checksums
fe9da58b14fda22da02e6f85c5ab78031a8ebbc49ae5faab978fc2046e74491d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Release files / desilofhe-2.0.0-cp314-cp314-manylinux_2_34_x86_64.whl

Download URL desilofhe-2.0.0-cp314-cp314-manylinux_2_34_x86_64.whl
Size 1.5 MB
Tags CPython 3.14 Linux glibc 2.34+ x86-64
SHA-256 checksum
How to use checksums
b472e6bca70df3133dae1bd5da329972e7203986420dc73889c8adf5dae397ff
BLAKE2b-256 checksum
How to use checksums
cdd5cb9d6d622ad919f1c633afa152e1b17959f33ad291db40f921c3cefb09ce
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Release files / desilofhe-2.0.0-cp314-cp314-macosx_11_0_x86_64.whl

Download URL desilofhe-2.0.0-cp314-cp314-macosx_11_0_x86_64.whl
Size 915.1 kB
Tags CPython 3.14 macOS 11.0+ x86-64
SHA-256 checksum
How to use checksums
03f237465cb924a2e9bd7c26350fdebbfd3f5a17a1c560983456af3be03b9d35
BLAKE2b-256 checksum
How to use checksums
403c14314594899a9819c3616504402366a6d17752d3c5723afe5077a98f3bfc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Release files / desilofhe-2.0.0-cp314-cp314-macosx_11_0_arm64.whl

Download URL desilofhe-2.0.0-cp314-cp314-macosx_11_0_arm64.whl
Size 844.8 kB
Tags CPython 3.14 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
3d736c396b45222b7484fc16ea1e23b16e13d8aa568219a8e501705723e791eb
BLAKE2b-256 checksum
How to use checksums
799fa3cc9505d31fb86dbb988d6918193c17ac9182a48911cd950271f8cf19c1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Release files / desilofhe-2.0.0-cp313-cp313-musllinux_1_2_x86_64.whl

Download URL desilofhe-2.0.0-cp313-cp313-musllinux_1_2_x86_64.whl
Size 2.5 MB
Tags CPython 3.13 Linux musl 1.2+ x86-64
SHA-256 checksum
How to use checksums
1104956f1132ce211b1da95959ce9d12c728cf0c61177be79d6ee50637f48872
BLAKE2b-256 checksum
How to use checksums
92458ff9ee3a35e11af24b55f01194af4046fa69e2200d12ea774802ca03aafa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Release files / desilofhe-2.0.0-cp313-cp313-manylinux_2_34_x86_64.whl

Download URL desilofhe-2.0.0-cp313-cp313-manylinux_2_34_x86_64.whl
Size 1.5 MB
Tags CPython 3.13 Linux glibc 2.34+ x86-64
SHA-256 checksum
How to use checksums
990650d59968ea8cd1bbd4ba8592061534fc78871a05d22b2f952378a4cb8cf8
BLAKE2b-256 checksum
How to use checksums
3ab7e2f6261f97e0763e5c369cacce09b36b194bbe9dcc316d4812dfb82cc734
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Release files / desilofhe-2.0.0-cp313-cp313-macosx_11_0_x86_64.whl

Download URL desilofhe-2.0.0-cp313-cp313-macosx_11_0_x86_64.whl
Size 914.9 kB
Tags CPython 3.13 macOS 11.0+ x86-64
SHA-256 checksum
How to use checksums
3459f256ec22fc774022fb68ab103054db8950a09e036da2eb5d2aedccd1a664
BLAKE2b-256 checksum
How to use checksums
ce80fb6f16f11b67dc2b2121d22b43b6edc545ac1853ef03f32e0c02fd79283e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Release files / desilofhe-2.0.0-cp313-cp313-macosx_11_0_arm64.whl

Download URL desilofhe-2.0.0-cp313-cp313-macosx_11_0_arm64.whl
Size 844.9 kB
Tags CPython 3.13 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
82615fa45dddbee7a038fd44c4cdd4801d70ee314f268d43f878bd9bd45bd36d
BLAKE2b-256 checksum
How to use checksums
304840a56517a6bc2fb4514cdaadfc9096b9714c482d4628465df39a8a7c8126
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Release files / desilofhe-2.0.0-cp312-cp312-musllinux_1_2_x86_64.whl

Download URL desilofhe-2.0.0-cp312-cp312-musllinux_1_2_x86_64.whl
Size 2.5 MB
Tags CPython 3.12 Linux musl 1.2+ x86-64
SHA-256 checksum
How to use checksums
5fc071933d66f5462a091d4601a63a0b40cb4b2cef583e989e922c38610e47e4
BLAKE2b-256 checksum
How to use checksums
5e34aafbf2a6e7a9739f2c1ec1cac3a041e22aa2b0af93af824ac2d347754525
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Release files / desilofhe-2.0.0-cp312-cp312-manylinux_2_34_x86_64.whl

Download URL desilofhe-2.0.0-cp312-cp312-manylinux_2_34_x86_64.whl
Size 1.5 MB
Tags CPython 3.12 Linux glibc 2.34+ x86-64
SHA-256 checksum
How to use checksums
faa232fd29f3f570ab94ce269da4cbe1ce443fd3590b6fe104042db1e6dc9901
BLAKE2b-256 checksum
How to use checksums
a4fe24c685974e922724c8e2c72795f0bb134f13273398e1023a4e03d4190bed
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Release files / desilofhe-2.0.0-cp312-cp312-macosx_11_0_x86_64.whl

Download URL desilofhe-2.0.0-cp312-cp312-macosx_11_0_x86_64.whl
Size 914.6 kB
Tags CPython 3.12 macOS 11.0+ x86-64
SHA-256 checksum
How to use checksums
0e6cbbb99a3f92124e275e0db4cab01a0ecc7e77af1e784801556bdfdbfee954
BLAKE2b-256 checksum
How to use checksums
67b23807e3cc45ee78404428045eae9545f8ad21fa144a51892f76cfc1193b36
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Release files / desilofhe-2.0.0-cp312-cp312-macosx_11_0_arm64.whl

Download URL desilofhe-2.0.0-cp312-cp312-macosx_11_0_arm64.whl
Size 844.4 kB
Tags CPython 3.12 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
dca71be1a088fa7de4c46b0a0bc980f31e3447b42e4f07a8ef741a5d9c0cf3ae
BLAKE2b-256 checksum
How to use checksums
4e93112b1571ad80cab5b24e6e79757c82ac5b1619e7f75edda75aea4e02c536
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Release files / desilofhe-2.0.0-cp311-cp311-musllinux_1_2_x86_64.whl

Download URL desilofhe-2.0.0-cp311-cp311-musllinux_1_2_x86_64.whl
Size 2.6 MB
Tags CPython 3.11 Linux musl 1.2+ x86-64
SHA-256 checksum
How to use checksums
90c727ae5f8c688d4d42738f0d0046de79855906182028856d65e07f8247b945
BLAKE2b-256 checksum
How to use checksums
dd3761ea114f048176894270c89c27c159c29b5cf96bcdb716fe54e8a7a01e8e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Release files / desilofhe-2.0.0-cp311-cp311-manylinux_2_34_x86_64.whl

Download URL desilofhe-2.0.0-cp311-cp311-manylinux_2_34_x86_64.whl
Size 1.5 MB
Tags CPython 3.11 Linux glibc 2.34+ x86-64
SHA-256 checksum
How to use checksums
9501848593f0d8f435473174a5adf939b50c51f573b2790b6fb27429659d388f
BLAKE2b-256 checksum
How to use checksums
b5c92865888d0c355a73794d5190e3810036c322ca083797a1ae9fc27d1d7672
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Release files / desilofhe-2.0.0-cp311-cp311-macosx_11_0_x86_64.whl

Download URL desilofhe-2.0.0-cp311-cp311-macosx_11_0_x86_64.whl
Size 913.6 kB
Tags CPython 3.11 macOS 11.0+ x86-64
SHA-256 checksum
How to use checksums
6a66d9af37fe65f78fa62ec71d6bd386411493571ba4964f8ba40d77201867e3
BLAKE2b-256 checksum
How to use checksums
971830feccb0b1314c136c719030329ffb6b3ea7b15c58fb425ff8e79945afe3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Release files / desilofhe-2.0.0-cp311-cp311-macosx_11_0_arm64.whl

Download URL desilofhe-2.0.0-cp311-cp311-macosx_11_0_arm64.whl
Size 842.1 kB
Tags CPython 3.11 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
6705ac4b9f99dd5b22f7bd859eae73c0068b18ea17d5c3d381926a2ea852e1de
BLAKE2b-256 checksum
How to use checksums
95742d956753bafae627b8ad2190dcb2e18860f622f33dbd9aa569871582004d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Release files / desilofhe-2.0.0-cp310-cp310-musllinux_1_2_x86_64.whl

Download URL desilofhe-2.0.0-cp310-cp310-musllinux_1_2_x86_64.whl
Size 2.5 MB
Tags CPython 3.10 Linux musl 1.2+ x86-64
SHA-256 checksum
How to use checksums
2a964ea8e2c5d47431beb527beffbe863004ec864dc84df41cd0dc8bfc7a4e2b
BLAKE2b-256 checksum
How to use checksums
77fa7a8ae4afbaa487b26470f497da114c69763812d133e1cc6a06bc1a4f9d8c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Release files / desilofhe-2.0.0-cp310-cp310-manylinux_2_34_x86_64.whl

Download URL desilofhe-2.0.0-cp310-cp310-manylinux_2_34_x86_64.whl
Size 1.5 MB
Tags CPython 3.10 Linux glibc 2.34+ x86-64
SHA-256 checksum
How to use checksums
e85e481cbfd7c15b141394344e067e32f7a16ac4ae242fa975ea92b2fb0ccb5d
BLAKE2b-256 checksum
How to use checksums
80b7a82953c40372021a56cc19e9e6f07baf27ccb2474f14479ad2479408789c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Release files / desilofhe-2.0.0-cp310-cp310-macosx_11_0_x86_64.whl

Download URL desilofhe-2.0.0-cp310-cp310-macosx_11_0_x86_64.whl
Size 912.2 kB
Tags CPython 3.10 macOS 11.0+ x86-64
SHA-256 checksum
How to use checksums
f00582f440b9227aa0bac02763434ab65295979cd41d108a30935cb6f616e0dc
BLAKE2b-256 checksum
How to use checksums
46370dd6b8f4e6b175e9aa8d3762e911edcb04f8716f2378df1e87a2e1e47ed5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Release files / desilofhe-2.0.0-cp310-cp310-macosx_11_0_arm64.whl

Download URL desilofhe-2.0.0-cp310-cp310-macosx_11_0_arm64.whl
Size 840.6 kB
Tags CPython 3.10 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
8f789fa62e3dbcaf13d092a36111c026d254905ff9f89f548bbcad5bf35da2fb
BLAKE2b-256 checksum
How to use checksums
833d4431b41b1106d4ceeeefa6395adb3902a54653549eb854d35500d837254f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Security for desilofhe 2.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page