Zero Knowledge security for Python
Project description
Krptn
Quick Install:
pip install krptn
Note: we don't have pre-built extensions for all platforms. Please see the installation section in our documentation for more info.
If after reading this, you like our project, please consider staring!
What problem do we solve?
We all love Django and other web frameworks! However, their primary focus is creating websites - not securing them. One example is Django's built-in authentication system. While it hashes the password, it does not encrypt user data for you. Encryption is left to the developer...
Wouldn't it be nice if encryption would also be handled by the IAM? Perhaps it could be handled in a zero knowledge model, such that, without the user entering credentials, not even the database administrator can read it?! This is exactly what we do! Please see our documentation, homepage or continue here, on our GitHub, for more information!
To prove that such is possible, we have a Flask and Django example on GitHub.
What is this?
Quick notice: this project will be run for the Microsoft Imagine Cup. However, please use the project as you would otherwise. This warning is only for contributors who may not want their code to be used for such purposes.
A user authentication and access management system (IAM) with Zero Knowledge security. It is available as a python extension module. However we have certain limitations.
How we achieve this?
- All data is encrypted (any data can be requested by the developer to be secured)
- Only the appropriate users' credentials can unlock the cryptosystem (this protects you from server-side attacks)
This gives you Zero Knowledge security (one of the most secure available) without ever needing to even notice it! It protects you from server side attacks.
Features
- Secure Storage of Data
- User Authentication
- FIPS Validated Cryptography (via OpenSSL 3)*
- Secure memory wiping (except on PyPy)
- FIDO Passwordless*
- Integration with popular web frameworks
* FIDO (passwordless) does not use FIPS validated resolvers
Example usage of the Crypto Class
from krypton import basic
# Create an instance of Crypto - a class for encrypting and storing sensitive data.
myCrypto = basic.Crypto()
pwd = "Perhaps provided by the user"
# It supports C.R.U.D. operations:
dataId = myCrypto.secureCreate("Example data", pwd) #id is an integer
print("The data is:")
print(myCrypto.secureRead(dataId, pwd)) # prints Example data
User Auth
See User Auth.
To use FIDO with User Auth, please see Krptn's FIDO Documentation.
Integration with web frameworks
Crypto Class
Key Management System
This module uses a custom Key Management System for AES-256 Keys. See KMS for more information.
Note: we have considered using HSM as key management systems. We, however, have decided that we will not integrate HSMs because it would be difficult to maintain Zero Knowledge security.
Of course, all data is securely encrypted even if it is not via a HSM!
If you want, you can encrypt the SQL database using HSM managed keys for additional security.
Use custom databases
Here is an example for how to set the database to be used:
import krypton
krypton.configs.SQLDefaultCryptoDBpath = "sqlite+pysqlite:///Path/example.db"
krypton.configs.SQLDefaultKeyDBpath = "sqlite+pysqlite:///Path/key.db"
To see what these settings strings should contain please see Databases.
Settings
We would love to learn how you use our project! Our email is contact@krptn.dev, and we would appreciate if you could drop us a note about your interactions with Krptn.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
File details
Details for the file krptn-0.3.0-pp39-pypy39_pp73-win_amd64.whl
.
File metadata
- Download URL: krptn-0.3.0-pp39-pypy39_pp73-win_amd64.whl
- Upload date:
- Size: 3.3 MB
- Tags: PyPy, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 94e195a17d077e312eb7979898428293246433b521c4119cbf6f5c35df7df363 |
|
MD5 | 19796706a819d0f98054bfcfe491bc0b |
|
BLAKE2b-256 | afc888f483b8a59dc1989544e4f64e1a62e6d0dd6c2e23d04a6ef67fe549f38e |
File details
Details for the file krptn-0.3.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: krptn-0.3.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 6.1 MB
- Tags: PyPy, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f7e04c0858b153f7f8a6d2bfc1a526978eb16eed3c84fb404451384a7d2f1b43 |
|
MD5 | f869cfca27232425790b19947974be19 |
|
BLAKE2b-256 | 014f028dd94762137966a8d9dd1b2c7e418ae66575e1c24b265d534025d7e2c8 |
File details
Details for the file krptn-0.3.0-pp39-pypy39_pp73-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: krptn-0.3.0-pp39-pypy39_pp73-macosx_10_9_x86_64.whl
- Upload date:
- Size: 5.3 MB
- Tags: PyPy, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | eac3e358c87515597bfd6e9a0f9b0c5d755d7115249790254bd8337f24ab3942 |
|
MD5 | 7d5f4ff7507dc50741f33e633f40ab88 |
|
BLAKE2b-256 | 6c0f294bab9fd10c2248c6da3064a20a8d42b1d09f0772ff1e1f8e23d6d3fbb9 |
File details
Details for the file krptn-0.3.0-cp311-cp311-win_amd64.whl
.
File metadata
- Download URL: krptn-0.3.0-cp311-cp311-win_amd64.whl
- Upload date:
- Size: 3.3 MB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e294e2a5a2de1672fed12b9ac2c009faddbc43a5ed46a0917137d9df5c48968c |
|
MD5 | cd2341d944cde64b8d76d5b7b8f8ab5a |
|
BLAKE2b-256 | 2af3d0eb7aff9be7c8c1f8be85a1b75c019f330679939cbbd95bb40a951b1666 |
File details
Details for the file krptn-0.3.0-cp311-cp311-win32.whl
.
File metadata
- Download URL: krptn-0.3.0-cp311-cp311-win32.whl
- Upload date:
- Size: 2.7 MB
- Tags: CPython 3.11, Windows x86
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 654dad05fa5623d339adb91758811ca4e7239ff4b7a88cae8ac890339962b49f |
|
MD5 | c205d1dbaf3f4b651091de423505c331 |
|
BLAKE2b-256 | c397d32fefb6ab67b4d131cbc405c133f49459aa0f37c030b130bdf4740d56a6 |
File details
Details for the file krptn-0.3.0-cp311-cp311-musllinux_1_1_x86_64.whl
.
File metadata
- Download URL: krptn-0.3.0-cp311-cp311-musllinux_1_1_x86_64.whl
- Upload date:
- Size: 6.7 MB
- Tags: CPython 3.11, musllinux: musl 1.1+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 43b61d372de4e947c0c5f3c45eda52d76afed106ac19810cec0e57a3c54cc088 |
|
MD5 | a23f44188ba363ccaec3592383881670 |
|
BLAKE2b-256 | e1da863b5b3221af17d78cbb87fb83559d3d6d3cfc81a0b7d2fac540677d4191 |
File details
Details for the file krptn-0.3.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: krptn-0.3.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 6.1 MB
- Tags: CPython 3.11, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3abe1a4fadd989abe2d57d28b35593b394056cc8cfd11d0ded613f6f49c0c85a |
|
MD5 | b03a71bdd06cb7afaea02b2c5dbcd878 |
|
BLAKE2b-256 | 0039936b3fce07277cfd950e4a7472c74593b21274658cc7292aa6fb630da4ff |
File details
Details for the file krptn-0.3.0-cp311-cp311-macosx_11_0_arm64.whl
.
File metadata
- Download URL: krptn-0.3.0-cp311-cp311-macosx_11_0_arm64.whl
- Upload date:
- Size: 5.0 MB
- Tags: CPython 3.11, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 36d96c6b6982ba51618f7d96f71c4ab4631ae6dd482b55dd0a55218f7aadeb7a |
|
MD5 | ee2b14792de8ebb3f2047597c106caa3 |
|
BLAKE2b-256 | c3027838387d3def61d2b4222348137660b6ee9deed7404f0dd46bb495e27602 |
File details
Details for the file krptn-0.3.0-cp311-cp311-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: krptn-0.3.0-cp311-cp311-macosx_10_9_x86_64.whl
- Upload date:
- Size: 5.6 MB
- Tags: CPython 3.11, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e54532f9e23e59977b91a41a21322b336e80dbfe6864abb617c1b9d6f4ff06b4 |
|
MD5 | 454d3f536be61e3ad56fc31effb83e38 |
|
BLAKE2b-256 | 52e8a3c1ee5ebf66cd0ec984748230d59e55bffb3b8dc007be495057d15f34f5 |
File details
Details for the file krptn-0.3.0-cp310-cp310-win_amd64.whl
.
File metadata
- Download URL: krptn-0.3.0-cp310-cp310-win_amd64.whl
- Upload date:
- Size: 3.3 MB
- Tags: CPython 3.10, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 22f84e2cddc2efa4093ebc0d78fc3f18006816c85e784298d4af321a6ce2ddf2 |
|
MD5 | f5b6ac044b88eda9dc9e2550732f9fb9 |
|
BLAKE2b-256 | 0980ce5181b95288f6e3851aa82f7d44457f0a5e8a213d3f07e9f2bcf7d05e4f |
File details
Details for the file krptn-0.3.0-cp310-cp310-win32.whl
.
File metadata
- Download URL: krptn-0.3.0-cp310-cp310-win32.whl
- Upload date:
- Size: 2.7 MB
- Tags: CPython 3.10, Windows x86
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4fa0ec20d0f6e4a2e57897713f6227cac3f17a86959d21ea41029e8bb4106714 |
|
MD5 | 4a2aabe3c18348aa860d03458184570b |
|
BLAKE2b-256 | d8b67b760df9002f21f632a48ef9347d6a694cc4d1c7a01441e4c77e988384d8 |
File details
Details for the file krptn-0.3.0-cp310-cp310-musllinux_1_1_x86_64.whl
.
File metadata
- Download URL: krptn-0.3.0-cp310-cp310-musllinux_1_1_x86_64.whl
- Upload date:
- Size: 6.7 MB
- Tags: CPython 3.10, musllinux: musl 1.1+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4d48d53e35cbed846c449e8182302cd7fa19892722c176748fc7b98c7af86735 |
|
MD5 | 2c2ca381d7713e77e4398245fcfb4f10 |
|
BLAKE2b-256 | 0b8a7beada5116288dc994cd6a036a68d0565cfa36b09ab0a827252e5358a532 |
File details
Details for the file krptn-0.3.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: krptn-0.3.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 6.1 MB
- Tags: CPython 3.10, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 057b6c21ffd1c5bfa42114692ac1f82c897d36e000c95506d3fc00d7e43a1dde |
|
MD5 | b945a80f8013c2de873505a1dc68b48f |
|
BLAKE2b-256 | 39230636c7f23d8d12d174338da8b2989de56cbfa87dacb0d3590d3944681cf9 |
File details
Details for the file krptn-0.3.0-cp310-cp310-macosx_11_0_arm64.whl
.
File metadata
- Download URL: krptn-0.3.0-cp310-cp310-macosx_11_0_arm64.whl
- Upload date:
- Size: 5.0 MB
- Tags: CPython 3.10, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ee93ff3059b6f3a21562ccb485f70c61911694ae85a2f6f4a80af21f7b1623ee |
|
MD5 | 3dc1f3c5942c2016188f1eea8e6bb09f |
|
BLAKE2b-256 | be62976cb24138d1e4838200d02a04216996b91c4290fe2d055918f9e9d549f4 |
File details
Details for the file krptn-0.3.0-cp310-cp310-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: krptn-0.3.0-cp310-cp310-macosx_10_9_x86_64.whl
- Upload date:
- Size: 5.6 MB
- Tags: CPython 3.10, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | da42b02e369d6780c1310996da648ae41ccdb4affb9eafc243d1d7525664c023 |
|
MD5 | a553428e77b398f07bf19e8eea658a05 |
|
BLAKE2b-256 | 304d64f857a6989e38737c97b10f599224fc558383e575153edabc94be87510d |
File details
Details for the file krptn-0.3.0-cp39-cp39-win_amd64.whl
.
File metadata
- Download URL: krptn-0.3.0-cp39-cp39-win_amd64.whl
- Upload date:
- Size: 3.3 MB
- Tags: CPython 3.9, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 286d52af84518829fda5e719dcfd90603cc1295e98b871c86046db985edd9f48 |
|
MD5 | e51cec782aa52008c7bc45c47926114f |
|
BLAKE2b-256 | 08854caeadc1943252b483e027c0789070a9ba2936e7866c1f82ec00d3e5cc10 |
File details
Details for the file krptn-0.3.0-cp39-cp39-win32.whl
.
File metadata
- Download URL: krptn-0.3.0-cp39-cp39-win32.whl
- Upload date:
- Size: 2.7 MB
- Tags: CPython 3.9, Windows x86
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c45a3cb56b868444189560fe46bde640b5c71477ba12d3d1a3dc1af1b6994d42 |
|
MD5 | 55b9120a3bd23b2023e97faa2acc6c7e |
|
BLAKE2b-256 | 4dfe7ea4dc5466205c6987ddd6454514dba77462c537a049f1b7b97c8cac1245 |
File details
Details for the file krptn-0.3.0-cp39-cp39-musllinux_1_1_x86_64.whl
.
File metadata
- Download URL: krptn-0.3.0-cp39-cp39-musllinux_1_1_x86_64.whl
- Upload date:
- Size: 6.7 MB
- Tags: CPython 3.9, musllinux: musl 1.1+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 651e351bd94ea14848c36e822f1edccd2af8999ffa47f8e2d29585d043b4de60 |
|
MD5 | 51170e10387746f34fdb81d4858be633 |
|
BLAKE2b-256 | bbfce93b62e508b26ab728e0065916d58a4581625446d5df7bbcc052295bf71a |
File details
Details for the file krptn-0.3.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: krptn-0.3.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 6.1 MB
- Tags: CPython 3.9, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 59add06cf1ba015b49f6843ff08ce0f26a9fdb542b657a5e563b121c25fd6c95 |
|
MD5 | 1e0338f5149a1263a82eaa4573ba52ad |
|
BLAKE2b-256 | 172f908bf877c54a554b29437c085fa46b97fea20ac593157da6644a64c9f40f |
File details
Details for the file krptn-0.3.0-cp39-cp39-macosx_11_0_arm64.whl
.
File metadata
- Download URL: krptn-0.3.0-cp39-cp39-macosx_11_0_arm64.whl
- Upload date:
- Size: 5.0 MB
- Tags: CPython 3.9, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e20b093b257e08b5415e86e4da68aab2d8b36153715b18540f1ec8a65fb5a8d7 |
|
MD5 | b3367d6e4dc8ed032037d783f813cacc |
|
BLAKE2b-256 | 667a2c18d74f500797c73b9dc1dc6f0624666c3bc11c6ce4528f2ff3288cbc84 |
File details
Details for the file krptn-0.3.0-cp39-cp39-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: krptn-0.3.0-cp39-cp39-macosx_10_9_x86_64.whl
- Upload date:
- Size: 5.6 MB
- Tags: CPython 3.9, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f24cc2b3032c660ceda2884daa3a27725054b7915a5c71a5faf157ec8e102890 |
|
MD5 | 25537413169d4643f5067d2b6096f181 |
|
BLAKE2b-256 | 58d947df7d96bb0e9490b05eb6cf1f1796a963669c9bb1cfa75aa01dcb861c34 |