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-cu134 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-cu134 2.0.0
File Actions
desilofhe_cu134-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_cu134-2.0.0-cp314-cp314-manylinux_2_34_x86_64.whl
desilofhe_cu134-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_cu134-2.0.0-cp313-cp313-manylinux_2_34_x86_64.whl
desilofhe_cu134-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_cu134-2.0.0-cp312-cp312-manylinux_2_34_x86_64.whl
desilofhe_cu134-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_cu134-2.0.0-cp311-cp311-manylinux_2_34_x86_64.whl
desilofhe_cu134-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_cu134-2.0.0-cp310-cp310-manylinux_2_34_x86_64.whl

Total release size: 13.5 MB

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

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

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

Download URL desilofhe_cu134-2.0.0-cp313-cp313-manylinux_2_34_x86_64.whl
Size 2.7 MB
Tags CPython 3.13 Linux glibc 2.34+ x86-64
SHA-256 checksum
How to use checksums
7abe08d3b79daf136c91496bec962c7ab8243c230acf43f4503c8339d15a3d27
BLAKE2b-256 checksum
How to use checksums
9e69082c6b34e24430f3436412a5b667c018e3c2873ad6eef8db539b163e7143
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

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

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

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

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

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

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

Security for desilofhe-cu134 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

This release

2.0.0 This release

5 release files No provenance

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