beaconcrypt 0.2.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- beaconcrypt-0.2.0/.cargo/config.toml +1 -0
- beaconcrypt-0.2.0/.github/workflows/python.yml +99 -0
- beaconcrypt-0.2.0/.github/workflows/release.yml +89 -0
- beaconcrypt-0.2.0/.github/workflows/rust.yml +24 -0
- beaconcrypt-0.2.0/.gitignore +72 -0
- beaconcrypt-0.2.0/Cargo.lock +1322 -0
- beaconcrypt-0.2.0/Cargo.toml +44 -0
- beaconcrypt-0.2.0/LICENSE +7 -0
- beaconcrypt-0.2.0/PKG-INFO +8 -0
- beaconcrypt-0.2.0/README.md +58 -0
- beaconcrypt-0.2.0/bindings.h +405 -0
- beaconcrypt-0.2.0/build.rs +32 -0
- beaconcrypt-0.2.0/clippy.toml +1 -0
- beaconcrypt-0.2.0/doc/protocol.md +120 -0
- beaconcrypt-0.2.0/doc/rationale.md +11 -0
- beaconcrypt-0.2.0/doc/threat_model.md +32 -0
- beaconcrypt-0.2.0/pyproject.toml +46 -0
- beaconcrypt-0.2.0/rustfmt.toml +5 -0
- beaconcrypt-0.2.0/src/beacon.rs +313 -0
- beaconcrypt-0.2.0/src/cnsa2.rs +561 -0
- beaconcrypt-0.2.0/src/error.rs +69 -0
- beaconcrypt-0.2.0/src/lib.rs +167 -0
- beaconcrypt-0.2.0/src/pqxdh.rs +680 -0
- beaconcrypt-0.2.0/src/schema/cryptoframe.capnp +11 -0
- beaconcrypt-0.2.0/src/schema/phase1.capnp +12 -0
- beaconcrypt-0.2.0/src/schema/phase2.capnp +14 -0
- beaconcrypt-0.2.0/src/schema/protogram.capnp +10 -0
- beaconcrypt-0.2.0/src/server.rs +299 -0
- beaconcrypt-0.2.0/src/shared.rs +737 -0
- beaconcrypt-0.2.0/tests/beacon.rs +34 -0
- beaconcrypt-0.2.0/tests/server.rs +44 -0
- beaconcrypt-0.2.0/tests/test_encryption.py +92 -0
- beaconcrypt-0.2.0/tests/test_registration.py +23 -0
- beaconcrypt-0.2.0/uv.lock +215 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
# This workflow builds and uploads a Python package to PyPI when a tag is pushed.
|
|
2
|
+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries
|
|
3
|
+
|
|
4
|
+
# This workflow uses actions that are not certified by GitHub.
|
|
5
|
+
# They are provided by a third-party and are governed by
|
|
6
|
+
# separate terms of service, privacy policy, and support
|
|
7
|
+
# documentation.
|
|
8
|
+
|
|
9
|
+
name: Upload Python Package
|
|
10
|
+
|
|
11
|
+
on:
|
|
12
|
+
push:
|
|
13
|
+
tags:
|
|
14
|
+
- "**"
|
|
15
|
+
|
|
16
|
+
permissions:
|
|
17
|
+
contents: read
|
|
18
|
+
|
|
19
|
+
jobs:
|
|
20
|
+
sdist:
|
|
21
|
+
runs-on: ubuntu-latest
|
|
22
|
+
|
|
23
|
+
steps:
|
|
24
|
+
- uses: actions/checkout@v7
|
|
25
|
+
|
|
26
|
+
- name: Install uv
|
|
27
|
+
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
|
|
28
|
+
- name: Set up Python
|
|
29
|
+
run: uv python install 3.14
|
|
30
|
+
- name: Install cap'n proto
|
|
31
|
+
run: |
|
|
32
|
+
sudo apt install capnproto
|
|
33
|
+
|
|
34
|
+
- name: Build source distribution
|
|
35
|
+
run: uvx maturin sdist --out dist
|
|
36
|
+
|
|
37
|
+
- name: Upload source distribution
|
|
38
|
+
uses: actions/upload-artifact@v4
|
|
39
|
+
with:
|
|
40
|
+
name: release-sdist
|
|
41
|
+
path: dist/
|
|
42
|
+
|
|
43
|
+
wheels:
|
|
44
|
+
name: Build wheels on ${{ matrix.os }}
|
|
45
|
+
runs-on: ${{ matrix.os }}
|
|
46
|
+
strategy:
|
|
47
|
+
fail-fast: false
|
|
48
|
+
matrix:
|
|
49
|
+
os:
|
|
50
|
+
- ubuntu-latest
|
|
51
|
+
- windows-latest
|
|
52
|
+
|
|
53
|
+
steps:
|
|
54
|
+
- uses: actions/checkout@v7
|
|
55
|
+
- name: Install uv
|
|
56
|
+
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
|
|
57
|
+
- name: Set up Python
|
|
58
|
+
run: uv python install 3.14
|
|
59
|
+
|
|
60
|
+
- name: Build wheels
|
|
61
|
+
uses: pypa/cibuildwheel@v3.2.0
|
|
62
|
+
with:
|
|
63
|
+
output-dir: dist/
|
|
64
|
+
|
|
65
|
+
- name: Upload wheels
|
|
66
|
+
uses: actions/upload-artifact@v4
|
|
67
|
+
with:
|
|
68
|
+
name: release-wheels-${{ matrix.os }}
|
|
69
|
+
path: dist/
|
|
70
|
+
|
|
71
|
+
pypi-publish:
|
|
72
|
+
runs-on: ubuntu-latest
|
|
73
|
+
needs:
|
|
74
|
+
- sdist
|
|
75
|
+
- wheels
|
|
76
|
+
permissions:
|
|
77
|
+
# IMPORTANT: this permission is mandatory for trusted publishing
|
|
78
|
+
id-token: write
|
|
79
|
+
|
|
80
|
+
# Dedicated environments with protections for publishing are strongly recommended.
|
|
81
|
+
# For more information, see: https://docs.github.com/en/actions/deployment/targeting-different-environments/using-environments-for-deployment#deployment-protection-rules
|
|
82
|
+
environment:
|
|
83
|
+
name: pypi
|
|
84
|
+
# OPTIONAL: uncomment and update to include your PyPI project URL in the deployment status:
|
|
85
|
+
# url: https://pypi.org/p/YOURPROJECT
|
|
86
|
+
url: https://pypi.org/project/beaconcrypt/${{ github.ref_name }}
|
|
87
|
+
|
|
88
|
+
steps:
|
|
89
|
+
- name: Retrieve release distributions
|
|
90
|
+
uses: actions/download-artifact@v4
|
|
91
|
+
with:
|
|
92
|
+
pattern: release-*
|
|
93
|
+
path: dist/
|
|
94
|
+
merge-multiple: true
|
|
95
|
+
|
|
96
|
+
- name: Publish release distributions to PyPI
|
|
97
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
98
|
+
with:
|
|
99
|
+
packages-dir: dist/
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags: '*'
|
|
6
|
+
|
|
7
|
+
env:
|
|
8
|
+
CARGO_TERM_COLOR: always
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
ubuntu-build:
|
|
12
|
+
strategy:
|
|
13
|
+
matrix:
|
|
14
|
+
os: [ubuntu-latest, ubuntu-24.04-arm]
|
|
15
|
+
runs-on: ${{ matrix.os }}
|
|
16
|
+
|
|
17
|
+
steps:
|
|
18
|
+
- uses: actions/checkout@v7
|
|
19
|
+
- name: Install cap'n proto
|
|
20
|
+
run: |
|
|
21
|
+
curl -O https://capnproto.org/capnproto-c++-1.5.0.tar.gz
|
|
22
|
+
tar zxf capnproto-c++-1.5.0.tar.gz
|
|
23
|
+
cd capnproto-c++-1.5.0
|
|
24
|
+
./configure
|
|
25
|
+
make -j4 check
|
|
26
|
+
sudo make install
|
|
27
|
+
- name: Build
|
|
28
|
+
run: |
|
|
29
|
+
rustup component add rust-src --toolchain nightly
|
|
30
|
+
cargo +nightly rustc --release -Z build-std=std,panic_abort --crate-type=staticlib
|
|
31
|
+
- name: Run tests
|
|
32
|
+
run: cargo test --verbose
|
|
33
|
+
- name: Rename
|
|
34
|
+
run: mv target/release/libbeaconcrypt.a target/release/libbeaconcrypt-${{ matrix.os }}.a
|
|
35
|
+
- name: Upload release artifact
|
|
36
|
+
uses: actions/upload-artifact@v7
|
|
37
|
+
with:
|
|
38
|
+
name: beaconcrypt-static-${{ matrix.os }}
|
|
39
|
+
path: target/release/libbeaconcrypt-${{ matrix.os }}.a
|
|
40
|
+
retention-days: 7
|
|
41
|
+
|
|
42
|
+
windows-build:
|
|
43
|
+
strategy:
|
|
44
|
+
matrix:
|
|
45
|
+
os: [windows-latest]
|
|
46
|
+
runs-on: ${{ matrix.os }}
|
|
47
|
+
|
|
48
|
+
steps:
|
|
49
|
+
- uses: actions/checkout@v7
|
|
50
|
+
- name: Install cap'n proto
|
|
51
|
+
run: |
|
|
52
|
+
curl.exe -O https://capnproto.org/capnproto-c++-win32-1.5.0.zip
|
|
53
|
+
Expand-Archive capnproto-c++-win32-1.5.0.zip
|
|
54
|
+
- name: Build
|
|
55
|
+
run: |
|
|
56
|
+
$env:Path = "$env:Path;$(join-path $pwd '\capnproto-c++-win32-1.5.0\capnproto-tools-win32-1.5.0')"
|
|
57
|
+
rustup component add rust-src --toolchain nightly-msvc
|
|
58
|
+
cargo +nightly rustc --release -Z build-std=std,panic_abort --crate-type=staticlib
|
|
59
|
+
ls target/release
|
|
60
|
+
- name: Run tests
|
|
61
|
+
run: |
|
|
62
|
+
$env:Path = "$env:Path;$(join-path $pwd '\capnproto-c++-win32-1.5.0\capnproto-tools-win32-1.5.0')"
|
|
63
|
+
cargo test --verbose
|
|
64
|
+
- name: Rename
|
|
65
|
+
run: mv target/release/beaconcrypt.lib target/release/beaconcrypt-${{ matrix.os }}.lib
|
|
66
|
+
- name: Upload release artifact
|
|
67
|
+
uses: actions/upload-artifact@v7
|
|
68
|
+
with:
|
|
69
|
+
name: beaconcrypt-static-${{ matrix.os }}
|
|
70
|
+
path: target/release/beaconcrypt-${{ matrix.os }}.lib
|
|
71
|
+
retention-days: 7
|
|
72
|
+
|
|
73
|
+
release:
|
|
74
|
+
needs: [ubuntu-build, windows-build]
|
|
75
|
+
runs-on: ubuntu-latest
|
|
76
|
+
permissions:
|
|
77
|
+
contents: write
|
|
78
|
+
steps:
|
|
79
|
+
- uses: actions/checkout@v7
|
|
80
|
+
- name: Download release artifact
|
|
81
|
+
uses: actions/download-artifact@v8
|
|
82
|
+
with:
|
|
83
|
+
path: ./dist
|
|
84
|
+
merge-multiple: true
|
|
85
|
+
- name: Publish built binary to GitHub releases
|
|
86
|
+
run: |
|
|
87
|
+
gh release create ${{ github.ref_name }} --notes-from-tag ./dist/*
|
|
88
|
+
env:
|
|
89
|
+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
name: Rust
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [ "main" ]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [ "main" ]
|
|
8
|
+
|
|
9
|
+
env:
|
|
10
|
+
CARGO_TERM_COLOR: always
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
build:
|
|
14
|
+
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
|
|
17
|
+
steps:
|
|
18
|
+
- uses: actions/checkout@v7
|
|
19
|
+
- name: Install cap'n proto
|
|
20
|
+
run: sudo apt update && sudo apt install capnproto
|
|
21
|
+
- name: Build
|
|
22
|
+
run: cargo build --verbose
|
|
23
|
+
- name: Run tests
|
|
24
|
+
run: cargo test --verbose
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/target
|
|
2
|
+
|
|
3
|
+
# Byte-compiled / optimized / DLL files
|
|
4
|
+
__pycache__/
|
|
5
|
+
.pytest_cache/
|
|
6
|
+
*.py[cod]
|
|
7
|
+
|
|
8
|
+
# C extensions
|
|
9
|
+
*.so
|
|
10
|
+
|
|
11
|
+
# Distribution / packaging
|
|
12
|
+
.Python
|
|
13
|
+
.venv/
|
|
14
|
+
env/
|
|
15
|
+
bin/
|
|
16
|
+
build/
|
|
17
|
+
develop-eggs/
|
|
18
|
+
dist/
|
|
19
|
+
eggs/
|
|
20
|
+
lib/
|
|
21
|
+
lib64/
|
|
22
|
+
parts/
|
|
23
|
+
sdist/
|
|
24
|
+
var/
|
|
25
|
+
include/
|
|
26
|
+
man/
|
|
27
|
+
venv/
|
|
28
|
+
*.egg-info/
|
|
29
|
+
.installed.cfg
|
|
30
|
+
*.egg
|
|
31
|
+
|
|
32
|
+
# Installer logs
|
|
33
|
+
pip-log.txt
|
|
34
|
+
pip-delete-this-directory.txt
|
|
35
|
+
pip-selfcheck.json
|
|
36
|
+
|
|
37
|
+
# Unit test / coverage reports
|
|
38
|
+
htmlcov/
|
|
39
|
+
.tox/
|
|
40
|
+
.coverage
|
|
41
|
+
.cache
|
|
42
|
+
nosetests.xml
|
|
43
|
+
coverage.xml
|
|
44
|
+
|
|
45
|
+
# Translations
|
|
46
|
+
*.mo
|
|
47
|
+
|
|
48
|
+
# Mr Developer
|
|
49
|
+
.mr.developer.cfg
|
|
50
|
+
.project
|
|
51
|
+
.pydevproject
|
|
52
|
+
|
|
53
|
+
# Rope
|
|
54
|
+
.ropeproject
|
|
55
|
+
|
|
56
|
+
# Django stuff:
|
|
57
|
+
*.log
|
|
58
|
+
*.pot
|
|
59
|
+
|
|
60
|
+
.DS_Store
|
|
61
|
+
|
|
62
|
+
# Sphinx documentation
|
|
63
|
+
docs/_build/
|
|
64
|
+
|
|
65
|
+
# PyCharm
|
|
66
|
+
.idea/
|
|
67
|
+
|
|
68
|
+
# VSCode
|
|
69
|
+
.vscode/
|
|
70
|
+
|
|
71
|
+
# Pyenv
|
|
72
|
+
.python-version
|