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.1

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.1
File Actions
desilofhe-2.0.1-cp315-cp315-musllinux_1_2_x86_64.whl CPython 3.15 CPython 3.15 Linux musl 1.2+ x86-64 Details for desilofhe-2.0.1-cp315-cp315-musllinux_1_2_x86_64.whl
desilofhe-2.0.1-cp315-cp315-manylinux_2_34_x86_64.whl CPython 3.15 CPython 3.15 Linux glibc 2.34+ x86-64 Details for desilofhe-2.0.1-cp315-cp315-manylinux_2_34_x86_64.whl
desilofhe-2.0.1-cp315-cp315-macosx_11_0_x86_64.whl CPython 3.15 CPython 3.15 macOS 11.0+ x86-64 Details for desilofhe-2.0.1-cp315-cp315-macosx_11_0_x86_64.whl
desilofhe-2.0.1-cp315-cp315-macosx_11_0_arm64.whl CPython 3.15 CPython 3.15 macOS 11.0+ ARM64 Details for desilofhe-2.0.1-cp315-cp315-macosx_11_0_arm64.whl
desilofhe-2.0.1-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.1-cp314-cp314-musllinux_1_2_x86_64.whl
desilofhe-2.0.1-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.1-cp314-cp314-manylinux_2_34_x86_64.whl
desilofhe-2.0.1-cp314-cp314-macosx_11_0_x86_64.whl CPython 3.14 CPython 3.14 macOS 11.0+ x86-64 Details for desilofhe-2.0.1-cp314-cp314-macosx_11_0_x86_64.whl
desilofhe-2.0.1-cp314-cp314-macosx_11_0_arm64.whl CPython 3.14 CPython 3.14 macOS 11.0+ ARM64 Details for desilofhe-2.0.1-cp314-cp314-macosx_11_0_arm64.whl
desilofhe-2.0.1-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.1-cp313-cp313-musllinux_1_2_x86_64.whl
desilofhe-2.0.1-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.1-cp313-cp313-manylinux_2_34_x86_64.whl
desilofhe-2.0.1-cp313-cp313-macosx_11_0_x86_64.whl CPython 3.13 CPython 3.13 macOS 11.0+ x86-64 Details for desilofhe-2.0.1-cp313-cp313-macosx_11_0_x86_64.whl
desilofhe-2.0.1-cp313-cp313-macosx_11_0_arm64.whl CPython 3.13 CPython 3.13 macOS 11.0+ ARM64 Details for desilofhe-2.0.1-cp313-cp313-macosx_11_0_arm64.whl
desilofhe-2.0.1-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.1-cp312-cp312-musllinux_1_2_x86_64.whl
desilofhe-2.0.1-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.1-cp312-cp312-manylinux_2_34_x86_64.whl
desilofhe-2.0.1-cp312-cp312-macosx_11_0_x86_64.whl CPython 3.12 CPython 3.12 macOS 11.0+ x86-64 Details for desilofhe-2.0.1-cp312-cp312-macosx_11_0_x86_64.whl
desilofhe-2.0.1-cp312-cp312-macosx_11_0_arm64.whl CPython 3.12 CPython 3.12 macOS 11.0+ ARM64 Details for desilofhe-2.0.1-cp312-cp312-macosx_11_0_arm64.whl
desilofhe-2.0.1-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.1-cp311-cp311-musllinux_1_2_x86_64.whl
desilofhe-2.0.1-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.1-cp311-cp311-manylinux_2_34_x86_64.whl
desilofhe-2.0.1-cp311-cp311-macosx_11_0_x86_64.whl CPython 3.11 CPython 3.11 macOS 11.0+ x86-64 Details for desilofhe-2.0.1-cp311-cp311-macosx_11_0_x86_64.whl
desilofhe-2.0.1-cp311-cp311-macosx_11_0_arm64.whl CPython 3.11 CPython 3.11 macOS 11.0+ ARM64 Details for desilofhe-2.0.1-cp311-cp311-macosx_11_0_arm64.whl

Total release size: 29.5 MB

Release files / desilofhe-2.0.1-cp315-cp315-musllinux_1_2_x86_64.whl

Download URL desilofhe-2.0.1-cp315-cp315-musllinux_1_2_x86_64.whl
Size 2.6 MB
Tags CPython 3.15 Linux musl 1.2+ x86-64
SHA-256 checksum
How to use checksums
5e3c843e552a5c56a2683ac9d442dcbd9a1cc52dbd95714a59025cb26ced33c7
BLAKE2b-256 checksum
How to use checksums
ed9f2ec2c82a5156677d2240552125ea913f822ade9af026a02e0aaebad20315
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Release files / desilofhe-2.0.1-cp315-cp315-manylinux_2_34_x86_64.whl

