Description
This directory contains the python wrapper based on cffi and the command line tool to use Mix&Slice on your files.
The C implementation has been built with performance in mind, whereas the python wrapper and the CLI tool has been implemented to offer a more widespread access of the Mix&Slice capabilities. The mixing and slicing phases use the C implementation, but the python conversion adds a big overhead since it has to materialize all the buffers in memory.
Since the tool materializes all the buffers in memory and has to perform both the mixing and the slicing phases, you should only use the CLI tool on files that are at maximum as large as a third of your available memory.
Please check the file example.py to understand how to use the library.
Requirements
Before proceeding please install the openssl/crypto library source. In ubuntu you can proceed as follows:
sudo apt install libssl-dev
Installation
The package has been uploaded to PyPI so, after installing the requirements, you can install the latest released version using pip:
pip install aesmix
To install the version from this repository, you can use the commands:
make build
sudo make install
To install the package in a virtual environment, use:
python setup.py install
The python wrapper will also compile the libaesmix library.
Command Line Interface
This package also installs the mixslice tool that can be used as follows.
To encrypt a file:
$ mixslice encrypt sample.txt
INFO: [*] Encrypting file sample.txt ...
INFO: Output fragdir: sample.txt.enc
INFO: Public key file: sample.txt.public
INFO: Private key file: sample.txt.private
To perform a policy update:
$ mixslice update sample.txt.enc
INFO: [*] Performing policy update on sample.txt.enc ...
INFO: Encrypting fragment #68
INFO: Done
To decrypt a file:
$ mixslice decrypt sample.txt.enc
INFO: [*] Decrypting fragdir sample.txt.enc using key sample.txt.public ...
INFO: Decrypting fragment #68
INFO: Decrypted file: sample.txt.enc.dec
$ sha1sum sample.txt sample.txt.enc.dec
d3e92d3c3bf278e533f75818ee94d472347fa32a sample.txt
d3e92d3c3bf278e533f75818ee94d472347fa32a sample.txt.enc.dec
Key regression mechanism
The key regression mechanism implementation is based on “Key Regression: Enabling Efficient Key Distribution for Secure Distributed Storage”.
Example
The key regression library can be used as follows.
from aesmix.keyreg import KeyRegRSA
iters = 5
stp = KeyRegRSA()
print("== WINDING ==")
for i in range(iters):
stp, stm = stp.wind()
print("k%i: %r" % (i, stm.keyder()))
print("\n== UNWINDING ==")
for i in range(iters - 1, -1, -1):
print("k%i: %r" % (i, stm.keyder()))
stm = stm.unwind()
Metadata
Release files for aesmix 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 |
|---|---|---|---|---|
| aesmix-1.6.tar.gz | 14.7 kB | Without provenance | Details for aesmix-1.6.tar.gz |
Release files / aesmix-1.6.tar.gz
| Download URL | aesmix-1.6.tar.gz |
|---|---|
| Size | 14.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0075721efb2a091f3ee822ff3e3a8412134ec239e11a238fab905b91d4485daa
|
|
BLAKE2b-256 checksum How to use checksums |
263990fbca4528501f30d0b6641a4d1fb4a26334593582d99dae6614c8f618e2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.9.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.7
|
Security for aesmix 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.