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

Uploaded CPython 3.14musllinux: musl 1.2+ x86-64

desilofhe-1.10.0-cp314-cp314-manylinux_2_34_x86_64.whl (930.6 kB view details)

Uploaded CPython 3.14manylinux: glibc 2.34+ x86-64

desilofhe-1.10.0-cp314-cp314-macosx_11_0_x86_64.whl (769.6 kB view details)

Uploaded CPython 3.14macOS 11.0+ x86-64

desilofhe-1.10.0-cp314-cp314-macosx_11_0_arm64.whl (678.9 kB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

desilofhe-1.10.0-cp313-cp313-musllinux_1_2_x86_64.whl (2.0 MB view details)

Uploaded CPython 3.13musllinux: musl 1.2+ x86-64

desilofhe-1.10.0-cp313-cp313-manylinux_2_34_x86_64.whl (930.6 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.34+ x86-64

desilofhe-1.10.0-cp313-cp313-macosx_11_0_x86_64.whl (769.6 kB view details)

Uploaded CPython 3.13macOS 11.0+ x86-64

desilofhe-1.10.0-cp313-cp313-macosx_11_0_arm64.whl (678.8 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

desilofhe-1.10.0-cp312-cp312-musllinux_1_2_x86_64.whl (2.0 MB view details)

Uploaded CPython 3.12musllinux: musl 1.2+ x86-64

desilofhe-1.10.0-cp312-cp312-manylinux_2_34_x86_64.whl (930.2 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.34+ x86-64

desilofhe-1.10.0-cp312-cp312-macosx_11_0_x86_64.whl (768.5 kB view details)

Uploaded CPython 3.12macOS 11.0+ x86-64

desilofhe-1.10.0-cp312-cp312-macosx_11_0_arm64.whl (678.2 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

desilofhe-1.10.0-cp311-cp311-musllinux_1_2_x86_64.whl (2.0 MB view details)

Uploaded CPython 3.11musllinux: musl 1.2+ x86-64

desilofhe-1.10.0-cp311-cp311-manylinux_2_34_x86_64.whl (930.3 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.34+ x86-64

desilofhe-1.10.0-cp311-cp311-macosx_11_0_x86_64.whl (768.7 kB view details)

Uploaded CPython 3.11macOS 11.0+ x86-64

desilofhe-1.10.0-cp311-cp311-macosx_11_0_arm64.whl (677.7 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

desilofhe-1.10.0-cp310-cp310-musllinux_1_2_x86_64.whl (2.0 MB view details)

Uploaded CPython 3.10musllinux: musl 1.2+ x86-64

desilofhe-1.10.0-cp310-cp310-manylinux_2_34_x86_64.whl (929.9 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.34+ x86-64

desilofhe-1.10.0-cp310-cp310-macosx_11_0_x86_64.whl (764.9 kB view details)

Uploaded CPython 3.10macOS 11.0+ x86-64

desilofhe-1.10.0-cp310-cp310-macosx_11_0_arm64.whl (675.3 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

File details

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

File metadata

File hashes

Hashes for desilofhe-1.10.0-cp314-cp314-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 d3cab75b248ad7acae2dbddbc5278efc5b4086a5af64339e5cbe01966c4556ce
MD5 f069f4fd8eb64b1816f799ac6df09ce1
BLAKE2b-256 6567cb39e8554cc97036da48cc98fca8d517a78ec60aa37b4ce68879e8ade378

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for desilofhe-1.10.0-cp314-cp314-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 8508f775945f61b7e5464e9f2ce25de3b6f5625fd263242b1a8f8cdde350da35
MD5 5b31d9219e446cc562c865dd4f6434a0
BLAKE2b-256 ff8b0cb7878542d7aebd56e8fb06bb2a65909071514ca000ff553a71d91ad686

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for desilofhe-1.10.0-cp314-cp314-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 60259aa681d7a8b1a02db1801c1a715712ed6ba994d920c68a2e845154bb747b
MD5 3f6f7b11db8ffdcec81cbb84d4e498c5
BLAKE2b-256 23952ed1b9718451afec6e51b81722e6397687f168fa4e88eb24b068f2a6682d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for desilofhe-1.10.0-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 8d612877d4cf93258963c3e557c24fcf7a3593bb51535930cc70f9d07593aad3
MD5 b80c7add07210cde95842434b1e4c00e
BLAKE2b-256 888a569cf928f68de314d0ec6b3c34ce1b83cd14a461a10f30c3d08c224e51fa

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for desilofhe-1.10.0-cp313-cp313-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 b63b801e656ba39c46ec2aac4f3c06025b4b503fbacbb2704e0c5191ceab1f49
MD5 8c971c79da188f74b218d8792c83a271
BLAKE2b-256 1d2b74e38cbdb13384085400c4f053a0cddabce72e78b1b1ca045f49d86a32f5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for desilofhe-1.10.0-cp313-cp313-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 b837c5271c6578aec194dc998f878b8bbbc217e44f419dd9d330701cb4f84352
MD5 c857f5624d667c063d88e7c6b65f3289
BLAKE2b-256 32b7af346715c1ade7adb911ea5e1ae49b782ff368b321540821bf32a30af7ec

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for desilofhe-1.10.0-cp313-cp313-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 85c43d88f31d7265a7a11decced167ae14077349783dbe08a396ac3a4c3be1fa
MD5 14d16a5d5a785d359f30ed52ed255b29
BLAKE2b-256 c336d3e0d3c46f9000c1eb5c6224d17f0a3dae222f6a00903483e738aab7ba48

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for desilofhe-1.10.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ba806c3719fa7d7d9e280022834bc09bb96bf32dc62b430216f6b5df2fb67010
MD5 564133d75390b25be692ce6131d25ca4
BLAKE2b-256 9f468a5e152192fba8f5ab88ff4888536c80436e268980d22130c746559ac74b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for desilofhe-1.10.0-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 e1bbe42094fc3af28d6b7c2f7baa73727fb1fa740a36ad50d767aa6d29c428a5
MD5 1ef725bbf3a3e24dc9eac7e2a6c8b768
BLAKE2b-256 4dd828ff08be9b57f628dc012bc91879139751dd0e68676329ab3a0f84a88ccc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for desilofhe-1.10.0-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 72642ce58307bf071133c3cafe658fb70679e81c9eaaed216aaf613d5dd89bc9
MD5 82879b9ea83d6e6a7186f820019d0692
BLAKE2b-256 e7661ba79b647a00d8e795e861a9f1c855487ae26a4755703f639a907101ac70

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for desilofhe-1.10.0-cp312-cp312-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 1d79bd7012b48f48150ee2d2303f86f6f709d2854c76dc714e0e8dd8cd3b69f1
MD5 f1c11a741f4092c1a23330bc6cf99ee5
BLAKE2b-256 3ff0d754867cf7a4cccfed0efc49372bf939ea70195d996be8e1ce9a34620bf6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for desilofhe-1.10.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b42718de242ba853ee1632dc6458910131aca4efb9c2be589dce42767927a668
MD5 d2cba6e3293b49965987bb59be4d5776
BLAKE2b-256 98b13ef53dd12f41da0cdf2fcb30b98313526ef28c5270b514628c1abe9c0044

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for desilofhe-1.10.0-cp311-cp311-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 761a82d978667aa4668bddc3860d55c44a9ec4e0c1532be8078ade8a92cb5f54
MD5 206324e12b7d1e63b28c860c7a873442
BLAKE2b-256 fed38f6e463f3f5e9dd1cfd127ae01dfe7bb61f6f1df686542a917c76298572c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for desilofhe-1.10.0-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 5d3edf0a121e67988234a1bc31a57f715352aca414e77d94d18462e74179fa72
MD5 ec558efc366eedebf3388001bd6b61d3
BLAKE2b-256 f18e1f30b5c46e4c3eed4a25683080a35bcbee74e6b332d1779e89e45c68fd64

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for desilofhe-1.10.0-cp311-cp311-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 ae6f82a1d01356f842b8e6581ed683c47982ccc225acf57132cd7b2f31d08bba
MD5 f4dba87c54a227dc0743da02c2aa3478
BLAKE2b-256 a3544bce574dff3910b2791a5bc46711e2692d2f1a591b35f9d6aa9b7fb5db44

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for desilofhe-1.10.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f2afbf8ea25bf264a5a4c0b9e67c175d085360e04dea4fcbac4b07e6245a7a0b
MD5 529b61bb50e8764020c8823973483041
BLAKE2b-256 60e4fcb8056d7d076f1e05c0f1d79e0caf5bfb32f4dee441e1163e859d42a56c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for desilofhe-1.10.0-cp310-cp310-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 35dd0a180fdb096c15b822a0536853ed750a0893f5f625dcbec1a2e96a608085
MD5 61c92a52523dcedebfc35e42762a6302
BLAKE2b-256 6b5ba316a3bc2d07ddb373cf01924946bf061c291c02c4ce1fe25b2cada54a14

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for desilofhe-1.10.0-cp310-cp310-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 489bf0173992a08fd32424c923190ce7d43209d102b2020969cac94e082542bc
MD5 af8c2da661114dc72c290013c42a288d
BLAKE2b-256 e08b94ce7161ca3992dc2560c24a7ef6229726ace86c0b8ee5189b24a7639573

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for desilofhe-1.10.0-cp310-cp310-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 2838144efa674c17dc2d25c0da34b78c19d2cf1838921dfcf30fb045c7680a17
MD5 d25dd18fcfc8859e58af3baf092dc72c
BLAKE2b-256 ca39487b6dd17e81a0b64b26267ff554c88bf7fe0e5e984d62742e4da9d1f2b9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for desilofhe-1.10.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 124f3261348b1dfb1cd8a62fd832b2572557efa75a3e02fe62fd51627a680e4f
MD5 af40051139a516e6f5d9a98610ac03c3
BLAKE2b-256 7e01d3e641a3afba6fff8764841a4e28e1c35c6c30c233896cd0d6ceb30b9ac7

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