vgem (python edition)
VerseGroup's native encryption manager adapted for python applications.
Function
EM is an efficient manager to allow for easy encryption/decryption/secure session management, without having to code for specific algorithims, as long as the client/reciever uses this same package (or alternative language equivalent).
EM prefers the OOP approach, in order to reduce the amount of key passing and similar tedious tasks. Simply initiate an EM instance empty to generate a new set of keys, or pass in existing keys (serialized or object formatted) to use. Supports mainly RSA assymetric encryption, but also hybrid encryption with RSA generated fernet wrapped AES sessions.
EM also provides utilities such as hashing and base64 encoding.
RSA and Fernet-AES explained
RSA is assymetric encryption, which uses private and public keys to send encrypted messages. Private keys can decrypt messages and public keys can only encrypt messages. A server wishing to recieve encrypted messages would distribute its public keys freely, and then decrypt incoming messages with its' private key. For two-way encryption, two servers would each send eachother their public keys, and decrypt messages with their private keys.
Symmetric keys is less secure as it uses one key that can both encrypt and decrypt. RSA is efficient and more secure than fernet, but can sometime be slow and tedious. So, hybrid encryption is an option. Both servers use their RSA keys to send eachother a symmetric key to use (fernet key) and they then communicate with that fernetkey that only they know (this uses RSA to securly send over the symmteric key).
vgem's EM class supports both use cases.
How to Use
Through terminal with an activated virtualenv:
pip install vgem
In python:
from vgem import EM
Then you have access to the EM class.
Example usage of RSA:
from vgem import EM
handler = EM()
message = "A very secret message"
encrypted_message = handler.encrypt(message)
private_key = handler.serialize_private_key()
handler2 = EM(serialized_private_key = private_key)
decrypted_message = handler2.decrypt(encrypted_message)
assert message == decrypted_message
Documentation
class EM
utils subdir for alternative approach (OOP prefered instead though)
Attributes
- RSA private key
- RSA public key
- Fernet object
- Fernet key
Construction
- Optional Paramaters:
- RSA private key
- RSA public key
- Serialized RSA private key
- Serialized RSA public key
- Fernet key
- Encrypted fernet key
- EM will construct anything else essential and not passed in
Methods
- Serialize private/public RSA keys
- Encrypt/Decrypt using RSA keys
- Load new fernet sessions
- Encrypt/Decrypt using fernet session
- Serialize/Deserialize RSA encrypted fernet keys
- Base64 encoding option for all encrypting and serialization
New
- hashing and salting!
Metadata
Release files for vgem 1.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| vgem-1.3.0.tar.gz | 8.2 kB | Without provenance | Details for vgem-1.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| vgem-1.3.0-py3-none-any.whl | Python 3 | none | any | Details for vgem-1.3.0-py3-none-any.whl |
Total release size: 18.8 kB
Release files / vgem-1.3.0.tar.gz
| Download URL | vgem-1.3.0.tar.gz |
|---|---|
| Size | 8.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d47dd643554681e7b77de6aba584f182dfa8b1a70249085536d756c1d3d1a8a5
|
|
BLAKE2b-256 checksum How to use checksums |
af99b3a6248aeb6f43708f22f0b9ee8b5856d7657d73285b69a00276f6b19aae
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10
|
Release files / vgem-1.3.0-py3-none-any.whl
| Download URL | vgem-1.3.0-py3-none-any.whl |
|---|---|
| Size | 10.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c326a29f5f1e61809ddfbab487adfb8e1ed438cef2e24a7158c27fb8d0c1ef18
|
|
BLAKE2b-256 checksum How to use checksums |
9cf93e6a42de463cbfc3dab352dd51d5d73d0ab955b1a8523050bff0fb353c92
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10
|
Security for vgem 1.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.