puantum 1.0.1__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.
@@ -1,3 +1,5 @@
1
- Cargo.lock
2
- .env
1
+ # dir
3
2
  target/
3
+
4
+ # file
5
+ Cargo.lock
@@ -1,17 +1,19 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: puantum
3
- Version: 1.0.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 <no@thanks.com>
12
+ Author-email: Anonymous <217687495+1xfakebit@users.noreply.github.com>
12
13
  License: Unlicense
13
14
  Description-Content-Type: text/markdown
14
- Project-URL: Source, https://github.com/0xf4ck/puantum
15
+ Project-URL: source, https://github.com/1xfakebit/puantum
16
+ Project-URL: x, https://x.com/1xfakebit
15
17
 
16
18
  # 🔐 Python Cryptography
17
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,11 +1,11 @@
1
1
  [project]
2
2
  name = "puantum"
3
- version = "1.0.1"
4
- authors = [{ name = "Anonymous", email = "no@thanks.com" }]
3
+ version = "1.1.1"
4
+ authors = [{name = "Anonymous", email = "217687495+1xfakebit@users.noreply.github.com"}]
5
5
  description = "Python Cryptography"
6
6
  readme = {file = "readme.md", content-type = "text/markdown"}
7
7
  license = "Unlicense"
8
- license-files = ["license"]
8
+ license-files = ["license.md"]
9
9
  keywords = ["python", "cryptography", "quantum", "security"]
10
10
 
11
11
  classifiers = [
@@ -17,7 +17,8 @@ classifiers = [
17
17
  ]
18
18
 
19
19
  [project.urls]
20
- Source = "https://github.com/0xf4ck/puantum"
20
+ source = "https://github.com/1xfakebit/puantum"
21
+ x = "https://x.com/1xfakebit"
21
22
 
22
23
  [build-system]
23
24
  requires = ["maturin>=1.0,<2.0"]
@@ -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.1/Makefile DELETED
@@ -1,7 +0,0 @@
1
- # Makefile
2
- release:
3
- cargo clean
4
- cargo build --release
5
-
6
- python:
7
- maturin build --release
@@ -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()
@@ -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