Python Bluepoint Encryption
Full symetric block cypher encryption algorythm
Installation:
pip install bluepyenc
Source:
https://github.com/pglen/bluepyinc
Quick example:
import bluepyenc
buff = "Hello, this is a test string.";
passw = "1234" # This is a test
enc = bluepyenc.encrypt(buff, passw)
dec = bluepyenc.decrypt(enc, passw)
assert buff == dec
The power of the encryption comes from the following primitives: (implemented as 'C' macros)
HECTOR(op) use op with vector highs
PASSLOOP(op) use op with pass as vector
FWLOOP(op) forward loop traverse
FWLOOP2(op) forward loop variation
BWLOOP(op) backward loop
BWLOOP2(op) backward loop variation
MIXIT(op) mix op on first part with second part
MIXITR(op) mix op on first part with second part reverse
MIXIT2(op) mix op on first part with second part variation
MIXIT2R(op) mix op on first part with second part variation in reverse
MIXIT4(op) mix quarter length
These are then added into encrypt operations. Please note that the parameter op is a mathematical / logical operation. (plus, minus, xor ...) The decryption is done in reverse order and reverse operator. (ex: '+' -> '-')
The power comes from the arbitrary order of operators and the arbitrary injection of reversible mathematical / logical operators.
Bluepy has the following operator stack:
Encryption:
PASSLOOP(+)
MIXIT2(+) MIXIT2R(+)
HECTOR(+) FWLOOP(+)
MIXIT2(+) MIXIT2R(+)
PASSLOOP(+) FWLOOP(+)
HECTOR(+) FWLOOP(+)
MIXITR(+)
BWLOOP(+) HECTOR(+)
Decryption:
HECTOR(-) BWLOOP2(-)
MIXITR(-)
FWLOOP2(-) HECTOR(-)
FWLOOP2(-) PASSLOOP(-)
MIXIT2R(-) MIXIT2(-)
FWLOOP2(-) HECTOR(-)
MIXIT2R(-) MIXIT2(-)
PASSLOOP(-)
The resulting bit propagation is such high quality, that a single bit change in the original text will change every byte in the resulting block. (see bit description study in the code's directory)
One may create a custom encryption by altering the operator stack in the 'C' source.
This beats current industrial strength encryptions, and perhaps qualifies for the quantum challenge.
Decryption is done by applying the ops in reverse, both by order and meaning. This is very apparent in the functions ENCRYPT() and DECRYPT(). (see source)
Encryption quality test:
The cyphertext is tested for randomness with the 'dieharder' suite. All tests are passed. Below, is an extract of the utility's printout.
diehard_birthdays| 0| 100| 100|0.07973936| PASSED
diehard_operm5| 0| 1000000| 100|0.22646819| PASSED
diehard_rank_32x32| 0| 40000| 100|0.62699248| PASSED
diehard_rank_6x8| 0| 100000| 100|0.66828243| PASSED
diehard_bitstream| 0| 2097152| 100|0.55151892| PASSED
diehard_opso| 0| 2097152| 100|0.04670626| PASSED
diehard_oqso| 0| 2097152| 100|0.06864521| PASSED
diehard_dna| 0| 2097152| 100|0.72141254| PASSED
diehard_count_1s_str| 0| 256000| 100|0.68376408| PASSED
The bluefile encryption / decryption utility
This utility can be used as a quick command line encryption / decryption utility. One of encrypt / decrypt must be specified.
Usage: blueencfile.py [-e] [-d] [options] fromfile tofile
Specify -e for encrypt -d decrypt
Options: -p pass - pass to use
-f - force overwrite
-v - Verbose
-V - Print version
-q - Quiet
-h - Help
TODO;
Started the virtual machine operation, where the encryption is run through a virtual machine stack, following a pre-made recipe or getting hints from the password.
History:
Release Thu 13.Oct.2022
Pip install Sat 03.Jan.2026
Published on GH Sun 04.Jan.2026
Warning!
No metadata is stored. It is left up to the caller to maintain data integrity beyond the cyphertext operations.
The encryption / decryption has to run with the same vector, same pass same block length. Make sure you know what you are doing, as it is all too easy to encrypt something into oblivion.
Colophon:
This project is a descendent of the bluepoint encryption algorithm, crafted in 'C'.
EOF
Metadata
Release files for bluepyenc 1.2.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 |
|---|---|---|---|---|
| bluepyenc-1.2.0.tar.gz | 12.3 kB | Without provenance | Details for bluepyenc-1.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| bluepyenc-1.2.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl | CPython 3.10 | CPython 3.10 | Linux glibc 2.17+ x86-64 | Details for bluepyenc-1.2.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl |
Total release size: 45.2 kB
Release files / bluepyenc-1.2.0.tar.gz
| Download URL | bluepyenc-1.2.0.tar.gz |
|---|---|
| Size | 12.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8bd25c4779f0c14a9a4737ccec878472a2a864252e96ac55651cacb715740497
|
|
BLAKE2b-256 checksum How to use checksums |
b065b76415e83d2f6e51565f7e6c21fd93f74c3e19a25eb5167597d604d61ef4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.12
|
Release files / bluepyenc-1.2.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
| Download URL | bluepyenc-1.2.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl |
|---|---|
| Size | 32.8 kB |
| Tags | CPython 3.10 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
392cfc2d16af0a7c8127ea1b656826cecf3232a39368cff1aba2a96cb849f412
|
|
BLAKE2b-256 checksum How to use checksums |
0fdb3b6a962a41542f1a88ef57d64202e77e85a7e8ee79059b291e2f6f831177
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.12
|
Security for bluepyenc 1.2.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.