The DESILO Fully Homomorphic Encryption (FHE) library
Project description
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file desilofhe-1.12.0-cp314-cp314-musllinux_1_2_x86_64.whl.
File metadata
- Download URL: desilofhe-1.12.0-cp314-cp314-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 2.1 MB
- Tags: CPython 3.14, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7254b1b5a946316fe7c57c7c4c0503517c644bed547bd07fda281c9149ea8957
|
|
| MD5 |
3890d0e7c618613749f916a497e73e87
|
|
| BLAKE2b-256 |
b2de0a0e415da3be09f24b1a95888d610803d923060734475a478a979cf11620
|
File details
Details for the file desilofhe-1.12.0-cp314-cp314-manylinux_2_34_x86_64.whl.
File metadata
- Download URL: desilofhe-1.12.0-cp314-cp314-manylinux_2_34_x86_64.whl
- Upload date:
- Size: 1.0 MB
- Tags: CPython 3.14, manylinux: glibc 2.34+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
69930efc7667a037d70057e3c89c4e83eff3eb2c437a8d94a35ea1d540f3289a
|
|
| MD5 |
2d97860ac6601d2f9d228710a53bc7ea
|
|
| BLAKE2b-256 |
813d28c2b662acb8469d9799a7b2bbb95f33d28d1b88abc23bc63185dda2f228
|
File details
Details for the file desilofhe-1.12.0-cp314-cp314-macosx_11_0_x86_64.whl.
File metadata
- Download URL: desilofhe-1.12.0-cp314-cp314-macosx_11_0_x86_64.whl
- Upload date:
- Size: 864.8 kB
- Tags: CPython 3.14, macOS 11.0+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bbd550b336e3f3b16edae50d05748312998e52c50cd920271005bd7a69fef15e
|
|
| MD5 |
0b9f383ebd9d438a36a21831f1f17505
|
|
| BLAKE2b-256 |
54720728b2e841e652f831b99e615243d085a72f1ed72e4536a9f44d21cd8229
|
File details
Details for the file desilofhe-1.12.0-cp314-cp314-macosx_11_0_arm64.whl.
File metadata
- Download URL: desilofhe-1.12.0-cp314-cp314-macosx_11_0_arm64.whl
- Upload date:
- Size: 766.8 kB
- Tags: CPython 3.14, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
71b1229f81c0a984660a573bec3307e5cc324b5993dbc084c0d7e69e5ac812d0
|
|
| MD5 |
5f2de04d07a3341c85387defd14d5f6f
|
|
| BLAKE2b-256 |
e599551cf4872f7effd2585b6f7f3f77260c48a4fe1fb65b41f7a4c5e2bce1c8
|
File details
Details for the file desilofhe-1.12.0-cp313-cp313-musllinux_1_2_x86_64.whl.
File metadata
- Download URL: desilofhe-1.12.0-cp313-cp313-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 2.1 MB
- Tags: CPython 3.13, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
91f6c1dadc9c0f389ff32356b2d6cc377175b9b596e38ade9ef26d3348da948b
|
|
| MD5 |
7d05854a32afdaf8f8d807af9154c1ce
|
|
| BLAKE2b-256 |
e52ef1834137587ffe43a564de1257d01e6a40730d6b4262400d0ef42bacd0dd
|
File details
Details for the file desilofhe-1.12.0-cp313-cp313-manylinux_2_34_x86_64.whl.
File metadata
- Download URL: desilofhe-1.12.0-cp313-cp313-manylinux_2_34_x86_64.whl
- Upload date:
- Size: 1.0 MB
- Tags: CPython 3.13, manylinux: glibc 2.34+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
24b17770bada457f90a68fa87bfb531985ec7f15b32f8b86fe3f383c3b27af96
|
|
| MD5 |
6fb6a9d5a63e4356fd3ec8b1bfde1108
|
|
| BLAKE2b-256 |
2f28e120a2100e3653d869a83980922384fd20ceff0188518e581de3e8f246ed
|
File details
Details for the file desilofhe-1.12.0-cp313-cp313-macosx_11_0_x86_64.whl.
File metadata
- Download URL: desilofhe-1.12.0-cp313-cp313-macosx_11_0_x86_64.whl
- Upload date:
- Size: 864.7 kB
- Tags: CPython 3.13, macOS 11.0+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c16b3b319d5f00c8bdb20ca6b902e17d9c3e4b39dcd80ab57a5a431380f82424
|
|
| MD5 |
9049babe8c8ae3d04d453bfeab06db15
|
|
| BLAKE2b-256 |
55eb7edac6241f2ff6c7bac1e868a8bd1379cbce8902428140baf0e85cbc003e
|
File details
Details for the file desilofhe-1.12.0-cp313-cp313-macosx_11_0_arm64.whl.
File metadata
- Download URL: desilofhe-1.12.0-cp313-cp313-macosx_11_0_arm64.whl
- Upload date:
- Size: 766.6 kB
- Tags: CPython 3.13, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a521a8687aa14055faf3ad55dc8223e283b38cc481b60b2437ecf999891d7051
|
|
| MD5 |
42401daec139f46d7cd43d3716a100dd
|
|
| BLAKE2b-256 |
3cc9a4e6e3523cf97433c0c7b350dd65c222d77007a18780d67688ddb399ae62
|
File details
Details for the file desilofhe-1.12.0-cp312-cp312-musllinux_1_2_x86_64.whl.
File metadata
- Download URL: desilofhe-1.12.0-cp312-cp312-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 2.1 MB
- Tags: CPython 3.12, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
37123d4fd72d94dae9c643cee3bcf4492e323ba3539631679bad9789f1549ebe
|
|
| MD5 |
f65d6d79c589b63d755ddf50f7678aea
|
|
| BLAKE2b-256 |
6e94ce0f4ebe50100acbd99f8d94fff4e599b59fbae05cc021784fb812ef0f09
|
File details
Details for the file desilofhe-1.12.0-cp312-cp312-manylinux_2_34_x86_64.whl.
File metadata
- Download URL: desilofhe-1.12.0-cp312-cp312-manylinux_2_34_x86_64.whl
- Upload date:
- Size: 1.0 MB
- Tags: CPython 3.12, manylinux: glibc 2.34+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
665485192f182a391b9aaa2d08648f76d5781e83b76886f98efdfdfa08f3e640
|
|
| MD5 |
f75f783b05e381f3561a22149b85506b
|
|
| BLAKE2b-256 |
65a998a574ef1b00fcc15d9c74e0245d603d83134a841dab60cbf3c233062079
|
File details
Details for the file desilofhe-1.12.0-cp312-cp312-macosx_11_0_x86_64.whl.
File metadata
- Download URL: desilofhe-1.12.0-cp312-cp312-macosx_11_0_x86_64.whl
- Upload date:
- Size: 864.5 kB
- Tags: CPython 3.12, macOS 11.0+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b32f745baf3ef35e76bd7d3291061d1498b685db63f24abfed0fa01c85964472
|
|
| MD5 |
b1738d7d0e1643a5b55331f1177a1a83
|
|
| BLAKE2b-256 |
1d23c78deba85a8b3fa3c739df978a50f3cd1ceacf6929d913d8b2c06489ac5b
|
File details
Details for the file desilofhe-1.12.0-cp312-cp312-macosx_11_0_arm64.whl.
File metadata
- Download URL: desilofhe-1.12.0-cp312-cp312-macosx_11_0_arm64.whl
- Upload date:
- Size: 766.4 kB
- Tags: CPython 3.12, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3d3d7d9f9de0f286216c4a96ac59c060214e8fa5b3d3becd5b6366be4688701d
|
|
| MD5 |
eeed67f29b516b3f66f4743c03603d3e
|
|
| BLAKE2b-256 |
26ea19dfc1d3695aa166aa5405aea1fc750ab0cccb0799377a62e73234ca250a
|
File details
Details for the file desilofhe-1.12.0-cp311-cp311-musllinux_1_2_x86_64.whl.
File metadata
- Download URL: desilofhe-1.12.0-cp311-cp311-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 2.1 MB
- Tags: CPython 3.11, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1050cd1a6ed56caaacc00f76fe38e849176d6a085a79eb20dd39c9391baedfd9
|
|
| MD5 |
95286257c3e756afa4ab65aef68ee40b
|
|
| BLAKE2b-256 |
d8d05727aea7783c12ef7c83d28d16ebcbe3c7836b73e4b6ddf95b67959fdd39
|
File details
Details for the file desilofhe-1.12.0-cp311-cp311-manylinux_2_34_x86_64.whl.
File metadata
- Download URL: desilofhe-1.12.0-cp311-cp311-manylinux_2_34_x86_64.whl
- Upload date:
- Size: 1.0 MB
- Tags: CPython 3.11, manylinux: glibc 2.34+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a7e18badefd2eeb9d0dbc4982b7a632752375a135190a33a0e78cb18826b4db1
|
|
| MD5 |
61e4700105995294202a9ef70b90de5d
|
|
| BLAKE2b-256 |
c0478e4e1212ab67711bed25b3ab83ee4c4176cf7bba3b74e1517bd10a071adb
|
File details
Details for the file desilofhe-1.12.0-cp311-cp311-macosx_11_0_x86_64.whl.
File metadata
- Download URL: desilofhe-1.12.0-cp311-cp311-macosx_11_0_x86_64.whl
- Upload date:
- Size: 863.6 kB
- Tags: CPython 3.11, macOS 11.0+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b2c921f6c254eb8f85ff505f513ff7b23e0cb6f390c516d616f7133f28489969
|
|
| MD5 |
9c96cd4ce463a0a6aac0adf3cb9e4cc8
|
|
| BLAKE2b-256 |
dadd9dccc7c23bb146c5529037644d63dcac3bbeb584140f7aa8348738287793
|
File details
Details for the file desilofhe-1.12.0-cp311-cp311-macosx_11_0_arm64.whl.
File metadata
- Download URL: desilofhe-1.12.0-cp311-cp311-macosx_11_0_arm64.whl
- Upload date:
- Size: 764.8 kB
- Tags: CPython 3.11, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a2cc20868a646ee8f258397c27c243248b9220f964e20d8ca9969c2f2f64aeeb
|
|
| MD5 |
52f16b21b82e77825fb4cbb59239467f
|
|
| BLAKE2b-256 |
25a520c9a98647b77d922709cef8e3f4399a921131f0a89c91d5838ae1241555
|
File details
Details for the file desilofhe-1.12.0-cp310-cp310-musllinux_1_2_x86_64.whl.
File metadata
- Download URL: desilofhe-1.12.0-cp310-cp310-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 2.1 MB
- Tags: CPython 3.10, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c4cbf93c5fa911c75098ca2a975d03bf98f0a8f4455bb7a84c3ca39c9163ec3e
|
|
| MD5 |
d36515c507b9e92bf407ebcc6a0707e2
|
|
| BLAKE2b-256 |
8c43a4cc104c21550d33002de839bbf4925d3cb090d556340beb1a06b9583398
|
File details
Details for the file desilofhe-1.12.0-cp310-cp310-manylinux_2_34_x86_64.whl.
File metadata
- Download URL: desilofhe-1.12.0-cp310-cp310-manylinux_2_34_x86_64.whl
- Upload date:
- Size: 1.0 MB
- Tags: CPython 3.10, manylinux: glibc 2.34+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cce08b41969ea0c354f65aa8aa4883fd16410be5b463b932f63cc2ca8e20a127
|
|
| MD5 |
188de0b654ea03b492e171114d47fcca
|
|
| BLAKE2b-256 |
b475b35cb72ebe4e398b931a04218b7d1eaa7515f19742633f71714c82876a13
|
File details
Details for the file desilofhe-1.12.0-cp310-cp310-macosx_11_0_x86_64.whl.
File metadata
- Download URL: desilofhe-1.12.0-cp310-cp310-macosx_11_0_x86_64.whl
- Upload date:
- Size: 859.5 kB
- Tags: CPython 3.10, macOS 11.0+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
af28636f56e0b416352b5ff80161c3e9629d8c04964eefe8c7f0f4f3da03f637
|
|
| MD5 |
a8360df404c6cd0077dc1bee74f58194
|
|
| BLAKE2b-256 |
8c13b1a1afb9dae5f613d51631fd338ef6393d7aeeeebc9fc0fcd52003e316eb
|
File details
Details for the file desilofhe-1.12.0-cp310-cp310-macosx_11_0_arm64.whl.
File metadata
- Download URL: desilofhe-1.12.0-cp310-cp310-macosx_11_0_arm64.whl
- Upload date:
- Size: 762.4 kB
- Tags: CPython 3.10, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d64d11221e69a5760fe237b15e9474a67507a6b7720076c15b0e2f3aff119649
|
|
| MD5 |
b895ad360edfbb897d6cfdcda4abea9f
|
|
| BLAKE2b-256 |
23953e4344b4db73b5ae4f4b700fea6e490696abb2f6cb1a3bdf2c9b90e42e9e
|