Download URL desilofhe-2.0.1-cp315-cp315-manylinux_2_34_x86_64.whl
Size 1.5 MB
Tags CPython 3.15 Linux glibc 2.34+ x86-64
SHA-256 checksum
How to use checksums
d1106762cf6cb1356cf47f7fc30ed087af1c197d081af14797468a0a5702f3c7
BLAKE2b-256 checksum
How to use checksums
5553d2e4c49385aa03d3ca791c4231da52e9258b1bda8341ff03b2f03c952070
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Release files / desilofhe-2.0.1-cp315-cp315-macosx_11_0_x86_64.whl

Download URL desilofhe-2.0.1-cp315-cp315-macosx_11_0_x86_64.whl
Size 934.3 kB
Tags CPython 3.15 macOS 11.0+ x86-64
SHA-256 checksum
How to use checksums
257ff54faf4474d94bac23a531507b4eb3bed201f0a4b9fe86eb98aed36d968e
BLAKE2b-256 checksum
How to use checksums
e21807e286dc02be60cc471cffc3a25ae4ed33d0321611b5d8e4da0bf6c77ac7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Release files / desilofhe-2.0.1-cp315-cp315-macosx_11_0_arm64.whl

Download URL desilofhe-2.0.1-cp315-cp315-macosx_11_0_arm64.whl
Size 864.0 kB
Tags CPython 3.15 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
a2cacc0e138c28a040142dc4744a7de7ff89b8b7d28bccf64d831c47d640714d
BLAKE2b-256 checksum
How to use checksums
0e84e39e642cbe0e6cc1dc5320029d4ab33eba247aeaab83113604260f9ffcfc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

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

Download URL desilofhe-2.0.1-cp314-cp314-musllinux_1_2_x86_64.whl
Size 2.6 MB
Tags CPython 3.14 Linux musl 1.2+ x86-64
SHA-256 checksum
How to use checksums
242e3f3cb0ce7e7ba3d8ffa8b483f8e0dd12cc5f382c1fa45189e39aef12378d
BLAKE2b-256 checksum
How to use checksums
fd26a3dc98f2a98f48a3835c64e9966f014d9be7d230121bcec005c437ef2852
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

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

Download URL desilofhe-2.0.1-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
c127d1b424a7bd27d83f1e48e988a1c54ef8e6b13440e2ab516b56364a24b8ec
BLAKE2b-256 checksum
How to use checksums
77f60559152e1573eb0ef341fd3c2923f77d8f769dc35c282d0e9d859cd708b4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

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

Download URL desilofhe-2.0.1-cp314-cp314-macosx_11_0_x86_64.whl
Size 934.3 kB
Tags CPython 3.14 macOS 11.0+ x86-64
SHA-256 checksum
How to use checksums
eaf9fdace0f07293ce3cfddb3adba2b622607edd9bd26dc13b35710d855fb0b7
BLAKE2b-256 checksum
How to use checksums
2ff89c6f57eab427da4f94ddad73a4c485feb224ef68380fc08f84ac33479edb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

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

Download URL desilofhe-2.0.1-cp314-cp314-macosx_11_0_arm64.whl
Size 864.0 kB
Tags CPython 3.14 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
d64f398b92bb77356cf7b1132023df46602de5af82bbdd0f08c8f868563ec627
BLAKE2b-256 checksum
How to use checksums
fb0153895018f79729d0afb5b50c19dda86cf86068fdaf4026306e8fd76b2803
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

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

Download URL desilofhe-2.0.1-cp313-cp313-musllinux_1_2_x86_64.whl
Size 2.6 MB
Tags CPython 3.13 Linux musl 1.2+ x86-64
SHA-256 checksum
How to use checksums
417dd547089d9ffbbec0439ae65370b18bdc451b88583d9108c0a2cb2e275ec7
BLAKE2b-256 checksum
How to use checksums
f58ff1663a9647cde62695c55286c44818693e6d157382a123412a6b19357c3a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

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

Download URL desilofhe-2.0.1-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
d82c1cddb5ab4ef8ff50e2624bbd9bcf7dd5ff9332a07b58a7e5eecbf0e8be0f
BLAKE2b-256 checksum
How to use checksums
ca10b4a9378d8691715ab9eb19f3a333b9f52c22925c948ca8c3d2760f69e1b1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

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

