Module which enables storing encrypted, password protected secrets in a single file. Also allows for easy encryption and decryption of data
Reason this release was yanked:
Version is not recommended because of bad file handling
Project description
secure_module Python
Security module which stores important and confidental information. Information is stored encrypted and password protected. The module also provides the WebEncr and WebDecr functions which encrypts and decrypts any object with AES-GCM 256-bit encryption. Have a look at SECURITY.md and read the information below for security informations.
How to use the module
Have a look at the example.py file on GitHub. Try to always keep the latest version in your code. New Versions will be named with semantic versioning https://semver.org/. You need to have pycryptodomex installed. Example command for pip: pip install pycryptodomex. Keep aware always adding secrets without making a commit with the secret in plaintext!
General information about AES-GCM
AES-GCM provides data integrity and confidentiality (it belongs to the class of authenticated encryption with associated data - AEAD algorithms). For further information about GCM I recommend you to have a look at http://csrc.nist.gov/publications/nistpubs/800-38D/SP-800-38D.pdf. You can also have a look at https://en.wikipedia.org/wiki/Galois/Counter_Mode.
Security
- For any given key, GCM is limited to encrypting 2^39 - 256 bits of plain data (64GiB)!
- It's security depends on a unique nonce for every encryption performed with the same key. Have a look at http://csrc.nist.gov/publications/nistpubs/800-38D/SP-800-38D.pdf.
- The authentication strength depends on the length of it's tag. The longer the tag (128 bit / 16 byte maximum) the better.
- For information about Key Establishment have a look at section 8.1 in http://csrc.nist.gov/publications/nistpubs/800-38D/SP-800-38D.pdf.
Information about my implementation
nonce
I use a pseudo random nonce with 64 bytes length. If high security is needed or something like file encryption is wanted, I would recommend using a deterministic nonce, like described in section 8.2.1 in http://csrc.nist.gov/publications/nistpubs/800-38D/SP-800-38D.pdf. As the pycryptodomex implementation supports 16 byte nonces, I would use a 16 byte nonce. If you change the length of the nonce, the decrypt function must be adapted to the new length.
authentication tag
I use the longest possible tag length, which ensures the highest possible authentication strength. Smaller tag lengths are highly discouraged.
Key Generation
Generates a random key. For information about Key Establishment have a look at section 8.1 in http://csrc.nist.gov/publications/nistpubs/800-38D/SP-800-38D.pdf.
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 Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file hc671123_secure_secrets-2.1.0.tar.gz.
File metadata
- Download URL: hc671123_secure_secrets-2.1.0.tar.gz
- Upload date:
- Size: 4.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
810d48b914291402689d844d6f8b20ea390ecef6443a40b7d625baf94226cbbf
|
|
| MD5 |
0d70afe9d0510a6a25e1c3a4f787e7b4
|
|
| BLAKE2b-256 |
f21dd83b221e253175bd913468ab372125973e6d82eef68627b780e99a6f4a0f
|
File details
Details for the file hc671123_secure_secrets-2.1.0-py3-none-any.whl.
File metadata
- Download URL: hc671123_secure_secrets-2.1.0-py3-none-any.whl
- Upload date:
- Size: 5.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
471bcc0f4bf86aac3202ffe6855f6a9693f6186c27589ec4b55d5449d6f7f541
|
|
| MD5 |
b15ee71876960140e4fa825bfdb887d9
|
|
| BLAKE2b-256 |
cdbbf1977e0a443affa244f43a087c2dca765cf6f45e177ec28c105cbd7ac876
|