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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

desilofhe-1.16.0-cp314-cp314-musllinux_1_2_x86_64.whl (2.1 MB view details)

Uploaded CPython 3.14musllinux: musl 1.2+ x86-64

desilofhe-1.16.0-cp314-cp314-manylinux_2_34_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.34+ x86-64

desilofhe-1.16.0-cp314-cp314-macosx_11_0_x86_64.whl (850.9 kB view details)

Uploaded CPython 3.14macOS 11.0+ x86-64

desilofhe-1.16.0-cp314-cp314-macosx_11_0_arm64.whl (772.4 kB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

desilofhe-1.16.0-cp313-cp313-musllinux_1_2_x86_64.whl (2.1 MB view details)

Uploaded CPython 3.13musllinux: musl 1.2+ x86-64

desilofhe-1.16.0-cp313-cp313-manylinux_2_34_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.34+ x86-64

desilofhe-1.16.0-cp313-cp313-macosx_11_0_x86_64.whl (850.9 kB view details)

Uploaded CPython 3.13macOS 11.0+ x86-64

desilofhe-1.16.0-cp313-cp313-macosx_11_0_arm64.whl (772.2 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

desilofhe-1.16.0-cp312-cp312-musllinux_1_2_x86_64.whl (2.1 MB view details)

Uploaded CPython 3.12musllinux: musl 1.2+ x86-64

desilofhe-1.16.0-cp312-cp312-manylinux_2_34_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.34+ x86-64

desilofhe-1.16.0-cp312-cp312-macosx_11_0_x86_64.whl (850.2 kB view details)

Uploaded CPython 3.12macOS 11.0+ x86-64

desilofhe-1.16.0-cp312-cp312-macosx_11_0_arm64.whl (771.8 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

desilofhe-1.16.0-cp311-cp311-musllinux_1_2_x86_64.whl (2.1 MB view details)

Uploaded CPython 3.11musllinux: musl 1.2+ x86-64

desilofhe-1.16.0-cp311-cp311-manylinux_2_34_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.34+ x86-64

desilofhe-1.16.0-cp311-cp311-macosx_11_0_x86_64.whl (849.4 kB view details)

Uploaded CPython 3.11macOS 11.0+ x86-64

desilofhe-1.16.0-cp311-cp311-macosx_11_0_arm64.whl (769.8 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

desilofhe-1.16.0-cp310-cp310-musllinux_1_2_x86_64.whl (2.1 MB view details)

Uploaded CPython 3.10musllinux: musl 1.2+ x86-64

desilofhe-1.16.0-cp310-cp310-manylinux_2_34_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.34+ x86-64

desilofhe-1.16.0-cp310-cp310-macosx_11_0_x86_64.whl (847.1 kB view details)

Uploaded CPython 3.10macOS 11.0+ x86-64

desilofhe-1.16.0-cp310-cp310-macosx_11_0_arm64.whl (767.8 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

File details

Details for the file desilofhe-1.16.0-cp314-cp314-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for desilofhe-1.16.0-cp314-cp314-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 1640fe2c45667b01244437eb9327b0333eac5163c33f49875ca747d32c677d1b
MD5 7f732a48f2efec86fcb09ca01346da5f
BLAKE2b-256 54008c04f6ccefcaba7a0c4b14c36a2bab46770976afb7b3e33b0f7e3405a476

See more details on using hashes here.

File details

Details for the file desilofhe-1.16.0-cp314-cp314-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for desilofhe-1.16.0-cp314-cp314-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 1c833e4bbbeca92793ded8a73f3b009802c78d0b1c5d87e3afb44e3f60ce618c
MD5 4d595bbce83458c4805d7448387e1625
BLAKE2b-256 36541fae728beac6447935fd71144a9e4b65528a110f86e443f7fc6f14235914

See more details on using hashes here.

File details

Details for the file desilofhe-1.16.0-cp314-cp314-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for desilofhe-1.16.0-cp314-cp314-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 fe9e6f1a6b3ae301df92f5d92d665d46a004e1dbe3a904e156f7f9e411f8e982
MD5 c0ec91e89815ca94ed2e4091de9cf719
BLAKE2b-256 e580bd62ff8ce37837f86926b4a145ae131afc8fd7f8baa5933b18e2d130c082

See more details on using hashes here.

File details

Details for the file desilofhe-1.16.0-cp314-cp314-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for desilofhe-1.16.0-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 333b13a0d01404d89dd9860a90c078d6e0d05208bed0db2928c08d6d070725bc
MD5 cb50c1b799c9ce40ebae22f4181ffc81
BLAKE2b-256 d5f471caa1ea28c82b03107c8931c3fa75fe4c42e481bbe1e16f3781b9b4dbdc

See more details on using hashes here.

File details

Details for the file desilofhe-1.16.0-cp313-cp313-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for desilofhe-1.16.0-cp313-cp313-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 e9497f764543b05c342377893a0c4963d1a231e881b85760cc1702d861d979ea
MD5 91b902a2fb1956544c600473d6ddf5e4
BLAKE2b-256 a7c1a006f2ff380ca90bba892aafdfb315beeb74aa26fbca7c5fd99ec7a9d865

See more details on using hashes here.

File details

Details for the file desilofhe-1.16.0-cp313-cp313-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for desilofhe-1.16.0-cp313-cp313-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 eb98352d3fa7d0fb0a95e5168cc360210b88faeff874b93b937f9dd59dcaba2a
MD5 7c0d04d69a6699fb743df2e864963a0c
BLAKE2b-256 877642616b8ba6d4d63d92d5c521a8b6c0296b02c35cf9cf4aea6a98e8ee896c

See more details on using hashes here.

File details

Details for the file desilofhe-1.16.0-cp313-cp313-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for desilofhe-1.16.0-cp313-cp313-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 db39965a523d7926ad65afec9069b7de5b0b4afd7be8de1e6e0cc66bb3501ea9
MD5 7f6d4379ec4d29aa2920fe2cd46075a1
BLAKE2b-256 f225b420455a04303e922a939039b936730b02421118a91453992661f2d6db51

See more details on using hashes here.

File details

Details for the file desilofhe-1.16.0-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for desilofhe-1.16.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 36119af43127842d1189700833b96b42b6f0fb27d29b22328ce05953ee987bcc
MD5 b769b1b43841317e7ae6d26861b7abdb
BLAKE2b-256 c037531d511a507e4309671c5df0b8eecfa7010e5e1518b4c664814bb0cd9983

See more details on using hashes here.

File details

Details for the file desilofhe-1.16.0-cp312-cp312-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for desilofhe-1.16.0-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 94cb5ad237535e3219e2023773b16e03d19e83b6b9c538bd754b6d32c0677efc
MD5 296c3106565f92e09a6ec52709e3a745
BLAKE2b-256 dd250e5ba18b200b9d812bf9a785f7c36f4fe72460576b0a46029fe712fb5773

See more details on using hashes here.

File details

Details for the file desilofhe-1.16.0-cp312-cp312-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for desilofhe-1.16.0-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 831ac1481b8757c9b214676691e58d3eaccafa63c0fe1c34bdb1a87e7ac4fb17
MD5 f3ba12e1f1bf48816039126f51777039
BLAKE2b-256 6b34343595c8e5fb4db502b779375f512f88556116143e0c5a7fd8504a7221cf

See more details on using hashes here.

File details

Details for the file desilofhe-1.16.0-cp312-cp312-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for desilofhe-1.16.0-cp312-cp312-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 01d0b6acb6525ec5d87f5f2c71d9d4b949f3023e4cf97fb2bc47b174bfc6ed5b
MD5 8b3040dac7259e1d9a714889631646ea
BLAKE2b-256 bbc49343da142ff8c662b8b59fc1577c5706d185afe86f8bba5b6b6d9a318f3c

See more details on using hashes here.

File details

Details for the file desilofhe-1.16.0-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for desilofhe-1.16.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f21774927a584a29d968449aadc9dbcff6c8a947d48b9b33ebb049ad870dd3c5
MD5 ddd2d7826efbe279594b568e07043d99
BLAKE2b-256 e94db9a8baeff232249e20f674682d254d3251292ab35d371772a49216914e61

See more details on using hashes here.

File details

Details for the file desilofhe-1.16.0-cp311-cp311-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for desilofhe-1.16.0-cp311-cp311-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 5efd3249ecae724452d6b40e996bb848f1340c43574319924ac0f2195166627d
MD5 d1f114414d03fe801d9594c9592866d5
BLAKE2b-256 582d0c3b4286ddce4771eaf6dbb3fc5e369cdfa2723c62d23c8173140e0e5210

See more details on using hashes here.

File details

Details for the file desilofhe-1.16.0-cp311-cp311-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for desilofhe-1.16.0-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 c39bb707f07215bdacf6a1293db3000c2eaa22c32a9581cb140ef91c42764489
MD5 f1be35cda6a20fa27236034a8d065ca5
BLAKE2b-256 66439ec366c6e3a66dacd159121849de2fdd21c80d539b5cf22bd0eefdae11df

See more details on using hashes here.

File details

Details for the file desilofhe-1.16.0-cp311-cp311-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for desilofhe-1.16.0-cp311-cp311-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 161a4a486f2113b5b8d4e48508be4fbdbcb0aea33de00eb26d818e3e00330661
MD5 37131bb8f5ebaa94cf312c51e7f233ff
BLAKE2b-256 3f8457f2ba834bd1bf18e8f0b8d1ad278b43223d262f1a4f414b984b461db107

See more details on using hashes here.

File details

Details for the file desilofhe-1.16.0-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for desilofhe-1.16.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 eca115800c8b5bebcdce08a9adf724ec5f5af5efc2b54bdc2ee5aabe67c41f70
MD5 bfad0bb4bfd8a18f83a7017f095c0153
BLAKE2b-256 0a2804d8ff056f0f729d1948b574de6885549f635ad97506611cb5df185c7c45

See more details on using hashes here.

File details

Details for the file desilofhe-1.16.0-cp310-cp310-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for desilofhe-1.16.0-cp310-cp310-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 ac45b313a2170b3ea0c582f61fa60553d93aa95f581f8d7a21fe7510e7628a3b
MD5 c4d471e2c5f041b63534a0d1442d3e9e
BLAKE2b-256 3dda049b2f37b008c705261c4a86c930cf73026b7dd4ea0deeb74d68833ea10b

See more details on using hashes here.

File details

Details for the file desilofhe-1.16.0-cp310-cp310-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for desilofhe-1.16.0-cp310-cp310-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 fc2f212867c236d70026417f53ccf4287001aca7057c081b2e65c01b8e9a0d98
MD5 7948e90b844db8e561c5688016ec8492
BLAKE2b-256 df7e0ebdbd4edd1039938095802f63b9ae9fd976279228f306ceadefbb3039d8

See more details on using hashes here.

File details

Details for the file desilofhe-1.16.0-cp310-cp310-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for desilofhe-1.16.0-cp310-cp310-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 020d089d39f6d9bd3435a6d2f2be3e5aa2744eb84ad43f8f9a36431abe573e78
MD5 b38420e28747661507bace7708171b0f
BLAKE2b-256 d1a5c2847f33322c06073c9f53a5daa0b9b6dbdd0b667192d262c335a991f656

See more details on using hashes here.

File details

Details for the file desilofhe-1.16.0-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for desilofhe-1.16.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9063e5ca8b9770e484c795aa3583e29930f87dc5400d1692d669a7a39f538656
MD5 4efbb987584d964bfa331c387c2b8c52
BLAKE2b-256 abd4d68e9287e32a4b5fd1edf5201ccb8294f61c6dc20accde4d8925bccbb962

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.16.0 This release

20 files

1.15.1

20 files

1.15.0

20 files

1.14.1

20 files

1.14.0

20 files

1.13.0

20 files

1.12.0

20 files

1.11.2

20 files

1.11.1

20 files

1.11.0

20 files

1.10.0

20 files

1.9.0

20 files

1.8.0

20 files

1.7.0

20 files

1.6.0

20 files

1.5.1

20 files

1.5.0

20 files

1.4.0

20 files

1.3.0

20 files

1.2.0

20 files

1.1.1

20 files

1.1.0

20 files

1.0.3

20 files

1.0.2

20 files

1.0.1

5 files

1.0.0

5 files

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