Abhrankan Chakrabarti
API docs ยท Releases ยท Chamber Report
Releases:
crypto-lab v0.8.0&website v0.10.0
Status: All 45 tests passing, zero Clippy/formatting warnings, pushed to GitHub and deployed to production.
The Chamber of Primes brings Pierre de Fermat's 1643 Difference of Squares factorization algorithm to life through a real-time, bidirectional WebSocket streaming visualizer wrapped in an Ancient Egyptian temple aesthetic.
By pairing the high-performance number-theoretic primitives of diffsquare with the async Axum backend in crypto-lab and the static showcase in website, the visualizer demonstrates:
๐จ ๐ ๐ญ ๐ผ ๐ข ๐ ๐บ).โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Browser Client (chamber.html) โ
โ Canvas Gnomon ยท Sieve Rune Grid ยท Cartouche Displays โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ โฒ Bidirectional WebSocket
โ โ (/v1/math/chamber/ws)
โผ โ (Automatic REST Fallback)
โโโโโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ crypto-lab (Axum 0.7) โ
โ src/fermat.rs โ
โโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโ
โ โ
โผ โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Legendre Sieve Engine โ โ Exact Integer Sqrt โ
โ (20 Primes: 3 โฆ 73) โ โ & Fermat Stepper โ
โโโโโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโโcrypto-lab v0.8.0)src/fermat.rs)p ∈ {3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73}
integer_sqrt, sqrt_ceil, sqrt_exact) operating on u128 without floating-point precision loss.rk+1 = rk + 2xk + 1
GET /v1/math/fermat & POST /v1/math/fermat):{ "n": "5959", "max_steps": 1000, "record_steps": true }
Returns non-trivial factor pair p, q, step count, microsecond timing, and step-by-step traces.
GET /v1/math/chamber/ws):
start (n, delay_ms, max_steps), pause, resume, step, speed (delay_ms), stop.start, step (with residue & sieve info), candidate, found, done.website v0.10.0)chamber.html: Dedicated showcase page featuring:
#090c10, #d4af37, #ffd700).assets/chamber.css: Responsive Egyptian styling, glowing sieve rune tiles, stone cartouche borders, and dark ambient atmosphere.assets/chamber.js:
wss:// with automated fallback to the REST simulation engine.๐จ ๐ ๐ญ ๐ผ ๐ข ๐ ๐บ).lab.html with a featured visualizer banner, added project cards to projects.html, and added navbar links across all pages (index.html, writing.html, now.html, API.html, RELEASES.html).API.md, API.html, RELEASES.md, and RELEASES.html.| Value | Unicode | Glyph | Ancient Name | Significance |
|---|---|---|---|---|
| 1 | U+133FA |
๐บ | Single stroke | A simple tally mark carved into stone |
| 10 | U+13386 |
๐ | Cattle hobble (medj) | An arch of woven cattle tether rope |
| 100 | U+13362 |
๐ข | Coil of rope (shet) | A coil of surveyor measuring rope |
| 1,000 | U+131BC |
๐ผ | Water lily (khaa) | A sacred lotus blooming in the Nile |
| 10,000 | U+130AD |
๐ญ | Pointing finger (djeba) | A bent finger pointing toward the heavens |
| 100,000 | U+13190 |
๐ | Tadpole (hefen) | A fertile frog emerging from Nile silt |
| 1,000,000 | U+13068 |
๐จ | God Heh (heh) | Kneeling deity with upraised arms supporting eternity |
On your EC2 server (ec2-user@ip-172-31-77-184), run the following commands in fish shell:
crypto-labcd ~/rust/crypto-lab
git pull
cargo build --release
sudo install -m 755 target/release/crypto-lab /usr/local/bin/crypto-lab
sudo systemctl restart crypto-lab
~/deploy.sh
In /etc/nginx/conf.d/abhrankan.conf, ensure the math proxy block forwards WebSocket upgrade headers:
location /crypto-api/v1/math/ {
proxy_pass http://127.0.0.1:8089/v1/math/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
(Note: If Nginx is not yet updated for WebSockets, assets/chamber.js automatically falls back to the REST simulation engine, ensuring 100% immediate availability.)
curl -sS "https://abhrankan.duckdns.org/crypto-api/v1/math/fermat?n=5959" | jq .
Expected output:
{
"ok": true,
"n": 5959,
"initial_x": 78,
"steps_count": 3,
"found": true,
"p": 59,
"q": 101,
"x": 80,
"y": 21,
"reason": "found"
}
curl -sS "https://abhrankan.duckdns.org/crypto-api/v1/math/fermat?n=10969629527" | jq .
Expected output:
{
"ok": true,
"n": 10969629527,
"initial_x": 104736,
"steps_count": 2,
"found": true,
"p": 104723,
"q": 104749,
"x": 104736,
"y": 13,
"reason": "found"
}
curl -sS https://abhrankan.duckdns.org/crypto-api/v1/info | jq '{version: .version, count: (.endpoints | length)}'
Expected output:
{
"version": "0.8.0",
"count": 56
}