ratchetkit 1.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.
- ratchetkit-1.2.0/.github/workflows/publish.yml +62 -0
- ratchetkit-1.2.0/.gitignore +15 -0
- ratchetkit-1.2.0/LICENSE +661 -0
- ratchetkit-1.2.0/PKG-INFO +268 -0
- ratchetkit-1.2.0/README.md +241 -0
- ratchetkit-1.2.0/example/README.md +58 -0
- ratchetkit-1.2.0/example/__init__.py +1 -0
- ratchetkit-1.2.0/example/client.py +123 -0
- ratchetkit-1.2.0/example/common.py +155 -0
- ratchetkit-1.2.0/example/run_demo.py +93 -0
- ratchetkit-1.2.0/example/server.py +137 -0
- ratchetkit-1.2.0/example/suite_config.py +39 -0
- ratchetkit-1.2.0/pyproject.toml +55 -0
- ratchetkit-1.2.0/ratchetkit/__init__.py +3 -0
- ratchetkit-1.2.0/ratchetkit/algorithms/__init__.py +1 -0
- ratchetkit-1.2.0/ratchetkit/algorithms/cipher/__init__.py +17 -0
- ratchetkit-1.2.0/ratchetkit/algorithms/cipher/aes128.py +15 -0
- ratchetkit-1.2.0/ratchetkit/algorithms/cipher/aes256.py +15 -0
- ratchetkit-1.2.0/ratchetkit/algorithms/cipher/base.py +65 -0
- ratchetkit-1.2.0/ratchetkit/algorithms/cipher/camellia128.py +18 -0
- ratchetkit-1.2.0/ratchetkit/algorithms/cipher/camellia256.py +18 -0
- ratchetkit-1.2.0/ratchetkit/algorithms/cipher/chacha20.py +17 -0
- ratchetkit-1.2.0/ratchetkit/algorithms/hash/__init__.py +17 -0
- ratchetkit-1.2.0/ratchetkit/algorithms/hash/base.py +30 -0
- ratchetkit-1.2.0/ratchetkit/algorithms/hash/blake2b.py +26 -0
- ratchetkit-1.2.0/ratchetkit/algorithms/hash/sha256.py +26 -0
- ratchetkit-1.2.0/ratchetkit/algorithms/hash/sha3256.py +26 -0
- ratchetkit-1.2.0/ratchetkit/algorithms/hash/sha384.py +26 -0
- ratchetkit-1.2.0/ratchetkit/algorithms/hash/sha512.py +26 -0
- ratchetkit-1.2.0/ratchetkit/algorithms/kem/__init__.py +12 -0
- ratchetkit-1.2.0/ratchetkit/algorithms/kem/base.py +63 -0
- ratchetkit-1.2.0/ratchetkit/algorithms/kem/ec_base.py +104 -0
- ratchetkit-1.2.0/ratchetkit/algorithms/kem/mlkem1024.py +15 -0
- ratchetkit-1.2.0/ratchetkit/algorithms/kem/mlkem768.py +15 -0
- ratchetkit-1.2.0/ratchetkit/algorithms/kem/mlkem_base.py +97 -0
- ratchetkit-1.2.0/ratchetkit/algorithms/kem/rsa2048.py +10 -0
- ratchetkit-1.2.0/ratchetkit/algorithms/kem/rsa4096.py +10 -0
- ratchetkit-1.2.0/ratchetkit/algorithms/kem/rsa_base.py +151 -0
- ratchetkit-1.2.0/ratchetkit/algorithms/kem/secp256r1.py +12 -0
- ratchetkit-1.2.0/ratchetkit/algorithms/kem/secp384r1.py +12 -0
- ratchetkit-1.2.0/ratchetkit/algorithms/kem/secp521r1.py +12 -0
- ratchetkit-1.2.0/ratchetkit/algorithms/kem/x25519.py +107 -0
- ratchetkit-1.2.0/ratchetkit/algorithms/kem/x448.py +107 -0
- ratchetkit-1.2.0/ratchetkit/errors.py +61 -0
- ratchetkit-1.2.0/ratchetkit/handshake/__init__.py +15 -0
- ratchetkit-1.2.0/ratchetkit/handshake/message.py +177 -0
- ratchetkit-1.2.0/ratchetkit/handshake/pqxdh.py +251 -0
- ratchetkit-1.2.0/ratchetkit/handshake/x3dh.py +301 -0
- ratchetkit-1.2.0/ratchetkit/kdf.py +70 -0
- ratchetkit-1.2.0/ratchetkit/keys/__init__.py +5 -0
- ratchetkit-1.2.0/ratchetkit/keys/chain.py +57 -0
- ratchetkit-1.2.0/ratchetkit/keys/identity.py +36 -0
- ratchetkit-1.2.0/ratchetkit/keys/keypair.py +98 -0
- ratchetkit-1.2.0/ratchetkit/keys/message.py +87 -0
- ratchetkit-1.2.0/ratchetkit/keys/prekey.py +372 -0
- ratchetkit-1.2.0/ratchetkit/keys/root.py +102 -0
- ratchetkit-1.2.0/ratchetkit/packing.py +154 -0
- ratchetkit-1.2.0/ratchetkit/py.typed +0 -0
- ratchetkit-1.2.0/ratchetkit/ratchet/__init__.py +22 -0
- ratchetkit-1.2.0/ratchetkit/ratchet/chains.py +68 -0
- ratchetkit-1.2.0/ratchetkit/ratchet/header.py +51 -0
- ratchetkit-1.2.0/ratchetkit/ratchet/limits.py +35 -0
- ratchetkit-1.2.0/ratchetkit/ratchet/message/__init__.py +11 -0
- ratchetkit-1.2.0/ratchetkit/ratchet/message/base.py +44 -0
- ratchetkit-1.2.0/ratchetkit/ratchet/message/double.py +65 -0
- ratchetkit-1.2.0/ratchetkit/ratchet/message/triple.py +91 -0
- ratchetkit-1.2.0/ratchetkit/ratchet/protocol/__init__.py +11 -0
- ratchetkit-1.2.0/ratchetkit/ratchet/protocol/base.py +49 -0
- ratchetkit-1.2.0/ratchetkit/ratchet/protocol/double.py +504 -0
- ratchetkit-1.2.0/ratchetkit/ratchet/protocol/triple.py +258 -0
- ratchetkit-1.2.0/ratchetkit/ratchet/skipped.py +123 -0
- ratchetkit-1.2.0/ratchetkit/ratchet/spqr.py +555 -0
- ratchetkit-1.2.0/ratchetkit/scka/__init__.py +18 -0
- ratchetkit-1.2.0/ratchetkit/scka/chunk.py +124 -0
- ratchetkit-1.2.0/ratchetkit/scka/kem_scka.py +410 -0
- ratchetkit-1.2.0/ratchetkit/session.py +235 -0
- ratchetkit-1.2.0/ratchetkit/suite/__init__.py +33 -0
- ratchetkit-1.2.0/ratchetkit/suite/algs.py +94 -0
- ratchetkit-1.2.0/ratchetkit/suite/double.py +135 -0
- ratchetkit-1.2.0/ratchetkit/suite/triple.py +118 -0
- ratchetkit-1.2.0/scripts/bench.py +247 -0
- ratchetkit-1.2.0/tests/cipher/test_aes256.py +18 -0
- ratchetkit-1.2.0/tests/hash/test_sha256.py +10 -0
- ratchetkit-1.2.0/tests/kem/test_mlkem1024.py +16 -0
- ratchetkit-1.2.0/tests/kem/test_mlkem768.py +16 -0
- ratchetkit-1.2.0/tests/kem/test_rsa2048.py +15 -0
- ratchetkit-1.2.0/tests/kem/test_x25519.py +15 -0
- ratchetkit-1.2.0/tests/test_adversarial.py +473 -0
- ratchetkit-1.2.0/tests/test_kdf.py +118 -0
- ratchetkit-1.2.0/tests/test_libsignal_parity.py +374 -0
- ratchetkit-1.2.0/tests/test_pqxdh.py +198 -0
- ratchetkit-1.2.0/tests/test_ratchet.py +66 -0
- ratchetkit-1.2.0/tests/test_scka.py +72 -0
- ratchetkit-1.2.0/tests/test_security.py +404 -0
- ratchetkit-1.2.0/tests/test_session.py +195 -0
- ratchetkit-1.2.0/tests/test_spqr.py +57 -0
- ratchetkit-1.2.0/tests/test_suites.py +115 -0
- ratchetkit-1.2.0/tests/test_triple.py +115 -0
- ratchetkit-1.2.0/tests/test_x3dh.py +57 -0
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
name: Publish to PyPI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- "v*"
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
build:
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
steps:
|
|
15
|
+
- uses: actions/checkout@v4
|
|
16
|
+
|
|
17
|
+
- uses: actions/setup-python@v5
|
|
18
|
+
with:
|
|
19
|
+
python-version: "3.12"
|
|
20
|
+
|
|
21
|
+
- name: Install build tools and package
|
|
22
|
+
run: |
|
|
23
|
+
python -m pip install --upgrade pip
|
|
24
|
+
python -m pip install build pytest
|
|
25
|
+
python -m pip install -e .
|
|
26
|
+
|
|
27
|
+
- name: Test
|
|
28
|
+
run: pytest
|
|
29
|
+
|
|
30
|
+
- name: Build
|
|
31
|
+
run: python -m build
|
|
32
|
+
|
|
33
|
+
- name: Check version matches tag
|
|
34
|
+
run: |
|
|
35
|
+
tag="${GITHUB_REF_NAME#v}"
|
|
36
|
+
pkg="$(python -c 'import tomllib; print(tomllib.load(open("pyproject.toml", "rb"))["project"]["version"])')"
|
|
37
|
+
init="$(python -c 'from ratchetkit import __version__; print(__version__)')"
|
|
38
|
+
echo "tag=$tag pyproject=$pkg __init__=$init"
|
|
39
|
+
test "$tag" = "$pkg"
|
|
40
|
+
test "$tag" = "$init"
|
|
41
|
+
|
|
42
|
+
- uses: actions/upload-artifact@v4
|
|
43
|
+
with:
|
|
44
|
+
name: dist
|
|
45
|
+
path: dist/
|
|
46
|
+
|
|
47
|
+
publish:
|
|
48
|
+
needs: build
|
|
49
|
+
runs-on: ubuntu-latest
|
|
50
|
+
environment:
|
|
51
|
+
name: pypi
|
|
52
|
+
url: https://pypi.org/p/ratchetkit
|
|
53
|
+
permissions:
|
|
54
|
+
id-token: write
|
|
55
|
+
steps:
|
|
56
|
+
- uses: actions/download-artifact@v4
|
|
57
|
+
with:
|
|
58
|
+
name: dist
|
|
59
|
+
path: dist/
|
|
60
|
+
|
|
61
|
+
- name: Publish package distributions to PyPI
|
|
62
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|