Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stream encrypt using functor based chunk_storage #396

Merged
merged 41 commits into from
Dec 17, 2024
Merged
Show file tree
Hide file tree
Changes from 37 commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
b2292b1
feat(storage): add recursive data map retrieval for decryption
dirvine Nov 15, 2024
8bfc193
refactor(decrypt): rename and restrict visibility of decrypt function
dirvine Nov 15, 2024
756b07c
refactor(api): remove unused seek functionality
dirvine Nov 15, 2024
a497b7c
refactor: move utility functions from lib.rs to utils.rs
dirvine Nov 15, 2024
d9fb03d
refactor: stream encryption code, fix tests, and improve error handling
dirvine Nov 16, 2024
642e58f
refactor: move stream out of use for now
dirvine Nov 16, 2024
2720c5a
fix: improve chunk handling and add comprehensive tests
dirvine Nov 17, 2024
63b3d44
fix: improve Python bindings and add comprehensive tests
dirvine Nov 17, 2024
e0077ea
feat(python): Enhance Python Bindings, Add Streaming Decrypt, and Imp…
dirvine Nov 17, 2024
080cc24
feat: update breaking change
dirvine Nov 17, 2024
a921482
feat(verify): Add Chunk Verification and Clean Up Python Bindings
dirvine Nov 17, 2024
2ba9389
fix: update benchmarks to use public API
dirvine Nov 18, 2024
f3882c1
fix: clippy
dirvine Nov 18, 2024
cbaa0fd
feat(docs): Add comprehensive Python documentation and docstrings
dirvine Nov 18, 2024
1994b1a
feat(cli): Add command-line interface for self-encryption
dirvine Nov 19, 2024
87f5593
feat: patch bump
dirvine Nov 19, 2024
b0ca5e5
feat(docs): enhance Python bindings documentation and CLI
dirvine Nov 19, 2024
4034ef3
feat: inital commit of functor based encrypt
dirvine Nov 28, 2024
402f5fd
refactor(encrypt): improve streaming encryption implementation
dirvine Nov 28, 2024
1714681
feat(python): Add streaming encryption and update documentation
dirvine Nov 28, 2024
f98e966
fix: bindings
dirvine Nov 29, 2024
cd9e7fe
fix: bindings
dirvine Nov 29, 2024
23c2b5c
fix: bindings
dirvine Nov 29, 2024
dcaf44c
fix: bindings
dirvine Nov 29, 2024
bd97c4c
fix: bindings
dirvine Nov 29, 2024
abf811d
fix: bindings
dirvine Nov 29, 2024
b30204e
fix: bindings
dirvine Nov 29, 2024
6b69b97
fix: bindings
dirvine Nov 29, 2024
19561f2
fix: bindings
dirvine Nov 29, 2024
12f527d
fix: bind
dirvine Nov 29, 2024
fc21dc9
fix: bindings
dirvine Nov 29, 2024
a708611
fix: bindings
dirvine Nov 29, 2024
e18931e
fix: bindings
dirvine Nov 29, 2024
d372e15
fix: bindings
dirvine Nov 29, 2024
90f2b05
refactor: improve streaming encryption memory usage
dirvine Nov 29, 2024
5794755
test: add encryption algorithm consistency test
dirvine Nov 29, 2024
709713c
feat: add command line arguments to parallel decryptor example
dirvine Nov 29, 2024
462a3c6
fix: clippy and fmt
dirvine Dec 10, 2024
ae07b68
refactor: rename encryption module to aes
dirvine Dec 10, 2024
389b305
refactor(streaming_encrypt): Implement single-pass streaming encryption
dirvine Dec 10, 2024
3466715
Revert "refactor: move stream out of use for now"
dirvine Dec 12, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
144 changes: 128 additions & 16 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,36 +69,148 @@ jobs:

linux:
runs-on: ubuntu-latest
# Add permissions to job
permissions:
id-token: write
contents: read
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
target: [x86_64]
target: [x86_64, i686]
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
python-version: ${{ env.PYTHON_VERSION }}
architecture: x64
- name: Build wheels
uses: messense/maturin-action@v1
with:
target: ${{ matrix.target }}
manylinux: auto
args: --release --out dist
maturin-version: "v0.13.0"
- name: Install built wheel
if: matrix.target == 'x86_64'
run: |
python -m pip install --user cffi
python -m pip install --user patchelf
pip install dist/${{ env.PACKAGE_NAME }}-*.whl --force-reinstall
pip install pytest
pytest -v
- name: Upload wheels
uses: actions/upload-artifact@v2
with:
name: wheels
path: dist

