puantum 1.0.0__tar.gz → 1.1.1__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-1.0.0 → puantum-1.1.1}/.gitignore +4 -1
- {puantum-1.0.0 → puantum-1.1.1}/PKG-INFO +6 -3
- puantum-1.1.1/examples/dsa.py +14 -0
- puantum-1.1.1/examples/kem.py +14 -0
- {puantum-1.0.0 → puantum-1.1.1}/pyproject.toml +9 -4
- puantum-1.1.1/readme.md +48 -0
- puantum-1.0.0/Makefile +0 -7
- puantum-1.0.0/examples/dsa.py +0 -23
- puantum-1.0.0/examples/kem.py +0 -21
- {puantum-1.0.0 → puantum-1.1.1}/Cargo.lock +0 -0
- {puantum-1.0.0 → puantum-1.1.1}/Cargo.toml +0 -0
- /puantum-1.0.0/readme.md → /puantum-1.1.1/README.md +0 -0
- /puantum-1.0.0/license → /puantum-1.1.1/license.md +0 -0
- {puantum-1.0.0 → puantum-1.1.1}/puantum/__init__.py +0 -0
- {puantum-1.0.0 → puantum-1.1.1}/puantum/classic/__init__.py +0 -0
- {puantum-1.0.0 → puantum-1.1.1}/puantum/quantum/__init__.py +0 -0
- {puantum-1.0.0 → puantum-1.1.1}/puantum/quantum/dsa/__init__.py +0 -0
- {puantum-1.0.0 → puantum-1.1.1}/puantum/quantum/dsa/__internal__.py +0 -0
- {puantum-1.0.0 → puantum-1.1.1}/puantum/quantum/kem/__init__.py +0 -0
- {puantum-1.0.0 → puantum-1.1.1}/puantum/quantum/kem/__internal__.py +0 -0
- {puantum-1.0.0 → puantum-1.1.1}/rust/cryptography/classic/mod.rs +0 -0
- {puantum-1.0.0 → puantum-1.1.1}/rust/cryptography/mod.rs +0 -0
- {puantum-1.0.0 → puantum-1.1.1}/rust/cryptography/quantum/binding.rs +0 -0
- {puantum-1.0.0 → puantum-1.1.1}/rust/cryptography/quantum/mod.rs +0 -0
- {puantum-1.0.0 → puantum-1.1.1}/rust/python.rs +0 -0
@@ -1,16 +1,19 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: puantum
|
3
|
-
Version: 1.
|
3
|
+
Version: 1.1.1
|
4
4
|
Classifier: Programming Language :: Python :: 3
|
5
5
|
Classifier: Programming Language :: Rust
|
6
6
|
Classifier: Operating System :: OS Independent
|
7
7
|
Classifier: License :: Public Domain
|
8
8
|
Classifier: License :: OSI Approved :: The Unlicense (Unlicense)
|
9
|
+
License-File: license.md
|
9
10
|
Summary: Python Cryptography
|
10
11
|
Keywords: python,cryptography,quantum,security
|
11
|
-
Author-email: Anonymous <
|
12
|
+
Author-email: Anonymous <217687495+1xfakebit@users.noreply.github.com>
|
12
13
|
License: Unlicense
|
13
|
-
Description-Content-Type: text/markdown
|
14
|
+
Description-Content-Type: text/markdown
|
15
|
+
Project-URL: source, https://github.com/1xfakebit/puantum
|
16
|
+
Project-URL: x, https://x.com/1xfakebit
|
14
17
|
|
15
18
|
# 🔐 Python Cryptography
|
16
19
|
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# IMPORT
|
2
|
+
from puantum.quantum.dsa import Algorithm, KeyPair
|
3
|
+
|
4
|
+
# MAIN
|
5
|
+
alicesk, alicepk = KeyPair(Algorithm.MLDSA.MLDSA87)
|
6
|
+
message = "Hello".encode()
|
7
|
+
|
8
|
+
signature = alicesk.sign(message=message)
|
9
|
+
valid = alicepk.verify(signature=signature, message=message)
|
10
|
+
|
11
|
+
assert valid, "Signature verification failed!"
|
12
|
+
|
13
|
+
print(f"Message: [{message.decode()}]")
|
14
|
+
print(f"Signature: [{signature.signature.hex()[:len(message)]}]")
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# IMPORT
|
2
|
+
from puantum.quantum.kem import Algorithm, KeyPair
|
3
|
+
|
4
|
+
# MAIN
|
5
|
+
alicesk, alicepk = KeyPair(Algorithm.MLKEM.MLKEM1024)
|
6
|
+
_bobsk, _bobpk = KeyPair(Algorithm.MLKEM.MLKEM1024)
|
7
|
+
|
8
|
+
bobss, bobct = alicepk.encapsulate()
|
9
|
+
alicess = alicesk.decapsulate(bobct)
|
10
|
+
|
11
|
+
assert alicess.sharedsecret == bobss.sharedsecret, "Shared secrets do not match!"
|
12
|
+
|
13
|
+
print(f"Alice's Shared Secret: [{alicess.sharedsecret.hex()}]")
|
14
|
+
print(f"Bob's Shared Secret: [{bobss.sharedsecret.hex()}]")
|
@@ -1,10 +1,11 @@
|
|
1
1
|
[project]
|
2
2
|
name = "puantum"
|
3
|
-
version = "1.
|
4
|
-
authors = [{
|
3
|
+
version = "1.1.1"
|
4
|
+
authors = [{name = "Anonymous", email = "217687495+1xfakebit@users.noreply.github.com"}]
|
5
5
|
description = "Python Cryptography"
|
6
|
-
readme = "readme.md"
|
7
|
-
license =
|
6
|
+
readme = {file = "readme.md", content-type = "text/markdown"}
|
7
|
+
license = "Unlicense"
|
8
|
+
license-files = ["license.md"]
|
8
9
|
keywords = ["python", "cryptography", "quantum", "security"]
|
9
10
|
|
10
11
|
classifiers = [
|
@@ -15,6 +16,10 @@ classifiers = [
|
|
15
16
|
"License :: OSI Approved :: The Unlicense (Unlicense)"
|
16
17
|
]
|
17
18
|
|
19
|
+
[project.urls]
|
20
|
+
source = "https://github.com/1xfakebit/puantum"
|
21
|
+
x = "https://x.com/1xfakebit"
|
22
|
+
|
18
23
|
[build-system]
|
19
24
|
requires = ["maturin>=1.0,<2.0"]
|
20
25
|
build-backend = "maturin"
|
puantum-1.1.1/readme.md
ADDED
@@ -0,0 +1,48 @@
|
|
1
|
+
# 🔐 Python Cryptography
|
2
|
+
|
3
|
+
A blazing-fast cryptography library for Python, built on Rust.
|
4
|
+
|
5
|
+
Puantum supports an extensive set of **post-quantum** key encapsulation mechanisms (KEM) and digital signature algorithms (DSA), and will soon support **classic cryptography** as well.
|
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
|
+
### 🚧 Coming Soon
|
35
|
+
- #### AES, ChaCha20, XChaCha20
|
36
|
+
- #### RSA, EC
|
37
|
+
- #### Argon2, Bcrypt
|
38
|
+
|
39
|
+
### 📦 Install
|
40
|
+
```shell
|
41
|
+
pip install puantum
|
42
|
+
```
|
43
|
+
#### or from source:
|
44
|
+
```shell
|
45
|
+
make python
|
46
|
+
```
|
47
|
+
|
48
|
+
### 🥳 Enjoy!
|
puantum-1.0.0/Makefile
DELETED
puantum-1.0.0/examples/dsa.py
DELETED
@@ -1,23 +0,0 @@
|
|
1
|
-
# IMPORT
|
2
|
-
from puantum.quantum.dsa import Algorithm, KeyPair
|
3
|
-
|
4
|
-
# MAIN
|
5
|
-
def main():
|
6
|
-
# Step 1: Generate a digital signature key pair for Alice
|
7
|
-
# - alicesk: Alice's private signing key
|
8
|
-
# - alicepk: Alice's public key (used for verification)
|
9
|
-
alicesk, alicepk = KeyPair(Algorithm.MLDSA.MLDSA87)
|
10
|
-
# Step 2: Define the message to be signed
|
11
|
-
msg = "Hello".encode() # Convert the string to bytes, as cryptographic functions work with bytes
|
12
|
-
# Step 3: Sign the message using Alice's private key
|
13
|
-
sig = alicesk.sign(msg)
|
14
|
-
# Step 4: Verify the signature using Alice's public key
|
15
|
-
valid = alicepk.verify(sig, msg)
|
16
|
-
# Step 5: Display the result
|
17
|
-
print(f"Message : {msg.decode()}")
|
18
|
-
print(f"Signature valid? : {valid}")
|
19
|
-
# Optional: raise an error if the signature fails (useful in tests)
|
20
|
-
assert valid, "Signature verification failed!"
|
21
|
-
|
22
|
-
if __name__ == "__main__":
|
23
|
-
main()
|
puantum-1.0.0/examples/kem.py
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
# IMPORT
|
2
|
-
from puantum.quantum.kem import Algorithm, KeyPair
|
3
|
-
|
4
|
-
# MAIN
|
5
|
-
def main():
|
6
|
-
# Generate Alice's KEM keypair (secret and public keys)
|
7
|
-
alicesk, alicepk = KeyPair(Algorithm.MLKEM.MLKEM1024)
|
8
|
-
# Generate Bob's KEM keypair (optional here unless Bob also receives messages)
|
9
|
-
_bobsk, _bobpk = KeyPair(Algorithm.MLKEM.MLKEM1024)
|
10
|
-
# Bob uses Alice's public key to encapsulate a shared secret and a ciphertext
|
11
|
-
bob_shared_secret, ciphertext = alicepk.encapsulate()
|
12
|
-
# Alice decapsulates the ciphertext from bob to derive the same shared secret
|
13
|
-
alice_shared_secret = alicesk.decapsulate(ciphertext)
|
14
|
-
# Print shared secrets in hex format
|
15
|
-
print(f"Alice's Shared Secret : [{alice_shared_secret.sharedsecret.hex()}]")
|
16
|
-
print(f"Bob's Shared Secret : [{bob_shared_secret.sharedsecret.hex()}]")
|
17
|
-
# Optional check
|
18
|
-
assert alice_shared_secret.sharedsecret == bob_shared_secret.sharedsecret, "Shared secrets do not match!"
|
19
|
-
|
20
|
-
if __name__ == "__main__":
|
21
|
-
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
|