Skip to main content

Zero Knowledge security for Python

Project description

Krptn

Please see our documentation.

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 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.

How we achieve this?

  • All Data is encrypted (any data can be request 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
  • 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. However, we have decided that we will not implement HSMs because it would not be possible to withhold that cryptographic systems are only unlocked with correct credentials: this is because a HSM would happily provide the key to Krypton irrespective of whether the user of the web app has provided credentials.

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

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.6-cp311-cp311-win_amd64.whl (3.0 MB view hashes)

Uploaded CPython 3.11 Windows x86-64

krptn-0.1.6-cp311-cp311-win32.whl (2.5 MB view hashes)

Uploaded CPython 3.11 Windows x86

krptn-0.1.6-cp311-cp311-musllinux_1_1_x86_64.whl (6.4 MB view hashes)

Uploaded CPython 3.11 musllinux: musl 1.1+ x86-64

krptn-0.1.6-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (5.8 MB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

krptn-0.1.6-cp311-cp311-macosx_11_0_arm64.whl (4.6 MB view hashes)

Uploaded CPython 3.11 macOS 11.0+ ARM64

krptn-0.1.6-cp311-cp311-macosx_10_9_x86_64.whl (5.1 MB view hashes)

Uploaded CPython 3.11 macOS 10.9+ x86-64

krptn-0.1.6-cp310-cp310-win_amd64.whl (3.0 MB view hashes)

Uploaded CPython 3.10 Windows x86-64

krptn-0.1.6-cp310-cp310-win32.whl (2.5 MB view hashes)

Uploaded CPython 3.10 Windows x86

krptn-0.1.6-cp310-cp310-musllinux_1_1_x86_64.whl (6.4 MB view hashes)

Uploaded CPython 3.10 musllinux: musl 1.1+ x86-64

krptn-0.1.6-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (5.8 MB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

krptn-0.1.6-cp310-cp310-macosx_11_0_arm64.whl (4.6 MB view hashes)

Uploaded CPython 3.10 macOS 11.0+ ARM64

krptn-0.1.6-cp310-cp310-macosx_10_9_x86_64.whl (5.1 MB view hashes)

Uploaded CPython 3.10 macOS 10.9+ x86-64

krptn-0.1.6-cp39-cp39-win_amd64.whl (3.0 MB view hashes)

Uploaded CPython 3.9 Windows x86-64

krptn-0.1.6-cp39-cp39-win32.whl (2.5 MB view hashes)

Uploaded CPython 3.9 Windows x86

krptn-0.1.6-cp39-cp39-musllinux_1_1_x86_64.whl (6.4 MB view hashes)

Uploaded CPython 3.9 musllinux: musl 1.1+ x86-64

krptn-0.1.6-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (5.8 MB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

krptn-0.1.6-cp39-cp39-macosx_11_0_arm64.whl (4.6 MB view hashes)

Uploaded CPython 3.9 macOS 11.0+ ARM64

krptn-0.1.6-cp39-cp39-macosx_10_9_x86_64.whl (5.1 MB view hashes)

Uploaded CPython 3.9 macOS 10.9+ x86-64

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