Download URL desilofhe-2.0.1-cp313-cp313-macosx_11_0_x86_64.whl
Size 934.1 kB
Tags CPython 3.13 macOS 11.0+ x86-64
SHA-256 checksum
How to use checksums
c1f6cd08b59602254cb032a2598b4854d997dabeaefc5ca2ff23dcc4400192b5
BLAKE2b-256 checksum
How to use checksums
a4759496b57a8e6c99410b1078b91dea4d2f52e5f40f48eb7c0f1f8345f77e25
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

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

Download URL desilofhe-2.0.1-cp313-cp313-macosx_11_0_arm64.whl
Size 864.0 kB
Tags CPython 3.13 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
e765744f5fa02d41ba458b2456ebe75b848846899116ad358310fb743af73514
BLAKE2b-256 checksum
How to use checksums
f00184ad3ca25a5c99b89d84a976ad65018be5b9065a943abdbd1f4329c402a2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

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

Download URL desilofhe-2.0.1-cp312-cp312-musllinux_1_2_x86_64.whl
Size 2.6 MB
Tags CPython 3.12 Linux musl 1.2+ x86-64
SHA-256 checksum
How to use checksums
427ce2ce9b9ebe1c5b4188fab2886f8d9bb82b0421b67c870b66ccca573fc281
BLAKE2b-256 checksum
How to use checksums
8bac9f8acefe04b55d9feb6ed7599bed1d6ebca3cb2d1e0e8d563abd23ef7e39
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

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

Download URL desilofhe-2.0.1-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
e0b4f1ac207673cb82562f1c4e1efa74f3aa56eea72cb690fb026d48c3789165
BLAKE2b-256 checksum
How to use checksums
a58e483ee20d176f30ba86695b4b608123e87c4fff4cbc99f2a25a53a1a5b9e8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

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

Download URL desilofhe-2.0.1-cp312-cp312-macosx_11_0_x86_64.whl
Size 933.9 kB
Tags CPython 3.12 macOS 11.0+ x86-64
SHA-256 checksum
How to use checksums
02acae7f50b728f84f83f17e5b0d5134dcab85a9f881bc6ec4b1013200c8bc98
BLAKE2b-256 checksum
How to use checksums
701deec8188923232b04591a6e8cfa4020b45c5baca568327019797295577962
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

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

Download URL desilofhe-2.0.1-cp312-cp312-macosx_11_0_arm64.whl
Size 863.7 kB
Tags CPython 3.12 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
d649e8ffe400ac15017206e285503e6eca6fe9f789d8fb8769f4b53f519e3600
BLAKE2b-256 checksum
How to use checksums
99adba56dd6a8ebc5745348288c5a06406243527901f8efd336bffd5a86351ad
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

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

Download URL desilofhe-2.0.1-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
f02501fcf11cc0aed7ae568d4f363e07e31ae76224793acc4a5957bd0eae4a75
BLAKE2b-256 checksum
How to use checksums
a5dcc336685f555f9d6277de24fdfdb8468e295de8f00c081860615959671d3e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

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

Download URL desilofhe-2.0.1-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
b09f9fc7a4345ea1a9689cd055c4a1b4fdbb945e0c64e13b06033a241c057fc7
BLAKE2b-256 checksum
How to use checksums
0898b20d4a6d6edd9a343ec684700906dd09fbd8919c7cac2e8c3ed85481904e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

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

Download URL desilofhe-2.0.1-cp311-cp311-macosx_11_0_x86_64.whl
Size 932.8 kB
Tags CPython 3.11 macOS 11.0+ x86-64
SHA-256 checksum
How to use checksums
3f4ba7f4c0e6d10476ebe59311329041dfff0a1986d04456cfc49994d6546271
BLAKE2b-256 checksum
How to use checksums
be7b0c4f420082fae30d7314efa70b6f920237fb4f430eb7ffd31256001bfafc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

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

Download URL desilofhe-2.0.1-cp311-cp311-macosx_11_0_arm64.whl
Size 862.6 kB
Tags CPython 3.11 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
5f4b0457c0355b0feeba8075919695a27f2dfe123c420217c67ac1d246a5d357
BLAKE2b-256 checksum
How to use checksums
87f6c01101f232e6828401ec39d236aba4ade02349b4a0ba1d77d191b5dbe958
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Security for desilofhe 2.0.1

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