linux-cross:
runs-on: ubuntu-latest
strategy:
matrix:
target: [aarch64, armv7, s390x, ppc64le, ppc64]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Build wheels
uses: PyO3/maturin-action@v1
uses: messense/maturin-action@v1
with:
target: ${{ matrix.target }}
manylinux: auto
args: --release --out dist
sccache: 'true'
maturin-version: "v0.13.0"
- uses: uraimo/[email protected]
if: matrix.target != 'ppc64'
name: Install built wheel
with:
arch: ${{ matrix.target }}
distro: ubuntu20.04
githubToken: ${{ github.token }}
install: |
apt-get update
apt-get install -y --no-install-recommends python3 python3-pip
pip3 install -U pip
run: |
pip3 install ${{ env.PACKAGE_NAME }} --no-index --find-links dist/ --force-reinstall
pip install pytest
pytest -v
- name: Upload wheels
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v2
with:
name: wheels
path: dist/*.whl
if-no-files-found: error
path: dist

musllinux:
runs-on: ubuntu-latest
strategy:
matrix:
target:
- x86_64-unknown-linux-musl
- i686-unknown-linux-musl
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
architecture: x64
- name: Build wheels
uses: messense/maturin-action@v1
with:
target: ${{ matrix.target }}
manylinux: musllinux_1_2
args: --release --out dist
maturin-version: "v0.13.0"
- name: Install built wheel
if: matrix.target == 'x86_64-unknown-linux-musl'
uses: addnab/docker-run-action@v3
with:
image: alpine:latest
options: -v ${{ github.workspace }}:/io -w /io
run: |
apk add py3-pip
pip3 install -U pip pytest
pip3 install ${{ env.PACKAGE_NAME }} --no-index --find-links /io/dist/ --force-reinstall
python3 -m pytest
- name: Upload wheels
uses: actions/upload-artifact@v2
with:
name: wheels
path: dist

musllinux-cross:
runs-on: ubuntu-latest
strategy:
matrix:
platform:
- target: aarch64-unknown-linux-musl
arch: aarch64
- target: armv7-unknown-linux-musleabihf
arch: armv7
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Build wheels
uses: messense/maturin-action@v1
with:
target: ${{ matrix.platform.target }}
manylinux: musllinux_1_2
args: --release --out dist
maturin-version: "v0.13.0"
- uses: uraimo/run-on-arch-action@master
name: Install built wheel
with:
arch: ${{ matrix.platform.arch }}
distro: alpine_latest
githubToken: ${{ github.token }}
install: |
apk add py3-pip
pip3 install -U pip pytest
run: |
pip3 install ${{ env.PACKAGE_NAME }} --no-index --find-links dist/ --force-reinstall
python3 -m pytest
- name: Upload wheels
uses: actions/upload-artifact@v2
with:
name: wheels
path: dist


sdist:
runs-on: ubuntu-latest
Expand Down
13 changes: 13 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,16 @@ target/
*.sublime-*
/bin/
.DS_Store

# Python
*__pycache__*
*.pyc
*.DS_Store
*.egg-info
*.egg
*.whl
*.so
*pyc*



5 changes: 3 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ license = "GPL-3.0"
name = "self_encryption"
readme = "README.md"
repository = "https://github.com/maidsafe/self_encryption"
version = "0.31.0"
version = "0.32.4"

[features]
default = []
Expand All @@ -27,7 +27,7 @@ num_cpus = "1.13.0"
itertools = "~0.10.0"
tempfile = "3.6.0"
xor_name = "5.0.0"
pyo3 = { version = "0.19", optional = true, features = ["extension-module"] }
pyo3 = { version = "=0.20.3", optional = true, features = ["extension-module"] }

[dependencies.brotli]
version = "~3.3.0"
Expand Down Expand Up @@ -57,6 +57,7 @@ features = ["rt"]
[dev-dependencies]
criterion = "~0.3"
docopt = "~0.9.0"
clap = { version = "4.4", features = ["derive"] }

[dev-dependencies.tokio]
version = "1.34.0"
Expand Down
Loading
Loading