CryptoSuite is a browser-based cryptography mathematics calculator for students. It covers modular arithmetic, prime number tools, group theory, number theory algorithms, hash functions, and classical cipher learning tools — all running locally in your browser (no server, no data sent anywhere).
Live demo: https://Spezeeal.github.io/CryptoSuite/
You do not need Node.js or npm install to use the app.
Open the live URL in any modern browser:
https://Spezeeal.github.io/CryptoSuite/
No download, no build, full feature support (including hash tools via HTTPS).
After cloning or downloading the ZIP:
For Windows users:
Simply double-click the run.bat file, or run it in your Command Prompt.
For Mac/Linux users:
Run the run.sh script in your terminal:
bash run.sh(Alternatively, you can manually open docs/index.html or open.html in your browser).
git clone https://github.com/Spezeeal/CryptoSuite.git
cd CryptoSuite
npm install
npm run devOpen http://localhost:5173.
| Cara | Langkah |
|---|---|
| 1 (paling mudah) | Buka link GitHub Pages di browser — tidak perlu unduh atau install |
| 2 (Windows) | Unduh ZIP repo → ekstrak → klik ganda (double-click) file run.bat, atau jalankan lewat Command Prompt |
| 3 (Mac/Linux) | Unduh ZIP repo → ekstrak → buka terminal → jalankan bash run.sh |
| 4 (Dev) | Untuk mengembangkan: npm install lalu npm run dev |
Catatan browser: Tab hash (SHA) membutuhkan HTTPS atau localhost. Jika membuka file:// langsung, beberapa browser membatasi Web Crypto — gunakan GitHub Pages atau jalankan server lokal singkat, misalnya npx serve docs.
- List all n-bit primes (n ≤ 20)
- Generate probable primes (Miller–Rabin)
- N-th prime (sieve)
- Trial division primality test
- Prime factorization
- Modular exponentiation (square-and-multiply)
- Modular inverse (extended Euclidean)
- Discrete log: brute force & baby-step giant-step
- GCD, modular multiplication
- Generators of Z*_p
- Order of an element
- Find one generator for large primes
- Extended Euclidean algorithm (with steps)
- Euler totient φ(n), Carmichael λ(n)
- Chinese Remainder Theorem
- Tonelli–Shanks modular square root
- Primitive root test
- Miller–Rabin, Pollard ρ
- Secure random BigInt, bitwise ops
- SHA-256, SHA-1 (Web Crypto API)
- Caesar, Affine, Vigenère, Hill (2×2)
- XOR repeating key, letter frequency & index of coincidence
- Hamming distance (hex)
- RSA toy keygen / encrypt / decrypt (small primes only)
- React 19 + TypeScript
- Vite 6
- Vitest for crypto unit tests
- GitHub Pages for hosting
| Command | Description |
|---|---|
npm run dev |
Development server |
npm run build |
GitHub Pages build → dist/ (base: /CryptoSuite/) |
npm run build:standalone |
Standalone build → docs/ (base: ./, for ZIP / file open) |
npm run build:all |
Both Pages and standalone builds |
npm run preview |
Preview Pages build |
npm run preview:standalone |
Preview standalone docs/ build |
npm test |
Run Vitest unit tests |
Refreshing docs/ after UI or code changes:
npm run build:standaloneThen commit the updated docs/ folder so download-from-GitHub users get the latest build.
- Create a repository named CryptoSuite on GitHub.
- Push this project to
main. - In repo Settings → Pages, set source to GitHub Actions.
- The workflow in
.github/workflows/deploy.ymldeploys on every push tomain.
Release tags also publish a standalone ZIP via .github/workflows/release-standalone.yml.
Some algorithms are intentionally capped to keep the UI responsive in the browser:
| Tool | Limit |
|---|---|
| N-bit prime list | n ≤ 20 |
| Brute-force discrete log | p ≲ 50,000 |
| RSA toy | primes ≤ 4 digits |
| N-th prime | n ≤ 100,000 |
src/
lib/crypto/ # Pure algorithm modules (testable)
components/ # UI: tabs, tools, layout
i18n/ # English / Indonesian strings
docs/ # Pre-built standalone app (open index.html)