# 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](https://fhe.desilo.dev/) for detailed installation instructions, examples, and documentation.
## Quickstart
### Encrypt / Decrypt
Encryption and decryption require a public key and a secret key, respectively.
The public key is generated from the 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.
```py
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:
```py
from desilofhe import Engine
engine = Engine()
secret_key = engine.create_secret_key()
public_key = engine.create_public_key(secret_key)
data1 = [1, 2, 3]
encrypted1 = engine.encrypt(data1, public_key)
data2 = [4, 5, 6]
encrypted2 = engine.encrypt(data2, public_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.
```py
from desilofhe import Engine
engine = Engine()
secret_key = engine.create_secret_key()
public_key = engine.create_public_key(secret_key)
relinearization_key = engine.create_relinearization_key(secret_key)
data1 = [1, 2, 3]
encrypted1 = engine.encrypt(data1, public_key)
data2 = [4, 5, 6]
encrypted2 = engine.encrypt(data2, public_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.
Raw data
{
"_id": null,
"home_page": null,
"name": "desilofhe-cu124",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": "Desilo Library Team <library@desilo.ai>, Eunmo Yang <eunmo.yang@desilo.ai>",
"keywords": "DESILO, python, cryptoghraphy, privacy, encryption, cuda, homomorphic encryption, homomorphic encryption library, fully homomorphic encryption, fhe, gpu accelerated",
"author": null,
"author_email": "Desilo Library Team <library@desilo.ai>, Eunmo Yang <eunmo.yang@desilo.ai>",
"download_url": null,
"platform": null,
"description": "# The DESILO FHE Library\n\n## Welcome to the DESILO FHE library!\n\nThe DESILO FHE library is a homomorphic encryption library that is fast and intuitive.\nIt delivers state-of-the-art performance, maximum accuracy, and versatile usability.\nDesigned to be accessible and efficient for everyone, from beginners unfamiliar with homomorphic encryption to experts developing advanced algorithms.\n\nBuilt on C++ and CUDA, the DESILO FHE library is optimized for both CPUs and NVIDIA GPUs.\nIt includes a Python wrapper for easy use and seamless integration into existing AI workflows.\nAdditionally, it supports CPU parallelization for environments without GPU access.\n\nCurrently, 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.\nIt provides a powerful solution adaptable to diverse environments and requirements.\n\n## Documentation\n\nPlease refer to the [official documentation](https://fhe.desilo.dev/) for detailed installation instructions, examples, and documentation.\n\n## Quickstart\n\n### Encrypt / Decrypt\n\nEncryption and decryption require a public key and a secret key, respectively.\nThe public key is generated from the secret key.\nYou 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.\n\n```py\nfrom desilofhe import Engine\n\nengine = Engine()\n\nsecret_key = engine.create_secret_key()\npublic_key = engine.create_public_key(secret_key)\n\ndata = [1, 2, 3]\nencrypted = engine.encrypt(data, public_key)\ndecrypted = engine.decrypt(encrypted, secret_key)\n\nprint(decrypted[:3]) # [1. 2. 3.]\n```\n\n### Add / Subtract\n\nTo 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:\n\n```py\nfrom desilofhe import Engine\n\nengine = Engine()\n\nsecret_key = engine.create_secret_key()\npublic_key = engine.create_public_key(secret_key)\n\ndata1 = [1, 2, 3]\nencrypted1 = engine.encrypt(data1, public_key)\n\ndata2 = [4, 5, 6]\nencrypted2 = engine.encrypt(data2, public_key)\n\nadded = engine.add(encrypted1, encrypted2)\nsubtracted = engine.subtract(encrypted1, encrypted2)\n\ndecrypted1 = engine.decrypt(added, secret_key)\ndecrypted2 = engine.decrypt(subtracted, secret_key)\n\nprint(decrypted1[:3], decrypted2[:3]) # [5. 7. 9.] [-3. -3. -3.]\n```\n\n### Multiply\n\nTo 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.\n\n```py\nfrom desilofhe import Engine\n\nengine = Engine()\n\nsecret_key = engine.create_secret_key()\npublic_key = engine.create_public_key(secret_key)\nrelinearization_key = engine.create_relinearization_key(secret_key)\n\ndata1 = [1, 2, 3]\nencrypted1 = engine.encrypt(data1, public_key)\n\ndata2 = [4, 5, 6]\nencrypted2 = engine.encrypt(data2, public_key)\n\nmultiplied = engine.multiply(encrypted1, encrypted2, relinearization_key)\n\ndecrypted = engine.decrypt(multiplied, secret_key)\n\nprint(decrypted[:3]) # [~4 ~10 ~18]\nprint(encrypted1.level, encrypted2.level, multiplied.level) # 7 7 6\n```\n\n## Contact\n\nIf you have any questions, please contact us at library@desilo.ai.\n",
"bugtrack_url": null,
"license": null,
"summary": "The DESILO Fully Homomorphic Encryption (FHE) library",
"version": "1.3.0",
"project_urls": {
"Documentation": "https://fhe.desilo.dev/",
"Homepage": "https://desilo.ai/"
},
"split_keywords": [
"desilo",
" python",
" cryptoghraphy",
" privacy",
" encryption",
" cuda",
" homomorphic encryption",
" homomorphic encryption library",
" fully homomorphic encryption",
" fhe",
" gpu accelerated"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "78229de097ae67113fefe33b445df9f9be2f1225f9a6bb9f12674383cff1ae62",
"md5": "6773f1701d2df3b5963263240ffffea2",
"sha256": "751adb05438bc08e5dd93abd089fc18f0410dddecaab41f2936ef1d74bc1733a"
},
"downloads": -1,
"filename": "desilofhe_cu124-1.3.0-cp310-cp310-manylinux_2_34_x86_64.whl",
"has_sig": false,
"md5_digest": "6773f1701d2df3b5963263240ffffea2",
"packagetype": "bdist_wheel",
"python_version": "cp310",
"requires_python": ">=3.9",
"size": 919291,
"upload_time": "2025-07-23T17:17:32",
"upload_time_iso_8601": "2025-07-23T17:17:32.850353Z",
"url": "https://files.pythonhosted.org/packages/78/22/9de097ae67113fefe33b445df9f9be2f1225f9a6bb9f12674383cff1ae62/desilofhe_cu124-1.3.0-cp310-cp310-manylinux_2_34_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "30f36b294d7fa32df8b47fab5230ee67a8502f1e4da3b4d9c6df2fc70abd585f",
"md5": "a94ec7f3d17473c15ed22c3199ddfdae",
"sha256": "a2a19dbc7c0a06d5852a4775ef5ad44e0ebcfd8b935d64831b65f750e4a1f537"
},
"downloads": -1,
"filename": "desilofhe_cu124-1.3.0-cp311-cp311-manylinux_2_34_x86_64.whl",
"has_sig": false,
"md5_digest": "a94ec7f3d17473c15ed22c3199ddfdae",
"packagetype": "bdist_wheel",
"python_version": "cp311",
"requires_python": ">=3.9",
"size": 920307,
"upload_time": "2025-07-23T17:17:34",
"upload_time_iso_8601": "2025-07-23T17:17:34.586180Z",
"url": "https://files.pythonhosted.org/packages/30/f3/6b294d7fa32df8b47fab5230ee67a8502f1e4da3b4d9c6df2fc70abd585f/desilofhe_cu124-1.3.0-cp311-cp311-manylinux_2_34_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "c8f1c31fce84686c22ba2dac4a8f2d290ac50adec577c1a8fb014b6be99b2bcb",
"md5": "0654c7a3555abe29444b0f8100b6d56a",
"sha256": "8ff21b910232eb82783c149af9037149ace3b83fc3438b8f3558b02f9b0a00ca"
},
"downloads": -1,
"filename": "desilofhe_cu124-1.3.0-cp312-cp312-manylinux_2_34_x86_64.whl",
"has_sig": false,
"md5_digest": "0654c7a3555abe29444b0f8100b6d56a",
"packagetype": "bdist_wheel",
"python_version": "cp312",
"requires_python": ">=3.9",
"size": 918130,
"upload_time": "2025-07-23T17:17:36",
"upload_time_iso_8601": "2025-07-23T17:17:36.050782Z",
"url": "https://files.pythonhosted.org/packages/c8/f1/c31fce84686c22ba2dac4a8f2d290ac50adec577c1a8fb014b6be99b2bcb/desilofhe_cu124-1.3.0-cp312-cp312-manylinux_2_34_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "4c96e63bd52376062eb2f165f968bb73e61509e2ed79ce814c3deed24bdcfded",
"md5": "02c196beb1dfbd1c91546377a87c01cb",
"sha256": "2f8b39c8e5fe65dc70b40cb6be0b3156378813244207434ce18815ec64421e7e"
},
"downloads": -1,
"filename": "desilofhe_cu124-1.3.0-cp313-cp313-manylinux_2_34_x86_64.whl",
"has_sig": false,
"md5_digest": "02c196beb1dfbd1c91546377a87c01cb",
"packagetype": "bdist_wheel",
"python_version": "cp313",
"requires_python": ">=3.9",
"size": 918963,
"upload_time": "2025-07-23T17:17:37",
"upload_time_iso_8601": "2025-07-23T17:17:37.616536Z",
"url": "https://files.pythonhosted.org/packages/4c/96/e63bd52376062eb2f165f968bb73e61509e2ed79ce814c3deed24bdcfded/desilofhe_cu124-1.3.0-cp313-cp313-manylinux_2_34_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "9bbccd0fb293439879dc7ccd9d526023c5d7c26d503e4ca4723a0ab2aeee1f00",
"md5": "5e1efbbef5ab9f2bafdad1df1b518124",
"sha256": "fd09f8a0abca32b3ec8c499711a9171776464ffd7e618b7e30044467a67970a2"
},
"downloads": -1,
"filename": "desilofhe_cu124-1.3.0-cp39-cp39-manylinux_2_34_x86_64.whl",
"has_sig": false,
"md5_digest": "5e1efbbef5ab9f2bafdad1df1b518124",
"packagetype": "bdist_wheel",
"python_version": "cp39",
"requires_python": ">=3.9",
"size": 919454,
"upload_time": "2025-07-23T17:17:39",
"upload_time_iso_8601": "2025-07-23T17:17:39.191588Z",
"url": "https://files.pythonhosted.org/packages/9b/bc/cd0fb293439879dc7ccd9d526023c5d7c26d503e4ca4723a0ab2aeee1f00/desilofhe_cu124-1.3.0-cp39-cp39-manylinux_2_34_x86_64.whl",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-23 17:17:32",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "desilofhe-cu124"
}