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.9.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.9.0-cp314-cp314-manylinux_2_34_x86_64.whl (896.1 kB view details)

Uploaded CPython 3.14manylinux: glibc 2.34+ x86-64

desilofhe-1.9.0-cp314-cp314-macosx_11_0_x86_64.whl (752.1 kB view details)

Uploaded CPython 3.14macOS 11.0+ x86-64

desilofhe-1.9.0-cp314-cp314-macosx_11_0_arm64.whl (663.5 kB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

desilofhe-1.9.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.9.0-cp313-cp313-manylinux_2_34_x86_64.whl (895.9 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.34+ x86-64

desilofhe-1.9.0-cp313-cp313-macosx_11_0_x86_64.whl (752.1 kB view details)

Uploaded CPython 3.13macOS 11.0+ x86-64

desilofhe-1.9.0-cp313-cp313-macosx_11_0_arm64.whl (663.5 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

desilofhe-1.9.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.9.0-cp312-cp312-manylinux_2_34_x86_64.whl (895.6 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.34+ x86-64

desilofhe-1.9.0-cp312-cp312-macosx_11_0_x86_64.whl (751.5 kB view details)

Uploaded CPython 3.12macOS 11.0+ x86-64

desilofhe-1.9.0-cp312-cp312-macosx_11_0_arm64.whl (662.9 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

desilofhe-1.9.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.9.0-cp311-cp311-manylinux_2_34_x86_64.whl (894.9 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.34+ x86-64

desilofhe-1.9.0-cp311-cp311-macosx_11_0_x86_64.whl (751.3 kB view details)

Uploaded CPython 3.11macOS 11.0+ x86-64

desilofhe-1.9.0-cp311-cp311-macosx_11_0_arm64.whl (662.4 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

desilofhe-1.9.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.9.0-cp310-cp310-manylinux_2_34_x86_64.whl (894.3 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.34+ x86-64

desilofhe-1.9.0-cp310-cp310-macosx_11_0_x86_64.whl (748.8 kB view details)

Uploaded CPython 3.10macOS 11.0+ x86-64

desilofhe-1.9.0-cp310-cp310-macosx_11_0_arm64.whl (659.8 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

File details

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

File metadata

File hashes

Hashes for desilofhe-1.9.0-cp314-cp314-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 45f7147fababe718d9811746669ad9841cdb1ffa22e6ed3f7f7119f5dca05a41
MD5 ad1a3ac85b0bf48a6bd81a6b59716d76
BLAKE2b-256 9ce03fdcb3eaf9ab7ec7cc965db5f50481185ec61fbeeb5d9503d0cc9512623d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for desilofhe-1.9.0-cp314-cp314-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 e9371083c29454cb655ef3a1599082bf162a999bc0ea8e2f4ba2c4c2f5db4cf8
MD5 a44c114f835019746f18dea0b57c9238
BLAKE2b-256 e2cf2d93e666f907aec8ddaf0ca416c4803aa5d8540bed353f406ce94d87663c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for desilofhe-1.9.0-cp314-cp314-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 5ecc7388e4f4d0c962d21e9a7539b69908268b859ceb4053258224fc09532635
MD5 123e5b6b61ab96e14523718201edd61c
BLAKE2b-256 fa1782f183a0fef6fbe50a4be4fe27955ba41193312d28fc2eca9dc264fdbb5b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for desilofhe-1.9.0-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 5d3d5d6cd06df98279d8f5cb07d63c2558540dcdd026f5349e1a1e703540eb94
MD5 094745b4cdc8a2cba6fea22be42357e4
BLAKE2b-256 b9cd70d6e824ae350992102803f9ebf5245aae7bc492816b156ed8379a2552ed

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for desilofhe-1.9.0-cp313-cp313-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 55a974d2c57fce0feeb6b715db80a29f72910140434424af59637158f6214fd5
MD5 1c2e00c26adef95067472cc64ba04f4b
BLAKE2b-256 32234c30cfba34d2fa2f6d235aa7ac54751f79a1167d911e2ec62b1c27d64ee2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for desilofhe-1.9.0-cp313-cp313-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 ea73ddadc7603b15936828464238dd88dab0abe1a1d0525d6c84f831a5c9c7a8
MD5 83b6d2440147779f2d9dc453b9ca70d7
BLAKE2b-256 2535395d99b6f1018fefaa01b2657484cd87e8df5614619dc55fd521c5dfa777

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for desilofhe-1.9.0-cp313-cp313-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 8f2605f601528839fae00d53513eafbcfc032e0c12f9420fb472947d317fcf3b
MD5 106e09d4e38d094b53ef0e219a157a16
BLAKE2b-256 34a40fdfff602f58fa20b672be95b670ba588d8da088ad8480209f3a5f5d2d6c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for desilofhe-1.9.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 5e49073f8c8a895308ff8be087d8b55f9a2e5ab8760f8398c5e4c3c80df4889e
MD5 d408f1be67804e42e79bd29ae5447ab4
BLAKE2b-256 b60d1508f28951736205ba29c23c307f572660ade663b59115781c70730e8240

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for desilofhe-1.9.0-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 1221f8bbc46aadd18b82b86612cd34fc966e9f2b2546e422ea4f7eca64716db7
MD5 c1b9dbc8cd4e7a3f8104cdf3017def2e
BLAKE2b-256 337307d9b16fd19aaf2091c5fcaf3c0ea8ebe6da0d7f8915475b0f81f153e944

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for desilofhe-1.9.0-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 49004cacad89dcb4eb531c80f968ea0b3c83b45eb7d456fc2e5ea97496bc4d84
MD5 f3d8c6c02a913ffcb5819d123ea35ade
BLAKE2b-256 f0bede1c7b24528f47e27c207f89fe255720350f814afd5e49ffc05cedad0ec5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for desilofhe-1.9.0-cp312-cp312-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 1d55653056f114783554fef41bcb03c063bb424d7a242f4b85a189f1308be89a
MD5 bffd6482fd89f530db3398bb53233f26
BLAKE2b-256 de2d99f667cd737f9e8ad0fdbd622c2093ef981098eddd91fb1f4f4d3904b7c6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for desilofhe-1.9.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4cc19f069a8878c8b195890d94cb3147f1414078fbbdb4e91542dc2bd1bd9b7b
MD5 c63bc79d776a46bc1096947729b73ea1
BLAKE2b-256 bb9441c3c75d7ce0d2dd1acc9315b34387b722a9de05be0200864552f82b214d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for desilofhe-1.9.0-cp311-cp311-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 8bae4621c269ad0daff51c68719ddc9d3f2b4103f4820488a8b6bc58d4860be1
MD5 e24e249343d6adde6acd9e7b6eef5bec
BLAKE2b-256 eff66fc6d13a55b2dcae7a696e62693dea318591c968d6a87cb3be7bb940b35c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for desilofhe-1.9.0-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 fbb1159f1d80a0db725a7712ec090b020cc081b75171aeb17afd9eec63163e66
MD5 984efb4f2179e51c9547ea43497d964c
BLAKE2b-256 e2abeb3324627560b3a6ed719b7cd7964be9f533d95aa0dc35d5e0e479fa86ed

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for desilofhe-1.9.0-cp311-cp311-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 cc4c477d9ec9a67d6ea5205c1a182ee9660dbec423753744daec0e405c175468
MD5 780987e54bcb257188fc66b35c468aa7
BLAKE2b-256 25f84f11d27d944cbbfac02fb7ed12232e7acc946d04d73c6f2e67ee6b85c943

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for desilofhe-1.9.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ecf0d5cffba1c297fa31e89c95c39376192c03336961fd1479a9bbf788a446d6
MD5 da9cfe13b52067cb2fd0ff9709818f44
BLAKE2b-256 32614225245a95c139fe5e02a41a9dfbf8c866522648f7bb6d4e15c10473e67f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for desilofhe-1.9.0-cp310-cp310-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 6cdd7b3fa6f8fffa4bfe8cc0321dc411d910911b84e1cf5526f77e78b2afad18
MD5 1b5dec4116984c49c5748410912c76cc
BLAKE2b-256 5d5b122fecb5d4ea4410ef8c71efb25aece5f5f8f2c5fd2d1bef54384cbc9dd9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for desilofhe-1.9.0-cp310-cp310-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 b96230c4cc3455082a11d6992a816fedf8e33a6c30b5fc9766cf8797d521d2c3
MD5 f86a90aff79c05502cdf49d93244d53c
BLAKE2b-256 a95ecebd5f67156d9b38a2dd674b5fe43e60b3986effca168f45baaaad8c3e28

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for desilofhe-1.9.0-cp310-cp310-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 10d04e7826849f69011e51f102260cbddff9b0a8c0d084c017f65d12494bffff
MD5 5d31789b97b27d0ed35835388d54ce58
BLAKE2b-256 5de57954b177340b1a5c1ad3ec87ea4811b176fe849d8b3a42488c2f69d72108

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for desilofhe-1.9.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 95f98c901cd776a8b0598741eb929323051fee9605b928fb6af3bfe72e7daed6
MD5 bedea0029f592e4206a2cce2e5e9c164
BLAKE2b-256 aa00f387487d2b783197ac9003d32ce0040de3fae751a2d6a518e97371422939

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