-
Notifications
You must be signed in to change notification settings - Fork 0
Project_Overview
This library implements all core mathematical primitives and high-level APIs for LAI (Lemniscate-AGM Isogeny):
-
Hash-Based Seed Function
$$ H(x, y, s) = \mathrm{SHA256}\bigl(\text{bytes}(x),|,\text{bytes}(y),|,\text{bytes}(s)\bigr) \bmod p $$ -
Modular Square Root via Tonelli–Shanks (with a fast branch if (p \equiv 3 \pmod 4)).
-
LAI Transformation
where
-
Binary Exponentiation of
$$(T)$$ to compute$$(T^k(P_0))$$ in$$(O(\log k))$$ time. -
Key Generation, Encryption, and Decryption routines for integer messages
$$(0 \le m < p)$$ . - Bulk JSON Decryption: decrypt an entire JSON payload into raw bytes (e.g., to reconstruct a file or UTF-8 text).
All language-specific wrappers expose identical API semantics under the hood. This makes pqcrypto ideal for cross-platform experiments, research, and educational purposes.
-
Low-Level Primitives
-
H(x, y, s): hash-based seed -
sqrt_mod(a, p): modular square root (Tonelli–Shanks) -
T(point, s, a, p): one LAI transform step
-
-
Binary Exponentiation
Implements exponentiation by squaring for repeated application of$$(T)$$ . -
High-Level API
-
keygen(p, a, P0)→(k, Q) -
encrypt(m, Q, k, p, a, P0)→(C1, C2, r) -
decrypt(C1, C2, k, r, a, p)→m -
decryptAll(jsonPayload)→byte[]
-
© 2025 pqcrypto. Maintained by the pqcrypto team.
- GitHub Repository
- Readme source:
README.md - If you have questions or suggestions, please open an issue or pull request on the repository.