puantum 3.3.3__tar.gz → 9.9.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.
- {puantum-3.3.3 → puantum-9.9.9}/.github/workflows/publish.yml +7 -3
- {puantum-3.3.3 → puantum-9.9.9}/PKG-INFO +1 -1
- {puantum-3.3.3 → puantum-9.9.9}/pyproject.toml +1 -1
- puantum-9.9.9/readme.md +82 -0
- {puantum-3.3.3 → puantum-9.9.9}/.gitignore +0 -0
- {puantum-3.3.3 → puantum-9.9.9}/Cargo.lock +0 -0
- {puantum-3.3.3 → puantum-9.9.9}/Cargo.toml +0 -0
- {puantum-3.3.3 → puantum-9.9.9}/Makefile +0 -0
- /puantum-3.3.3/readme.md → /puantum-9.9.9/README.md +0 -0
- {puantum-3.3.3 → puantum-9.9.9}/license.md +0 -0
- {puantum-3.3.3 → puantum-9.9.9}/puantum/__init__.py +0 -0
- {puantum-3.3.3 → puantum-9.9.9}/puantum/__init__.pyi +0 -0
- {puantum-3.3.3 → puantum-9.9.9}/puantum/classic/__init__.py +0 -0
- {puantum-3.3.3 → puantum-9.9.9}/puantum/classic/__init__.pyi +0 -0
- {puantum-3.3.3 → puantum-9.9.9}/puantum/quantum/__init__.py +0 -0
- {puantum-3.3.3 → puantum-9.9.9}/puantum/quantum/__init__.pyi +0 -0
- {puantum-3.3.3 → puantum-9.9.9}/puantum/quantum/dsa/__init__.py +0 -0
- {puantum-3.3.3 → puantum-9.9.9}/puantum/quantum/dsa/__init__.pyi +0 -0
- {puantum-3.3.3 → puantum-9.9.9}/puantum/quantum/dsa/__internal__.py +0 -0
- {puantum-3.3.3 → puantum-9.9.9}/puantum/quantum/dsa/__internal__.pyi +0 -0
- {puantum-3.3.3 → puantum-9.9.9}/puantum/quantum/kem/__init__.py +0 -0
- {puantum-3.3.3 → puantum-9.9.9}/puantum/quantum/kem/__init__.pyi +0 -0
- {puantum-3.3.3 → puantum-9.9.9}/puantum/quantum/kem/__internal__.py +0 -0
- {puantum-3.3.3 → puantum-9.9.9}/puantum/quantum/kem/__internal__.pyi +0 -0
- {puantum-3.3.3 → puantum-9.9.9}/rust/cryptography/classic/mod.rs +0 -0
- {puantum-3.3.3 → puantum-9.9.9}/rust/cryptography/mod.rs +0 -0
- {puantum-3.3.3 → puantum-9.9.9}/rust/cryptography/quantum/binding.rs +0 -0
- {puantum-3.3.3 → puantum-9.9.9}/rust/cryptography/quantum/mod.rs +0 -0
- {puantum-3.3.3 → puantum-9.9.9}/rust/python.rs +0 -0
@@ -3,11 +3,15 @@ name: Build and Publish to PyPI
|
|
3
3
|
on:
|
4
4
|
push:
|
5
5
|
branches:
|
6
|
-
- main
|
6
|
+
- main
|
7
7
|
|
8
8
|
jobs:
|
9
9
|
build-and-publish:
|
10
|
-
runs-on:
|
10
|
+
runs-on: ${{ matrix.os }}
|
11
|
+
strategy:
|
12
|
+
matrix:
|
13
|
+
os: [ubuntu-latest, macos-latest, windows-latest]
|
14
|
+
python-version: ['3.10', '3.11', '3.12', '3.13']
|
11
15
|
|
12
16
|
steps:
|
13
17
|
- name: Checkout repository
|
@@ -16,7 +20,7 @@ jobs:
|
|
16
20
|
- name: Set up Python
|
17
21
|
uses: actions/setup-python@v5
|
18
22
|
with:
|
19
|
-
python-version:
|
23
|
+
python-version: ${{ matrix.python-version }}
|
20
24
|
|
21
25
|
- name: Install Rust
|
22
26
|
uses: dtolnay/rust-toolchain@stable
|
puantum-9.9.9/readme.md
ADDED
@@ -0,0 +1,82 @@
|
|
1
|
+
# 🔐 Python Cryptography
|
2
|
+
|
3
|
+
A blazing-fast cryptography library for Python, built on Rust.
|
4
|
+
|
5
|
+
Pryptography supports an extensive set of **post-quantum** digital signature algorithms (DSA) and key encapsulation mechanisms (KEM).
|
6
|
+
|
7
|
+
---
|
8
|
+
## ⚡ Features
|
9
|
+
- ✅ Dozens of NIST PQC candidates
|
10
|
+
- 🦀 Rust core for speed and safety
|
11
|
+
- 📦 Easy installation via [`pip`](https://pip.pypa.io)
|
12
|
+
---
|
13
|
+
|
14
|
+
### 🧬 Supported Algorithms
|
15
|
+
|
16
|
+
### 🛡️ KEM
|
17
|
+
- #### Bike
|
18
|
+
- #### ClassicMcEliece
|
19
|
+
- #### Hqc
|
20
|
+
- #### Kyber
|
21
|
+
- #### MLKEM
|
22
|
+
- #### NtruPrime
|
23
|
+
- #### FrodoKem
|
24
|
+
|
25
|
+
### ✍️ DSA
|
26
|
+
- #### Cross
|
27
|
+
- #### Dilithium
|
28
|
+
- #### Falcon
|
29
|
+
- #### Mayo
|
30
|
+
- #### MLDSA
|
31
|
+
- #### Sphincs
|
32
|
+
- #### Uov
|
33
|
+
|
34
|
+
### ❔ Examples
|
35
|
+
|
36
|
+
#### DSA Example
|
37
|
+
```python
|
38
|
+
# IMPORT
|
39
|
+
from puantum.quantum.dsa import Algorithm, KeyPair
|
40
|
+
|
41
|
+
# MAIN
|
42
|
+
alicesk, alicepk = KeyPair(Algorithm.MLDSA.MLDSA87)
|
43
|
+
message = "Hello".encode()
|
44
|
+
|
45
|
+
signature = alicesk.sign(message=message)
|
46
|
+
valid = alicepk.verify(signature=signature, message=message)
|
47
|
+
|
48
|
+
assert valid, "Signature verification failed!"
|
49
|
+
|
50
|
+
print(f"Message: [{message.decode()}]")
|
51
|
+
print(f"Signature: [{signature.hex()[:len(message)]}]")
|
52
|
+
```
|
53
|
+
|
54
|
+
#### KEM Example
|
55
|
+
```python
|
56
|
+
# IMPORT
|
57
|
+
from puantum.quantum.kem import Algorithm, KeyPair
|
58
|
+
|
59
|
+
# MAIN
|
60
|
+
alicesk, alicepk = KeyPair(Algorithm.MLKEM.MLKEM1024)
|
61
|
+
_bobsk, _bobpk = KeyPair(Algorithm.MLKEM.MLKEM1024)
|
62
|
+
|
63
|
+
bobss, bobct = alicepk.encapsulate()
|
64
|
+
alicess = alicesk.decapsulate(bobct)
|
65
|
+
|
66
|
+
assert alicess == bobss, "Shared secrets do not match!"
|
67
|
+
|
68
|
+
print(f"Alice's Shared Secret: [{alicess.hex()}]")
|
69
|
+
print(f"Bob's Shared Secret: [{bobss.hex()}]")
|
70
|
+
```
|
71
|
+
|
72
|
+
### 📦 Install
|
73
|
+
```shell
|
74
|
+
pip install puantum
|
75
|
+
```
|
76
|
+
|
77
|
+
#### or from source:
|
78
|
+
```shell
|
79
|
+
make python
|
80
|
+
```
|
81
|
+
|
82
|
+
### 🥳 Enjoy!
|
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
|