Alguns
Alguns is a symmetric encryption method that contains 2 keys, without which decryption of the message is impossible.
Alguns also uses 128-bit AES in CBC mode and PKCS7 padding.
Letters and symbols are encrypted using the replacement method generate_replacement. A replacement character for a letter consists of [randomSymbol, randomNumber(0,99), randomSymbol, randomNumber(0,99)]. A Alguns key as returned by the generate_key actually contains two 16-byte keys: A signing key used to sign the HMAC.
A private key used by the encryption. These two values are concatenated to form a 32 byte value. This 32 byte key is then encoded using Base64 encoding. This encodes the binary quantity as string of ASCII characters. The variant of Base64 used is URL and filename safe, meaning that it doesn't contain any characters that aren't permitted in a URL or a valid filename in any major operating system.
Supported Languages:
- Russian
- English
Installation
The installation method for this module is shown below.
pip3 install alguns
How generate keys?
key = Alguns.generate_key()
replacement = Alguns.generate_replacement()
# Put this somewhere safe!
How to encrypt a message?
mykey = # My key that I created earlier.
myreplacement = # My replacement that I created earlier.
al = Alguns(key=mykey, replacement=myreplacement)
msgcrypt = al.encrypt('Hellow it is my message! Привет, это мое сообщение...')
print(msgcrypt)
# gAAAAABewxb_nE1mbHgN7ma79_XAbh68hLblIFdX3czIEmUDCSFWxMXTTEdIU5...
How to decrypt a message?
al = Alguns(key=mykey, replacement=myreplacement)
msgdecrypt = al.decrypt('gAAAAABewxb_nE1mbHgN7ma79_XAbh68hLblIFdX3czIEmUDCSFWxMXTTEdIU5...')
print(msgdecrypt)
# Hellow it's my message! Привет, это мое сообщение...
Metadata
Release files for alguns 0.1.6
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 |
|---|---|---|---|---|
| alguns-0.1.6.tar.gz | 5.5 kB | Without provenance | Details for alguns-0.1.6.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| alguns-0.1.6-py3-none-any.whl | Python 3 | none | any | Details for alguns-0.1.6-py3-none-any.whl |
Total release size: 12.9 kB
Release files / alguns-0.1.6.tar.gz
| Download URL | alguns-0.1.6.tar.gz |
|---|---|
| Size | 5.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e802361bea1c5d0cb1e66e141643a411d19a853abef56ad68bb9bc04e35d2107
|
|
BLAKE2b-256 checksum How to use checksums |
2f51445a88dd9e46727a1b85b9b62b06839e472f567e77f79ddd896ff85eb74f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.4 CPython/3.7.4 Windows/10
|
Release files / alguns-0.1.6-py3-none-any.whl
| Download URL | alguns-0.1.6-py3-none-any.whl |
|---|---|
| Size | 7.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e3a83554730e05a43651c964253f2b0550922f6178bd8175f32194f855891f83
|
|
BLAKE2b-256 checksum How to use checksums |
3523468d711e52577c7c17181663484df7c9b4cbfff0d5737c3120959dd0861f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.4 CPython/3.7.4 Windows/10
|
Security for alguns 0.1.6
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.