Skip to main content

Zero Knowledge security for Python

Project description

Apache-2.0

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.

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.

Krptn Visual

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:
id = myCrypto.secureCreate("Example data", pwd) #id is an integer
print("The data is:")
print(myCrypto.secureRead(id, 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

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

Configurations

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


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

krptn-0.1.13-pp39-pypy39_pp73-win_amd64.whl (3.0 MB view details)

Uploaded PyPy Windows x86-64

krptn-0.1.13-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (5.8 MB view details)

Uploaded PyPy manylinux: glibc 2.17+ x86-64

krptn-0.1.13-pp39-pypy39_pp73-macosx_10_9_x86_64.whl (5.1 MB view details)

Uploaded PyPy macOS 10.9+ x86-64

krptn-0.1.13-cp311-cp311-win_amd64.whl (3.1 MB view details)

Uploaded CPython 3.11 Windows x86-64

krptn-0.1.13-cp311-cp311-win32.whl (2.5 MB view details)

Uploaded CPython 3.11 Windows x86

krptn-0.1.13-cp311-cp311-musllinux_1_1_x86_64.whl (6.4 MB view details)

Uploaded CPython 3.11 musllinux: musl 1.1+ x86-64

krptn-0.1.13-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (5.8 MB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

krptn-0.1.13-cp311-cp311-macosx_11_0_arm64.whl (4.8 MB view details)

Uploaded CPython 3.11 macOS 11.0+ ARM64

krptn-0.1.13-cp311-cp311-macosx_10_9_x86_64.whl (5.3 MB view details)

Uploaded CPython 3.11 macOS 10.9+ x86-64

krptn-0.1.13-cp310-cp310-win_amd64.whl (3.1 MB view details)

Uploaded CPython 3.10 Windows x86-64

krptn-0.1.13-cp310-cp310-win32.whl (2.5 MB view details)

Uploaded CPython 3.10 Windows x86

krptn-0.1.13-cp310-cp310-musllinux_1_1_x86_64.whl (6.4 MB view details)

Uploaded CPython 3.10 musllinux: musl 1.1+ x86-64

krptn-0.1.13-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (5.8 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

krptn-0.1.13-cp310-cp310-macosx_11_0_arm64.whl (4.8 MB view details)

Uploaded CPython 3.10 macOS 11.0+ ARM64

krptn-0.1.13-cp310-cp310-macosx_10_9_x86_64.whl (5.3 MB view details)

Uploaded CPython 3.10 macOS 10.9+ x86-64

krptn-0.1.13-cp39-cp39-win_amd64.whl (3.1 MB view details)

Uploaded CPython 3.9 Windows x86-64

krptn-0.1.13-cp39-cp39-win32.whl (2.5 MB view details)

Uploaded CPython 3.9 Windows x86

krptn-0.1.13-cp39-cp39-musllinux_1_1_x86_64.whl (6.4 MB view details)

Uploaded CPython 3.9 musllinux: musl 1.1+ x86-64

krptn-0.1.13-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (5.8 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

krptn-0.1.13-cp39-cp39-macosx_11_0_arm64.whl (4.8 MB view details)

Uploaded CPython 3.9 macOS 11.0+ ARM64

krptn-0.1.13-cp39-cp39-macosx_10_9_x86_64.whl (5.3 MB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

File details

Details for the file krptn-0.1.13-pp39-pypy39_pp73-win_amd64.whl.

File metadata

File hashes

Hashes for krptn-0.1.13-pp39-pypy39_pp73-win_amd64.whl
Algorithm Hash digest
SHA256 a5b9e1af36658306626b127fc84690b70e9c33cd384e493a4962eb10d7c73fd9
MD5 01229cfbda473f06a8b9e31ea9767d19
BLAKE2b-256 8b68e3c74dafdce6cda895cac5af7fc19dc68dba7a06fdc5e679e83f8135c11e

See more details on using hashes here.

File details

Details for the file krptn-0.1.13-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for krptn-0.1.13-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 352ecaf44f9fd026ed17610c9914199f8403acefc159d68181e04f52d5c719da
MD5 7458c1e6f1fd0cb576dcd0820c247193
BLAKE2b-256 7fd2eb0ff0667af1e87f4abd0021abfe9dc834baab3a76b812ce1c0626133a81

See more details on using hashes here.

File details

Details for the file krptn-0.1.13-pp39-pypy39_pp73-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for krptn-0.1.13-pp39-pypy39_pp73-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 c9ce7813a092f3ebe8db2004a0fb2f3277efe9bb9c64769eeb0d4bdd78e3370c
MD5 673cd8fc166308ee7a8df88f6552ce2c
BLAKE2b-256 85bfb11bd5ddfcd194d97a357b4b9485b0deae951dd3d344aadd4a8e4085632d

See more details on using hashes here.

File details

Details for the file krptn-0.1.13-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: krptn-0.1.13-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 3.1 MB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.15

File hashes

Hashes for krptn-0.1.13-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 c50387bc6d38d19daf29c3f61ad53b7ab2fe42587d42bce3c38555a2a82dc0a1
MD5 d815d94fb843a4963faf12a5cd3427dc
BLAKE2b-256 7b1c1ce00da7a80674d56cfc0f95f02c8b9fb3830feaf2fc73244b10b3d664cb

See more details on using hashes here.

File details

Details for the file krptn-0.1.13-cp311-cp311-win32.whl.

File metadata

  • Download URL: krptn-0.1.13-cp311-cp311-win32.whl
  • Upload date:
  • Size: 2.5 MB
  • Tags: CPython 3.11, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.15

File hashes

Hashes for krptn-0.1.13-cp311-cp311-win32.whl
Algorithm Hash digest
SHA256 f077bd9073ff697c0c17bc509ec8a4c5b0520f5e979a6f27fcf30426bb060d47
MD5 be5033cb3e2483086661da52fd71e9db
BLAKE2b-256 8636188b2935793b5b65e954e52805b17979b6dcc917970c47706af26c16ec4b

See more details on using hashes here.

File details

Details for the file krptn-0.1.13-cp311-cp311-musllinux_1_1_x86_64.whl.

File metadata

File hashes

Hashes for krptn-0.1.13-cp311-cp311-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 6df91f2b5efebcb3c52f0f8b6a52fd24f298eb728af165dadee063e503599d55
MD5 6995b272e47e0084fade9bb8c9719af1
BLAKE2b-256 beb2517f261a60d5a68a63ec82ddec28689286b8f833d6b7aaaf0e2fd9b24e61

See more details on using hashes here.

File details

Details for the file krptn-0.1.13-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for krptn-0.1.13-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f8a2376737997e9272d33f5eafaa62737fb1ac9f24aea1b4ec7c0fd8ceb287cf
MD5 154719525cec34045f9b4cc36b90cbcf
BLAKE2b-256 b03b31f37ea3d2955791d23faef5165084795c85f2956f7577d2f358de204f62

See more details on using hashes here.

File details

Details for the file krptn-0.1.13-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for krptn-0.1.13-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4a6b7ba0d4ef03ca718c77797f65e92caafccc8fecedc9f39860b65d34c83d55
MD5 3fd7b8d7fde7ec5672d868ece40b0789
BLAKE2b-256 1a3f816d80fa51b02f38b658c668ada28c054734bbd7f598bc81327efa9342b7

See more details on using hashes here.

File details

Details for the file krptn-0.1.13-cp311-cp311-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for krptn-0.1.13-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 310d8717eced475d808806e976955de7a64ae6fa746907dd628adfb045d01098
MD5 0c1ddce5c2ecdf55ecbe222c38022da8
BLAKE2b-256 8749807a7238ae3f815e63fa090ecf70c85efd220b9f98d1dae61b2331fd321e

See more details on using hashes here.

File details

Details for the file krptn-0.1.13-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: krptn-0.1.13-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 3.1 MB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.15

File hashes

Hashes for krptn-0.1.13-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 cea3da3b20ebffbfd3b16ec6298da1031636f2c5bae801e443154d46b53d20d6
MD5 eb0c811c7835741b72a61dbdb85b223f
BLAKE2b-256 a6b86d3b2ca49218cb70dac393e6dac3b313a2a22f5ba25744ae8197ef8277f3

See more details on using hashes here.

File details

Details for the file krptn-0.1.13-cp310-cp310-win32.whl.

File metadata

  • Download URL: krptn-0.1.13-cp310-cp310-win32.whl
  • Upload date:
  • Size: 2.5 MB
  • Tags: CPython 3.10, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.15

File hashes

Hashes for krptn-0.1.13-cp310-cp310-win32.whl
Algorithm Hash digest
SHA256 9ddcbea914f8df6a1a53c639d6db2efe93f69e8e6ef3a2f6823dc497250d0add
MD5 3dc6c4850bee90d6a66a6233d70fed11
BLAKE2b-256 50d1b2efa3436c9222dad566a36c334eab509a5323f85932f18f1998c817d4a9

See more details on using hashes here.

File details

Details for the file krptn-0.1.13-cp310-cp310-musllinux_1_1_x86_64.whl.

File metadata

File hashes

Hashes for krptn-0.1.13-cp310-cp310-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 ed1b1cf9f11fab2fedfdfbeaceb384a68463c821b7b9017707b05345f4d68431
MD5 05c57df7d0ae2def381f721f0565ff7d
BLAKE2b-256 cb85cbf7ced718825cd4f739d3965e4339e2f540373f7592b218e0a41e6c3393

See more details on using hashes here.

File details

Details for the file krptn-0.1.13-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for krptn-0.1.13-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f735ea167a0d6ed5f8f6324aa69aaaa2819cf6778ff93d6208c7b26314ad3d25
MD5 a32e08933798c4b48c96078549ea0502
BLAKE2b-256 996b23d28ec3e9257aaeb9d36b41623166743c465feae8f3d4d1cee371150a45

See more details on using hashes here.

File details

Details for the file krptn-0.1.13-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for krptn-0.1.13-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f6119b28696107724b37b63b78dc1b509a76d51a012185530b292e231f70a1ba
MD5 bfa4ba55880a22abc636cb5277315298
BLAKE2b-256 ee6bde3a22f37c38ae1f473dbda215e8090b9468b8885ff0c2955c7ea3924b7c

See more details on using hashes here.

File details

Details for the file krptn-0.1.13-cp310-cp310-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for krptn-0.1.13-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 bff37afc4c884533493511a6985bf4165bb5c58f5d8312c1fe6ec22161a65a41
MD5 7decb6883cba64dac219fb7480ead474
BLAKE2b-256 9054b35a7665d288fddf04da80d1da60134efe22dfca2f268638c3ae3279e8bd

See more details on using hashes here.

File details

Details for the file krptn-0.1.13-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: krptn-0.1.13-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 3.1 MB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.15

File hashes

Hashes for krptn-0.1.13-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 21821782392c89b7a80bfe461191e5a32774699f3dd62d872645a537f5f117bd
MD5 50f64d471e10d7d4e2cc4ba34024f975
BLAKE2b-256 e860822a960f72734158ffdf5ac3b33fce5dc6e2b65e06fac9dc074ec142479b

See more details on using hashes here.

File details

Details for the file krptn-0.1.13-cp39-cp39-win32.whl.

File metadata

  • Download URL: krptn-0.1.13-cp39-cp39-win32.whl
  • Upload date:
  • Size: 2.5 MB
  • Tags: CPython 3.9, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.15

File hashes

Hashes for krptn-0.1.13-cp39-cp39-win32.whl
Algorithm Hash digest
SHA256 c1c3cf37c11018a2e4308255a07813954b2826e7853bcea0b88a0daef8a9974d
MD5 d5b7c10460197bd416cc9e484691864e
BLAKE2b-256 497d2481aff921052cce8a1c093c9f6edd9a04db97a5929f03358226384f0e69

See more details on using hashes here.

File details

Details for the file krptn-0.1.13-cp39-cp39-musllinux_1_1_x86_64.whl.

File metadata

File hashes

Hashes for krptn-0.1.13-cp39-cp39-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 549b5e0e6620f5653193cd7f3cea09063690cbcd94e080a378cb3cae1d17af9c
MD5 ce30161e7067725c259d5a3569f27aee
BLAKE2b-256 88edf3c8829e4db90604675090482cd5c2332e40f379a9d656fe9336e6e49c8a

See more details on using hashes here.

File details

Details for the file krptn-0.1.13-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for krptn-0.1.13-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ababa0e1fba925061cc0ed1f39d2967bfe56e486889c4182f6f665f59cbe752a
MD5 a8f1eba32c25dcc3231cc42324698148
BLAKE2b-256 b04e32a833ded29e209316e5f28238b4bb34a64075b466191ba925d27780d5ad

See more details on using hashes here.

File details

Details for the file krptn-0.1.13-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for krptn-0.1.13-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ddf1018581c30e0b2d342562ceee8a4d38bab97a5add127787a5d6fed8e23f01
MD5 553ad43597c4e13a96f53a10e509f839
BLAKE2b-256 07787b275f8f2e5646d12a023753306397259bac81b37325a1deb99966d65a59

See more details on using hashes here.

File details

Details for the file krptn-0.1.13-cp39-cp39-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for krptn-0.1.13-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 015aeb99c0eee0ec8050cdd178e1ad5611b4242eb74ac357f874b92f464e6a3d
MD5 19b2b1fce9c541ee1bf10529ce85ca66
BLAKE2b-256 f20e14b429e4d4fb2b61a1512c3c23557168e77c4d50bb35439e3d78e2dc578c

See more details on using hashes here.

Supported by

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