Skip to main content

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


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.8.0-cp314-cp314-musllinux_1_2_x86_64.whl (1.9 MB view details)

Uploaded CPython 3.14musllinux: musl 1.2+ x86-64

desilofhe-1.8.0-cp314-cp314-manylinux_2_34_x86_64.whl (823.8 kB view details)

Uploaded CPython 3.14manylinux: glibc 2.34+ x86-64

desilofhe-1.8.0-cp314-cp314-macosx_11_0_x86_64.whl (697.6 kB view details)

Uploaded CPython 3.14macOS 11.0+ x86-64

desilofhe-1.8.0-cp314-cp314-macosx_11_0_arm64.whl (613.1 kB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

desilofhe-1.8.0-cp313-cp313-musllinux_1_2_x86_64.whl (1.9 MB view details)

Uploaded CPython 3.13musllinux: musl 1.2+ x86-64

desilofhe-1.8.0-cp313-cp313-manylinux_2_34_x86_64.whl (823.8 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.34+ x86-64

desilofhe-1.8.0-cp313-cp313-macosx_11_0_x86_64.whl (697.5 kB view details)

Uploaded CPython 3.13macOS 11.0+ x86-64

desilofhe-1.8.0-cp313-cp313-macosx_11_0_arm64.whl (613.0 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

desilofhe-1.8.0-cp312-cp312-musllinux_1_2_x86_64.whl (1.9 MB view details)

Uploaded CPython 3.12musllinux: musl 1.2+ x86-64

desilofhe-1.8.0-cp312-cp312-manylinux_2_34_x86_64.whl (824.6 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.34+ x86-64

desilofhe-1.8.0-cp312-cp312-macosx_11_0_x86_64.whl (696.5 kB view details)

Uploaded CPython 3.12macOS 11.0+ x86-64

desilofhe-1.8.0-cp312-cp312-macosx_11_0_arm64.whl (612.1 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

desilofhe-1.8.0-cp311-cp311-musllinux_1_2_x86_64.whl (1.9 MB view details)

Uploaded CPython 3.11musllinux: musl 1.2+ x86-64

desilofhe-1.8.0-cp311-cp311-manylinux_2_34_x86_64.whl (824.6 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.34+ x86-64

desilofhe-1.8.0-cp311-cp311-macosx_11_0_x86_64.whl (696.6 kB view details)

Uploaded CPython 3.11macOS 11.0+ x86-64

desilofhe-1.8.0-cp311-cp311-macosx_11_0_arm64.whl (611.8 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

desilofhe-1.8.0-cp310-cp310-musllinux_1_2_x86_64.whl (1.9 MB view details)

Uploaded CPython 3.10musllinux: musl 1.2+ x86-64

desilofhe-1.8.0-cp310-cp310-manylinux_2_34_x86_64.whl (823.9 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.34+ x86-64

desilofhe-1.8.0-cp310-cp310-macosx_11_0_x86_64.whl (692.9 kB view details)

Uploaded CPython 3.10macOS 11.0+ x86-64

desilofhe-1.8.0-cp310-cp310-macosx_11_0_arm64.whl (609.9 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

File details

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

File metadata

File hashes

Hashes for desilofhe-1.8.0-cp314-cp314-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 e992e9ddb4af60cb15dc808ed5ee20c6ef9fff66e7ebd1064d9394ceda0a5529
MD5 dce7be5ea44be6de9d03e1546f8d1482
BLAKE2b-256 a583b9ca3a02d253e35ef58cc592d662a6650d624c512766779225fa0a83bb99

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for desilofhe-1.8.0-cp314-cp314-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 618f3d7a1aec48b527e4ba5678f0cea4cb7ee880597a7d76b5fb6c823b8b026d
MD5 870cd59e36b36f71a60c1da206074454
BLAKE2b-256 4823da8169f0ca6ebd97fcd17f5027851a0716daa31a6a0a07b5b885a94870f7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for desilofhe-1.8.0-cp314-cp314-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 c4264c859eab35a2de8fb1f6606ac39d2090257d54f7ce6c9d716858fe0d0a11
MD5 97231c939eb1905c67f641b4eb2d3c1b
BLAKE2b-256 72901616f955b1f26089c9ddfbb76da5bfed7cdf56e2e8baec8b8e2bbb42ef5b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for desilofhe-1.8.0-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 313dcb8c15acd20e00510a7d666a57f134ee75ff8eacf9b7dbc3cc01a1bdaa75
MD5 4cb900745df25564d35d1887868dab75
BLAKE2b-256 bb86c2b4daf27c76bbc9d1e178faf2131c4acd292174959c79351bdd82cf0d89

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for desilofhe-1.8.0-cp313-cp313-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 689c0eecf5be5d48f1de1ddd22649aa6c1daa98e49bc4c10adaeceba1d3ff39e
MD5 d550d72ac44f4ddbe0649038ad9693df
BLAKE2b-256 b5e9e8c920907d9e30d8689d362bc787ce2f70cca3e207f31737a8736f1d0033

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for desilofhe-1.8.0-cp313-cp313-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 7cc1dbe2eb0d6f560dce023647b20a29b2df3f8c82ba0cc85516982c8c48da34
MD5 c8974ab9b154cb3f92d1f85e8bc90ce6
BLAKE2b-256 da191b4c1cc8cc366395740902b78b8647005f41c47f01b35a1738c0b6519ba6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for desilofhe-1.8.0-cp313-cp313-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 ab64657d325d598e59402e082904e79ab625e18024b8c08186f609ffff93b8b2
MD5 0a62c8e36927b345a8c3f22820d37bad
BLAKE2b-256 4254cc650060549712b715656e4e6bddcd269638319b8e0f3e362f796a067750

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for desilofhe-1.8.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 21259d44ff2036bfb73c4558536b3939a05700ebca3a074573fe621488830476
MD5 6e077421ada0f668d5d4a58db8da6968
BLAKE2b-256 342a72a9dc84d156e6e107b5b09d6ee837ef5f6a251ba10b840e4af961988cc2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for desilofhe-1.8.0-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 ad84ae105cb77e0e0958a02dda8ab621fa1043ae33a891119384d6d8e4ff82ed
MD5 7b906131dbd680fdca0ba5fcd34b740f
BLAKE2b-256 2b27654d074ec571bc9e4a1dd9a29fe52417176389ca8c4350d9c33ff5d52288

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for desilofhe-1.8.0-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 18ee0d588cfc255ea69d648f063ee603a33f87a5068bd886f6aff49a6baa4d15
MD5 a7847a25617f6ab63f105871bd39db58
BLAKE2b-256 03b71b8fd26c41f199121440ee4033a1e01a2219ff36d488f62e9129641b3c42

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for desilofhe-1.8.0-cp312-cp312-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 ba805032be00869fa4f27df66ddfbc9b79286ecde54510ea79498788f79eb859
MD5 ff95dd92a5046f68284c5e1a95a3ad66
BLAKE2b-256 9580bf6b44f2fcf66514336aaadcb0015289709bab377de2182a35b74a1283e6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for desilofhe-1.8.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 6435e412375b7d5ef46063f5b808c16ecbf3c31914d550208a7684b46b678b62
MD5 1ce40e0c5f295a83e42b30f3c340dc9c
BLAKE2b-256 368c6008a7d8c6110893ee3838646ee4373cee702c17d6adfd3f1bf32b718b9d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for desilofhe-1.8.0-cp311-cp311-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 7c2dea127aa66de0329ec86f87bdf91e92ae67625720dd3fffdf5ffca3d21c2c
MD5 f88456a9555198f6d93290f316545419
BLAKE2b-256 82ce00bc0758de02ac3e68c80d1d16cfbe2f1c930a58e399d21ddc765ef2edb2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for desilofhe-1.8.0-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 0e801dc7bd4bc7ef67c290262b2e76ecb57a0da8e7da7ff16a60538334fdfc7f
MD5 dd2844fc09654e3b72218b351a91139d
BLAKE2b-256 b44141b7148b3d90177c82dab0f07f4e093f3e762f62b18b716be5d1831ad447

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for desilofhe-1.8.0-cp311-cp311-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 5a478343b4888eb3fd97b81cd3976a419dc32e20a807b62003c13fb781f1bdff
MD5 b773fb61481d09aba59a2f8372ac856e
BLAKE2b-256 5446a701f1feecf6ceeb72cdc24dc1f66a3054e12b60ee834cf85ace45d6d4aa

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for desilofhe-1.8.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 0fa0dfa5665995a31f402f15ef17b8a01b7aabd43818aed2c2cc69d2ba93456f
MD5 8e7affd93ff1d2aa9005775d2a559883
BLAKE2b-256 8c1c67a5e624b3be3278b5c026ff9b0946753a8ebeb3168c441531215bc15548

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for desilofhe-1.8.0-cp310-cp310-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 a19bf871344d7f282e4ec49e4857c7aaa6e0a5e3354b9e535d82310e949862ad
MD5 31d4a57798211a2021d452f39c7f8f64
BLAKE2b-256 b7718cd55c2443ce8a8e7d729d54eb1fb6c26ccacaad63692ffe2d2b184abd17

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for desilofhe-1.8.0-cp310-cp310-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 6a2eb3536be10d92d23d11ad1933cb002686f3c0f5a1621473bf2d520e71b141
MD5 421f65b42520b60248d8fed5bc751023
BLAKE2b-256 c1f884c881e6ac2d6707508676f47ebf9ffa7085a69c4b29cd3ec04fc6333da5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for desilofhe-1.8.0-cp310-cp310-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 33a69d432d8f4b3b066f77f7f5e5a6ea54b6ecb5d79e3a3bd9f4783cb6d671c9
MD5 427081b8e838da71aaff049ce16c3383
BLAKE2b-256 b94f61de8cf5c053559e246bdc62abbf183f027a5ddd9cf68ddb7aae6a930ace

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for desilofhe-1.8.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 0af6967030b282729a60fa215f6184abfcf802d85a5ffa9747b11bd06be01ded
MD5 11504a0536325f45c2571e0e3a070008
BLAKE2b-256 22c58687125c89ce9d2d09c375337de7e082b1ae7b0d099981f67fd58b810e67

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page