https://github.com/krptn/krypton
Data encryption at rest and IAM for Python
https://github.com/krptn/krypton
authentication cryptography django encryption fido2 fips flask iam python security totp webauthn
Last synced: 5 months ago
JSON representation
Data encryption at rest and IAM for Python
- Host: GitHub
- URL: https://github.com/krptn/krypton
- Owner: krptn
- License: apache-2.0
- Created: 2021-03-28T13:02:39.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2025-04-29T23:16:08.000Z (5 months ago)
- Last Synced: 2025-04-30T00:23:14.449Z (5 months ago)
- Topics: authentication, cryptography, django, encryption, fido2, fips, flask, iam, python, security, totp, webauthn
- Language: Python
- Homepage: https://www.krptn.dev/
- Size: 4.62 MB
- Stars: 49
- Watchers: 0
- Forks: 4
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Codeowners: .github/CODEOWNERS
- Security: SECURITY.md
Awesome Lists containing this project
README

[](https://github.com/krptn/krypton/actions/workflows/release.yml)
We also have a [homepage](https://www.krptn.dev/) and [documentation](https://docs.krptn.dev/index.html) for you to check out.
# Krptn
```shell
pip install krptn
```## What problem do we solve?
**We all love Django and other web frameworks!** However, their primary focus is creating websites - not implementing secure storage for user data. Django makes it easy to store data. While it hashes the password, it does not encrypt user data for you. In case of a data breach, malicious actors could access any data from the DB. Encryption is left to the developer...
**Wouldn't it be nice if encryption would also be handled?** Perhaps it could be handled in a **[way that keys are derived from credentials](https://www.krptn.dev/news/security-model/)**, such that, without the user entering credentials, not even the database administrator can read it?! This is exactly what we do!
**We also handle user authentication, including MFA, and passwordless authentication.**
**Krptn also runs in the same server instance** as your web app. So you don't have to host anything new. Just install the extension for Python.
**To prove that such is possible, we have a [Flask](https://github.com/krptn/flaskExample) and [Django](https://github.com/krptn/djangoExample) example on GitHub.**
## What do we do exactly?
We are building a user authentication and access management system (IAM) with **[data encryption at rest derived from credentials](https://www.krptn.dev/news/security-model/)**. It is available as a python extension module. However we have certain [limitations](https://www.krptn.dev/news/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 *[security from encryption](https://www.krptn.dev/news/security-model/)* without ever needing to even notice it! It protects you from server side attacks.
Here is an example usage:
```python
from krypton.auth.users import userModelmodel = userModel.standardUser(None)
model.saveNewUser("Test_UserName", "Test_Password")
model.data.email = "test@example.com" # The email will be encrypted, and securely stored
```
## Try it out
Quickly install the package with pip for Python>3.9:
```shell
pip install krptn
```Have a look at our [User Authentication documentation](https://docs.krptn.dev/README-USER-AUTH.html), and create some users.
Ready to integrate it into your WebApp? Have a look at some of our integration's available with [Django and Flask](https://docs.krptn.dev/README.html#integration-with-web-frameworks)!