beaconcrypt 0.3.7__tar.gz → 0.3.9__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.3.7 → beaconcrypt-0.3.9}/.github/workflows/go.yml +4 -3
- {beaconcrypt-0.3.7 → beaconcrypt-0.3.9}/.github/workflows/python.yml +17 -7
- {beaconcrypt-0.3.7 → beaconcrypt-0.3.9}/.github/workflows/release.yml +7 -1
- {beaconcrypt-0.3.7 → beaconcrypt-0.3.9}/.github/workflows/rust.yml +2 -0
- {beaconcrypt-0.3.7 → beaconcrypt-0.3.9}/Cargo.lock +3 -3
- {beaconcrypt-0.3.7 → beaconcrypt-0.3.9}/Cargo.toml +1 -1
- {beaconcrypt-0.3.7 → beaconcrypt-0.3.9}/PKG-INFO +1 -1
- beaconcrypt-0.3.9/beaconcrypt.pyi +33 -0
- {beaconcrypt-0.3.7 → beaconcrypt-0.3.9}/pyproject.toml +1 -0
- beaconcrypt-0.3.9/scripts/generate_python_stubs.py +48 -0
- {beaconcrypt-0.3.7 → beaconcrypt-0.3.9}/.cargo/config.toml +0 -0
- {beaconcrypt-0.3.7 → beaconcrypt-0.3.9}/.github/workflows/codeql.yml +0 -0
- {beaconcrypt-0.3.7 → beaconcrypt-0.3.9}/.gitignore +0 -0
- {beaconcrypt-0.3.7 → beaconcrypt-0.3.9}/LICENSE +0 -0
- {beaconcrypt-0.3.7 → beaconcrypt-0.3.9}/README.md +0 -0
- {beaconcrypt-0.3.7 → beaconcrypt-0.3.9}/beaconcrypt.go +0 -0
- {beaconcrypt-0.3.7 → beaconcrypt-0.3.9}/beaconcrypt_test.go +0 -0
- {beaconcrypt-0.3.7 → beaconcrypt-0.3.9}/bindings.h +0 -0
- {beaconcrypt-0.3.7 → beaconcrypt-0.3.9}/build.rs +0 -0
- {beaconcrypt-0.3.7 → beaconcrypt-0.3.9}/clippy.toml +0 -0
- {beaconcrypt-0.3.7 → beaconcrypt-0.3.9}/doc/protocol.md +0 -0
- {beaconcrypt-0.3.7 → beaconcrypt-0.3.9}/doc/rationale.md +0 -0
- {beaconcrypt-0.3.7 → beaconcrypt-0.3.9}/doc/threat_model.md +0 -0
- {beaconcrypt-0.3.7 → beaconcrypt-0.3.9}/go.mod +0 -0
- {beaconcrypt-0.3.7 → beaconcrypt-0.3.9}/rustfmt.toml +0 -0
- {beaconcrypt-0.3.7 → beaconcrypt-0.3.9}/src/beacon.rs +0 -0
- {beaconcrypt-0.3.7 → beaconcrypt-0.3.9}/src/cnsa2.rs +0 -0
- {beaconcrypt-0.3.7 → beaconcrypt-0.3.9}/src/error.rs +0 -0
- {beaconcrypt-0.3.7 → beaconcrypt-0.3.9}/src/lib.rs +0 -0
- {beaconcrypt-0.3.7 → beaconcrypt-0.3.9}/src/pqxdh.rs +0 -0
- {beaconcrypt-0.3.7 → beaconcrypt-0.3.9}/src/schema/cryptoframe.capnp +0 -0
- {beaconcrypt-0.3.7 → beaconcrypt-0.3.9}/src/schema/phase1.capnp +0 -0
- {beaconcrypt-0.3.7 → beaconcrypt-0.3.9}/src/schema/phase2.capnp +0 -0
- {beaconcrypt-0.3.7 → beaconcrypt-0.3.9}/src/schema/protogram.capnp +0 -0
- {beaconcrypt-0.3.7 → beaconcrypt-0.3.9}/src/server.rs +0 -0
- {beaconcrypt-0.3.7 → beaconcrypt-0.3.9}/src/shared.rs +0 -0
- {beaconcrypt-0.3.7 → beaconcrypt-0.3.9}/tests/beacon.rs +0 -0
- {beaconcrypt-0.3.7 → beaconcrypt-0.3.9}/tests/protocol.rs +0 -0
- {beaconcrypt-0.3.7 → beaconcrypt-0.3.9}/tests/server.rs +0 -0
- {beaconcrypt-0.3.7 → beaconcrypt-0.3.9}/tests/test_encryption.py +0 -0
- {beaconcrypt-0.3.7 → beaconcrypt-0.3.9}/tests/test_registration.py +0 -0
- {beaconcrypt-0.3.7 → beaconcrypt-0.3.9}/uv.lock +0 -0
|
@@ -5,7 +5,7 @@ on:
|
|
|
5
5
|
branches:
|
|
6
6
|
- main
|
|
7
7
|
tags:
|
|
8
|
-
- "[0-9]*.[0-9]*.[0-9]*"
|
|
8
|
+
- "v[0-9]*.[0-9]*.[0-9]*"
|
|
9
9
|
|
|
10
10
|
permissions:
|
|
11
11
|
contents: read
|
|
@@ -19,6 +19,8 @@ jobs:
|
|
|
19
19
|
test:
|
|
20
20
|
name: Test Go module on ${{ matrix.os }}
|
|
21
21
|
runs-on: ${{ matrix.os }}
|
|
22
|
+
permissions:
|
|
23
|
+
contents: read
|
|
22
24
|
strategy:
|
|
23
25
|
fail-fast: false
|
|
24
26
|
matrix:
|
|
@@ -105,8 +107,7 @@ jobs:
|
|
|
105
107
|
- name: Publish module to Go proxy
|
|
106
108
|
run: |
|
|
107
109
|
module_path="$(go list -m)"
|
|
108
|
-
|
|
109
|
-
go_version="v${version}"
|
|
110
|
+
go_version="${GITHUB_REF_NAME}"
|
|
110
111
|
|
|
111
112
|
git fetch origin "refs/tags/${go_version}:refs/tags/${go_version}" || true
|
|
112
113
|
if ! git rev-parse --verify --quiet "refs/tags/${go_version}" >/dev/null; then
|
|
@@ -13,7 +13,7 @@ on:
|
|
|
13
13
|
branches:
|
|
14
14
|
- main
|
|
15
15
|
tags:
|
|
16
|
-
- "[0-9]*.[0-9]*.[0-9]*"
|
|
16
|
+
- "v[0-9]*.[0-9]*.[0-9]*"
|
|
17
17
|
|
|
18
18
|
permissions:
|
|
19
19
|
contents: read
|
|
@@ -21,6 +21,8 @@ permissions:
|
|
|
21
21
|
jobs:
|
|
22
22
|
test:
|
|
23
23
|
runs-on: ubuntu-latest
|
|
24
|
+
permissions:
|
|
25
|
+
contents: read
|
|
24
26
|
|
|
25
27
|
steps:
|
|
26
28
|
- uses: actions/checkout@v7
|
|
@@ -38,10 +40,15 @@ jobs:
|
|
|
38
40
|
uv run maturin develop --uv
|
|
39
41
|
uv run pytest tests
|
|
40
42
|
|
|
43
|
+
- name: Generate Python stubs
|
|
44
|
+
run: uv run python scripts/generate_python_stubs.py
|
|
45
|
+
|
|
41
46
|
sdist:
|
|
42
47
|
if: startsWith(github.ref, 'refs/tags/')
|
|
43
48
|
needs: test
|
|
44
49
|
runs-on: ubuntu-latest
|
|
50
|
+
permissions:
|
|
51
|
+
deployments: read
|
|
45
52
|
|
|
46
53
|
steps:
|
|
47
54
|
- uses: actions/checkout@v7
|
|
@@ -54,11 +61,14 @@ jobs:
|
|
|
54
61
|
run: |
|
|
55
62
|
sudo apt install capnproto
|
|
56
63
|
|
|
64
|
+
- name: Generate Python stubs
|
|
65
|
+
run: uv run python scripts/generate_python_stubs.py
|
|
66
|
+
|
|
57
67
|
- name: Build source distribution
|
|
58
|
-
run:
|
|
68
|
+
run: uv run maturin sdist --out dist
|
|
59
69
|
|
|
60
70
|
- name: Upload source distribution
|
|
61
|
-
uses: actions/upload-artifact@
|
|
71
|
+
uses: actions/upload-artifact@v7
|
|
62
72
|
with:
|
|
63
73
|
name: release-sdist
|
|
64
74
|
path: dist/
|
|
@@ -68,6 +78,8 @@ jobs:
|
|
|
68
78
|
needs: test
|
|
69
79
|
name: Build wheels on ${{ matrix.os }}
|
|
70
80
|
runs-on: ${{ matrix.os }}
|
|
81
|
+
permissions:
|
|
82
|
+
deployments: read
|
|
71
83
|
strategy:
|
|
72
84
|
fail-fast: false
|
|
73
85
|
matrix:
|
|
@@ -88,7 +100,7 @@ jobs:
|
|
|
88
100
|
output-dir: dist/
|
|
89
101
|
|
|
90
102
|
- name: Upload wheels
|
|
91
|
-
uses: actions/upload-artifact@
|
|
103
|
+
uses: actions/upload-artifact@v7
|
|
92
104
|
with:
|
|
93
105
|
name: release-wheels-${{ matrix.os }}
|
|
94
106
|
path: dist/
|
|
@@ -107,9 +119,7 @@ jobs:
|
|
|
107
119
|
# For more information, see: https://docs.github.com/en/actions/deployment/targeting-different-environments/using-environments-for-deployment#deployment-protection-rules
|
|
108
120
|
environment:
|
|
109
121
|
name: pypi
|
|
110
|
-
|
|
111
|
-
# url: https://pypi.org/p/YOURPROJECT
|
|
112
|
-
url: https://pypi.org/project/beaconcrypt/${{ github.ref_name }}
|
|
122
|
+
url: https://pypi.org/project/beaconcrypt/
|
|
113
123
|
|
|
114
124
|
steps:
|
|
115
125
|
- name: Retrieve release distributions
|
|
@@ -3,7 +3,7 @@ name: Release
|
|
|
3
3
|
on:
|
|
4
4
|
push:
|
|
5
5
|
tags:
|
|
6
|
-
- "[0-9]*.[0-9]*.[0-9]*"
|
|
6
|
+
- "v[0-9]*.[0-9]*.[0-9]*"
|
|
7
7
|
|
|
8
8
|
env:
|
|
9
9
|
CARGO_TERM_COLOR: always
|
|
@@ -14,6 +14,8 @@ jobs:
|
|
|
14
14
|
matrix:
|
|
15
15
|
os: [ubuntu-latest, ubuntu-24.04-arm]
|
|
16
16
|
runs-on: ${{ matrix.os }}
|
|
17
|
+
permissions:
|
|
18
|
+
contents: read
|
|
17
19
|
|
|
18
20
|
steps:
|
|
19
21
|
- uses: actions/checkout@v7
|
|
@@ -45,6 +47,8 @@ jobs:
|
|
|
45
47
|
matrix:
|
|
46
48
|
os: [windows-latest]
|
|
47
49
|
runs-on: ${{ matrix.os }}
|
|
50
|
+
permissions:
|
|
51
|
+
contents: read
|
|
48
52
|
|
|
49
53
|
steps:
|
|
50
54
|
- uses: actions/checkout@v7
|
|
@@ -73,6 +77,8 @@ jobs:
|
|
|
73
77
|
|
|
74
78
|
windows-mingw-build:
|
|
75
79
|
runs-on: windows-latest
|
|
80
|
+
permissions:
|
|
81
|
+
contents: read
|
|
76
82
|
|
|
77
83
|
steps:
|
|
78
84
|
- uses: actions/checkout@v7
|
|
@@ -84,7 +84,7 @@ checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6"
|
|
|
84
84
|
|
|
85
85
|
[[package]]
|
|
86
86
|
name = "beaconcrypt"
|
|
87
|
-
version = "0.3.
|
|
87
|
+
version = "0.3.9"
|
|
88
88
|
dependencies = [
|
|
89
89
|
"capnp",
|
|
90
90
|
"capnpc",
|
|
@@ -769,9 +769,9 @@ checksum = "19f132c84eca552bf34cab8ec81f1c1dcc229b811638f9d283dceabe58c5569e"
|
|
|
769
769
|
|
|
770
770
|
[[package]]
|
|
771
771
|
name = "portable-atomic"
|
|
772
|
-
version = "1.
|
|
772
|
+
version = "1.14.0"
|
|
773
773
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
774
|
-
checksum = "
|
|
774
|
+
checksum = "3d20d5497ef88037a52ff98267d066e7f11fcc5e99bbfbd58a42336193aacec3"
|
|
775
775
|
|
|
776
776
|
[[package]]
|
|
777
777
|
name = "proc-macro-error-attr2"
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
from collections.abc import Sequence
|
|
2
|
+
from typing import final
|
|
3
|
+
|
|
4
|
+
@final
|
|
5
|
+
class BeaconCryptBeacon:
|
|
6
|
+
def __new__(cls, /, server_kid: int, server_id_pk: bytes) -> BeaconCryptBeacon: ...
|
|
7
|
+
def decrypt_server_message(self, /, data: Sequence[int]) -> bytes |None: ...
|
|
8
|
+
def decrypt_server_message_signed(self, /, data: Sequence[int]) -> bytes |None: ...
|
|
9
|
+
def encrypt_message_to_server(self, /, data: Sequence[int]) -> bytes |None: ...
|
|
10
|
+
def encrypt_to_server_signed(self, /, data: Sequence[int]) -> bytes |None: ...
|
|
11
|
+
def generate_registration(self, /) -> bytes |None:
|
|
12
|
+
"""
|
|
13
|
+
Begin the beacon registration process. The output buffer should be sent as-is over the network.
|
|
14
|
+
"""
|
|
15
|
+
def process_initial_message(self, /, data: Sequence[int]) -> bytes |None:
|
|
16
|
+
"""
|
|
17
|
+
Process the registration response and optional initial data. The raw buffer sent by the server must be passed as-is as `data`. The response contains the contents of the initial message, or nothing if there was none. Once this function returns, the beacon is registered
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
@final
|
|
21
|
+
class BeaconCryptServer:
|
|
22
|
+
def __new__(cls, /, kid: int, id_seed: bytes |None) -> BeaconCryptServer: ...
|
|
23
|
+
def decrypt_beacon_message(self, /, data: Sequence[int], kid: int) -> bytes |None: ...
|
|
24
|
+
def decrypt_beacon_message_signed(self, /, data: Sequence[int]) -> bytes |None: ...
|
|
25
|
+
def encrypt_to_beacon(self, /, data: Sequence[int], kid: int) -> bytes |None: ...
|
|
26
|
+
def encrypt_to_beacon_signed(self, /, data: Sequence[int], kid: int) -> bytes |None: ...
|
|
27
|
+
def id_pk(self, /) -> bytes: ...
|
|
28
|
+
def register_beacon(self, /, reg_buffer: bytes, initial_message: bytes |None) -> RegResponse |None: ...
|
|
29
|
+
|
|
30
|
+
@final
|
|
31
|
+
class RegResponse:
|
|
32
|
+
def key_id(self, /) -> int: ...
|
|
33
|
+
def serialized(self, /) -> bytes: ...
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""Generate Python stubs for the PyO3 extension."""
|
|
3
|
+
|
|
4
|
+
from __future__ import annotations
|
|
5
|
+
|
|
6
|
+
import shutil
|
|
7
|
+
import subprocess
|
|
8
|
+
import sys
|
|
9
|
+
from pathlib import Path
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
ROOT = Path(__file__).resolve().parents[1]
|
|
13
|
+
STUB_NAME = "beaconcrypt.pyi"
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def main() -> int:
|
|
17
|
+
maturin = shutil.which("maturin")
|
|
18
|
+
if maturin is None:
|
|
19
|
+
print("maturin was not found on PATH", file=sys.stderr)
|
|
20
|
+
return 1
|
|
21
|
+
|
|
22
|
+
out_dir = ROOT / "target" / "generated-stubs"
|
|
23
|
+
out_dir.mkdir(parents=True, exist_ok=True)
|
|
24
|
+
subprocess.run(
|
|
25
|
+
[
|
|
26
|
+
maturin,
|
|
27
|
+
"generate-stubs",
|
|
28
|
+
"--features",
|
|
29
|
+
"pybinds",
|
|
30
|
+
"--out",
|
|
31
|
+
str(out_dir),
|
|
32
|
+
],
|
|
33
|
+
cwd=ROOT,
|
|
34
|
+
check=True,
|
|
35
|
+
)
|
|
36
|
+
|
|
37
|
+
generated = out_dir / STUB_NAME
|
|
38
|
+
if not generated.is_file():
|
|
39
|
+
print(f"expected stub was not generated: {generated}", file=sys.stderr)
|
|
40
|
+
return 1
|
|
41
|
+
|
|
42
|
+
shutil.copyfile(generated, ROOT / STUB_NAME)
|
|
43
|
+
|
|
44
|
+
return 0
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
if __name__ == "__main__":
|
|
48
|
+
raise SystemExit(main())
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|