Abhrankan Chakrabarti
Number Theory Explorer & Sharing Suite, Elliptic Curve Point Addition, Continued Fractions, and Typography Integrity.
/lab.html):
#nt-explorer-form): Consolidates the number-theory tools into a single comprehensive, parallelized analysis dashboard. Analyzes any integer 1 ≤ n ≤ 1,000,000 to report:
?explore=<n>.history.pushState for exploratory lookups and replaceState for URL initialization or back/forward normalization) and syncs with browser navigation (popstate).#copy-nt-link): Copies canonical exploration permalinks directly to the clipboard with button-label feedback.#copy-nt-results): Formats a clean, structured mathematical plain-text report of the complete analysis featuring Unicode superscripts and compact divisor formatting.#ecadd-form) in the Crypto & Number Theory section:
toy193, toy97) with point at infinity 𝒪 handling and coordinate validation.#cf-form) in the Crypto & Number Theory section:
text-transform: uppercase from .nt-card-title, .lab-eyebrow, and .lab-kicker in assets/lab-api.css, preventing Greek letters (φ, π, μ, τ, σ, ρ) from being capitalized and resolving the Pollard's ρ algorithm label collision ("POLLARD'S P ALGORITHM").projects.html, now.html, and README.md.Shanks's Square Forms Factorization (SQUFOF) Suite, crypto-lab v0.14.0 & foxmath v0.20.0.
crypto-lab v0.14.0 (expanded registry to 70 endpoints):
GET, POST /crypto-api/v1/math/squfof: unconditionally deterministic O(n1/4) integer factorization operating in the infrastructure of binary quadratic forms of discriminant D = kn. Uses 16 square-free multipliers, Cycle 1 continued fraction reductions with even-step square form detection Qi = r2, and Cycle 2 square root form descent to ambiguous forms P0 = P1 extracting non-trivial factors gcd(n, P1)./v1/math/challenge) with topic squfof (now 17 topics).foxmath v0.20.0:
squfof_factor(n, max_steps) matching crypto-lab binary quadratic form infrastructure reductions.foxmath squfof and standalone symlink foxmath-squfof.squfof and all 379 unit/CLI tests passing./lab.html):
#crypto-squfof-form) with reduction step controls, cycle breakdown telemetry, and one-click presets (84923, 1042387, 1393429, 2211749, 1074200609).squfof option to the Challenge generator dropdown.projects.html, API.md, API.html, now.html, and README.md.Quadratic Sieve (QS) Integer Factorization Suite, crypto-lab v0.13.0 & foxmath v0.19.0.
crypto-lab v0.13.0 (expanded registry to 68 endpoints):
GET, POST /crypto-api/v1/math/qs: sub-exponential integer factorization using polynomial sieving over array interval [−M, M] with Q(x) = (x + ⌊√n⌋)2 − n and factor base F = {-1, 2} ∪ {p ≤ B | (n/p) = 1}. Employs Tonelli-Shanks modular square roots to initialize sieve offsets, logarithmic subtraction for smooth candidate selection, and null-space linear algebra over GF(2) via Gaussian elimination to yield congruent squares X2 ≡ Y2 (mod n) and non-trivial factors gcd(|X − Y|, n)./v1/math/challenge) with topic qs (now 16 topics).foxmath v0.19.0:
qs_factor(n, b, m) matching crypto-lab polynomial logarithmic sieving and GF(2) Gaussian elimination.foxmath qs and standalone symlink foxmath-qs.qs and all 367 unit/CLI tests passing./lab.html):
#crypto-qs-form) with sieve radius control, congruence output, factor base telemetry, and one-click presets (84923, 1042387, 1393429, 1074200609).qs option to the Challenge generator dropdown.projects.html, API.md, API.html, now.html, and README.md.Dixon's Random Squares Integer Factorization Suite, crypto-lab v0.12.0 & foxmath v0.18.0.
crypto-lab v0.12.0 (expanded registry to 66 endpoints):
GET, POST /crypto-api/v1/math/dixon: sub-exponential integer factorization using quadratic residues over a prime factor base F = {-1, 2} ∪ {p ≤ B | (n/p) = 1}. Identifies B-smooth centered residues r ≡ x2 (mod n) and computes linear dependencies via Gaussian elimination over GF(2) to construct congruent squares X2 ≡ Y2 (mod n) and extract non-trivial factors gcd(|X − Y|, n)./v1/math/challenge) with topic dixon (now 15 topics).foxmath v0.18.0:
dixon_factor(n, b, max_steps) matching crypto-lab factor base filtering and GF(2) Gaussian elimination.foxmath dixon and standalone symlink foxmath-dixon.dixon and all 356 unit/CLI tests passing./lab.html):
#crypto-dixon-form) with congruence output, factor base telemetry, and one-click presets (84923 (B=30), 1042387 (B=50), 1393429 (B=50), 4333703 (B=60)).dixon option to the Challenge generator dropdown.projects.html, API.md, API.html, now.html, and README.md.Lenstra's ECM Elliptic Curve Factorization Suite, crypto-lab v0.11.0 & foxmath v0.17.0.
crypto-lab v0.11.0 (expanded registry to 64 endpoints):
GET, POST /crypto-api/v1/math/ecm: two-stage Lenstra ECM integer factorization with pseudo-random Weierstrass curves y2 ≡ x3 + ax + b (mod n) generated via deterministic SplitMix64 PRNG. Traps non-trivial factors at affine group slope divisions with gcd(denominator, n) > 1. Stage 1 prime-power point multiplication (B1) and Stage 2 prime difference steps (B2)./v1/math/challenge) with topic ecm (now 14 topics).foxmath v0.17.0:
lenstra_ecm(n, b1, b2, max_curves, seed) matching crypto-lab PRNG determinism and two-stage logic.foxmath ecm and standalone symlink foxmath-ecm.ecm and all 345 unit/CLI tests passing./lab.html):
#crypto-ecm-form) with real-time telemetry, curve parameter readout, stage detection, and one-click presets (1393429 (Stage 1), 1042387 (Stage 2), Fermat F4 cofactor, 32-bit RSA modulus).ecm option to the Challenge generator dropdown.projects.html, API.md, API.html, now.html, and README.md.Two-Stage Pollard's p − 1 Integer Factorization Suite, crypto-lab v0.10.0 & foxmath v0.16.0.
crypto-lab v0.10.0 (expanded registry to 62 endpoints):
GET, POST /crypto-api/v1/math/pm1: two-stage Pollard p − 1 factoring with Stage 1 prime-power exponentiation, automatic prime backtracking on complete congruence (gcd = n), and Stage 2 prime difference table for smooth factor search with bounds B1 and B2./v1/math/challenge) with topic pm1.foxmath v0.16.0:
pollard_pm1(n, b1, b2, a) with Stage 1 prime powers and Stage 2 baby-step prime gaps.foxmath pm1 and standalone symlink foxmath-pm1.pm1 and all 336 unit/CLI tests passing./lab.html):
#crypto-pm1-form) with real-time telemetry, stage detection, smoothness verification, and one-click presets (7-smooth, Stage 2, Fermat F4 cofactor, 30-bit modulus).pm1 option to the Challenge generator dropdown.projects.html, API.md, API.html, now.html, and README.md.Mersenne Primes & Euclid–Euler Essay, Lucas–Lehmer Recurrence Trace Visualizer & Lab Benchmark Presets.
lab.html: renders step-by-step modular residues (s0 … sp−2) with smart truncation and visual primality badges.now.html and writing.html catalogues.Mersenne primes & Lucas–Lehmer test suite, Euclid–Euler perfect numbers, Chamber of Primes Report & crypto-lab v0.9.0.
/CHAMBER_OF_PRIMES.html & /CHAMBER_OF_PRIMES.md): comprehensive architecture report and technical specification covering Fermat factorization, ancient Egyptian hieroglyphic mathematics, Legendre residue sieve theory, and dual-mode WebSocket streaming. Added site-links navigation header across all 14 pages and responsive horizontal scrolling wrappers for mobile layouts.crypto-lab to v0.9.0 (expanded registry to 60 endpoints):
GET, POST /crypto-api/v1/math/mersenne: deterministic Lucas–Lehmer primality test for Mersenne numbers Mp = 2p − 1 (2 ≤ p ≤ 5000), decimal digit count, bit length, and Euclid–Euler even perfect number computation via pure Rust arbitrary-precision bit arithmetic. Supports ?limit=... to enumerate Mersenne prime exponents.GET, POST /crypto-api/v1/math/perfect: test whether integer n is a perfect number (σ(n) = 2n) or generate the even perfect number 2p−1(2p − 1) for prime exponent p./v1/math/challenge) with topics mersenne and perfect./lab.html):
mersenne and perfect options to the Challenge generator dropdown.API.md and API.html with complete endpoint specifications, curl examples, and JSON response models.The Chamber of Primes (Fermat's Difference of Squares Visualizer), WebSockets & crypto-lab v0.8.0.
/chamber.html): an ancient Egyptian-themed interactive visualizer for Fermat's Difference of Squares factorization (n = x² − y² = (x − y)(x + y)).
crypto-lab to v0.8.0:
GET /crypto-api/v1/math/fermat & POST /crypto-api/v1/math/fermat: difference of squares factorization endpoint with configurable iteration bounds and step tracing.GET /crypto-api/v1/math/chamber/ws: real-time WebSocket streaming endpoint for interactive playback (play, pause, step, speed slider, stop).diffsquare.API.md, API.html, lab.html, projects.html, index.html, and writing.html with chamber navigation links and documentation.Textbook cryptosystems suite (RSA & Diffie–Hellman), 14 new endpoints & crypto-lab v0.7.0.
crypto-lab to v0.7.0, adding pure Rust textbook cryptosystems matching foxmath v0.14.0:
GET /crypto-api/v1/math/rsa/keygen & POST /crypto-api/v1/math/rsa/keygen: generates textbook RSA keypairs $(p, q, n, e, d, \phi, \lambda, d_p, d_q, q_{\text{inv}})$ with configurable modulus bit length ($8 \le \text{bits} \le 62$, default 32).GET /crypto-api/v1/math/rsa/encrypt & POST /crypto-api/v1/math/rsa/encrypt: textbook RSA encryption ($c \equiv m^e \pmod n$) with message validation ($0 \le m < n$).GET /crypto-api/v1/math/rsa/decrypt & POST /crypto-api/v1/math/rsa/decrypt: textbook RSA decryption ($m \equiv c^d \pmod n$) with optional Chinese Remainder Theorem (CRT) acceleration when prime factors $p$ and $q$ are provided.GET /crypto-api/v1/math/rsa/crack & POST /crypto-api/v1/math/rsa/crack: Pollard $\rho$ modulus factoring attack, recovering private exponent $d$ and decrypting ciphertext $c$ if supplied.GET /crypto-api/v1/math/dh/keygen & POST /crypto-api/v1/math/dh/keygen: Diffie–Hellman keypair generation ($A \equiv g^a \pmod p$).GET /crypto-api/v1/math/dh/derive & POST /crypto-api/v1/math/dh/derive: Diffie–Hellman shared secret derivation ($S \equiv B^a \pmod p$).GET /crypto-api/v1/math/dh/crack & POST /crypto-api/v1/math/dh/crack: Baby-step Giant-step discrete logarithm solver to recover private key $a$."rsa" and "dh" topics to the seeded challenge generator (/crypto-api/v1/math/challenge) and interactive challenge mode on lab.html.#crypto-rsa-form) and Diffie–Hellman protocol (#crypto-dh-form) to lab.html with real-time telemetry, operation switching, and cURL copy buttons.API.md and API.html with contract documentation, examples, and updated endpoint catalogue (53 total endpoints).crypto-lab unit and HTTP integration tests passing with 0 compiler or Clippy warnings.Jacobi symbol, Solovay–Strassen primality test & crypto-lab v0.6.0.
crypto-lab to v0.6.0, introducing quadratic reciprocity and probabilistic primality primitives:
GET /crypto-api/v1/math/jacobi & POST /crypto-api/v1/math/jacobi: evaluates the Jacobi symbol $(a/n)$ for odd positive integers $n$ in $O(\log n)$ Euclidean steps using quadratic reciprocity without integer factorization.GET /crypto-api/v1/math/solovay & POST /crypto-api/v1/math/solovay: Solovay–Strassen randomized primality test verifying Euler’s criterion $a^{(n-1)/2} \equiv (a/n) \pmod n$ across $k$ rounds with error probability bounded by $2^{-k}$."jacobi" topic to seeded challenge generator (/crypto-api/v1/math/challenge) and interactive challenge mode on lab.html.#crypto-jacobi-form) and Solovay–Strassen test (#crypto-solovay-form) to lab.html with real-time telemetry and cURL buttons.API.md and API.html with contract documentation, examples, and updated endpoint catalogue (39 total endpoints).crypto-lab unit and HTTP integration tests passing with 0 compiler or Clippy warnings.Unified arithmetic suite (/v1/math/arith), telemetry race condition fix & crypto-lab v0.5.1.
crypto-lab to v0.5.1, introducing a unified arithmetic suite endpoint:
GET /crypto-api/v1/math/arith & POST /crypto-api/v1/math/arith: efficiently factorizes $n$ once via Pollard's $\rho$ / trial division, deriving Möbius $\mu(n)$, divisor sum $\sigma_k(n)$, and divisor count $\tau(n)$ in $O(1)$ from the shared factorization./v1/math/mobius, /v1/math/sigma, and /v1/math/tau routes for backward-compatible and granular queries.API.md and API.html with contract documentation, examples, and updated endpoint catalogue (35 total endpoints).crypto-lab unit and HTTP integration tests passing.lab.html in #crypto-arith-form:
runCryptoArith fired three concurrent asynchronous requests (mobius, sigma, tau) into Promise.all targeting the same DOM result element. As requests resolved non-deterministically, subsequent responses clobbered the telemetry container, displaying inaccurate latency and partial cURL commands.runCryptoArith to the single /crypto-api/v1/math/arith endpoint, providing an atomic request with a single, accurate telemetry badge, true total latency, and a complete cURL command.Discrete logarithm (BSGS), classical arithmetic functions & crypto-lab v0.5.0.
crypto-lab to v0.5.0, adding pure Rust discrete logarithm and classical arithmetic functions:
GET /crypto-api/v1/math/dlog & POST /crypto-api/v1/math/dlog: Baby-step Giant-step discrete log solver ($g^x \equiv h \pmod p$) in $O(\sqrt{\mathrm{ord}_p(g)})$ time and space.GET /crypto-api/v1/math/mobius & POST /crypto-api/v1/math/mobius: Möbius function $\mu(n)$.GET /crypto-api/v1/math/sigma & POST /crypto-api/v1/math/sigma: Sum of divisors function $\sigma_k(n)$ (defaults to $k=1$).GET /crypto-api/v1/math/tau & POST /crypto-api/v1/math/tau: Divisor count function $\tau(n)$.dlog topic to seeded challenge generator (/crypto-api/v1/math/challenge) and interactive challenge mode on lab.html.lab.html.projects.html for v0.12.0 parity.API.md and API.html.crypto-lab unit and HTTP integration tests passing.Euler's totient, Carmichael function, multiplicative order & crypto-lab v0.4.0.
crypto-lab to v0.4.0, introducing pure Rust modular order and totient primitives:
GET /crypto-api/v1/math/totient & POST /crypto-api/v1/math/totient: Euler's totient $\phi(n)$, Carmichael's $\lambda(n)$, and cyclic group detection.GET /crypto-api/v1/math/order & POST /crypto-api/v1/math/order: multiplicative order $\mathrm{ord}_m(a)$ via prime-factor stripping over $\lambda(m)$ and primitive root verification.totient topic to seeded challenge generator (/crypto-api/v1/math/challenge) and interactive challenge mode on lab.html.lab.html.projects.html./crypto-api/v1/math/totient and /crypto-api/v1/math/order contracts and cURL examples in API.md and API.html.crypto-lab unit and HTTP integration tests passing.Integer factorization via Pollard's rho & crypto-lab v0.3.0.
crypto-lab to v0.3.0, introducing pure Rust prime factorization:
GET /crypto-api/v1/math/factor & POST /crypto-api/v1/math/factor: trial division + Pollard's $\rho$ (Brent's variant) with deterministic Miller-Rabin primality verification.factor topic to seeded challenge generator (/crypto-api/v1/math/challenge).lab.html./crypto-api/v1/math/factor contract and cURL examples in API.md and API.html.crypto-lab unit and HTTP integration tests passing.FoxMath number theory and elliptic curve cryptography in the Lab.
toy193 and toy97)crypto-lab v0.2.0 API contract and public routing in API.md.crypto-lab.FoxMath and updated crypto-lab project cards in projects.html./crypto-api/v1/math/* are public and require no authentication.Positive-divisor enumeration for the arithmetic Lab.
GET /v1/math/divisors/{n} for sorted positive divisors.n ≤ 1,000,000.Divisor-count and divisor-sum arithmetic functions.
GET /v1/math/divisor-count/{n} for τ(n).GET /v1/math/divisor-sum/{n} for σ(n).n ≤ 1,000,000.Bounded factorisation and multiplicative number-theory APIs.
n ≤ 1,000,000.Prime-number module, prime-counting support, and expanded mathematical APIs.
School Database student-view toggle for privacy-filtered and admin detail modes.
LAB_API_ADMIN_USERS allowlist.Admin-only full student details with authenticated-user authorization.
student_detail_full(table, student_id) database method for retrieving complete student records.Added an admin-only student-detail endpoint:
GET /school/api/admin/tables/{table}/students/{student_code}
LAB_API_ADMIN_USERS.Roll No-based lookup, missing students, admin access, non-admin access, and missing authentication headers.LAB_API_ADMIN_USERS are rejected with HTTP 403.403 from the admin endpoint is treated as the authorization boundary and triggers the safe fallback.X-Authenticated-User from the authenticated Basic Auth username for the protected /school/ location./school/api/health endpoint remains outside the authenticated-user header boundary.Administrator usernames are configured through:
LAB_API_ADMIN_USERS=abhrankan,teacher1,principal
The existing Nginx HTTPS and Basic Authentication deployment remains in use.
The existing privacy-aware student-detail endpoint remains available:
GET /school/api/tables/{table}/students/{student_id}
Schema-driven student details with dynamic primary-key discovery and privacy-aware responses.
Roll No as the primary key instead of requiring Student Code.Father Name and Mother Name.Student Code.Roll No.Student-detail responses exclude highly sensitive fields, including:
Guardian NumberStudent Contact NumberGuardian Contact NumberBank IFS CodeBank A/C numberAadhaar Y/NExisting student-detail URL structure remains available:
GET /school/api/tables/{table}/students/{student_id}
Student Code column.cargo fmt passes.Student Code and Roll No.Father Name and Mother Name, is available through the detail endpoint.Roll No-based student-detail supportSchool Database importer with validation and rollback-safe activation.
lab-api import <candidate.db>SCHOOL_DB_PATH.Production School Database location:
/var/lib/lab-api/School.db
The API continues to bind to:
127.0.0.1:8088
cargo clippy -- -D warnings completed successfully.Improved School Database browsing with pagination, search, and student details.
total field.Initial read-only School Database API backed by SQLite.
Added dynamic table discovery:
GET /school/api/tables
Added dynamic schema discovery:
GET /school/api/tables/{table}/schema
Added paginated table access:
GET /school/api/tables/{table}
Added School Database health endpoint:
GET /school/api/health
Added the School Database web portal:
/school/
LIKE patterns are escaped safely.Database path is configured through:
SCHOOL_DB_PATH
Production database path:
/var/lib/lab-api/School.db
The API binds to:
127.0.0.1:8088
Nginx remains the public HTTPS and authentication boundary.
cargo fmt completed successfully.Math endpoints and protected API snapshot functionality.
Added public API information at:
GET /v1/info
Added protected API snapshot endpoint:
GET /v1/snapshot
Added public service metadata endpoint:
GET /api/v1/info
Added an API information panel to the Lab frontend.
/api/v1/snapshot remains protected.Stable production release: site navigation, consistent styling, and complete API documentation.
/lab.html..active state on the current page.lab.html header.Added complete API.md documentation covering:
curl commandsu128 limitationsindex.html — Renamed navigation label from “Lab API” to “Lab”.projects.html — Added Lab to navigation.writing.html — Added Lab to navigation and updated the footer.now.html — Added Lab to navigation.lab.html — Complete overhaul with header, navigation, footer, favicon, and styling.writing/calculating-pi/index.html — Updated footer and added Lab navigation.writing/golden-ratio/index.html — Updated footer and added Lab navigation.writing/history-of-cryptography/index.html — Updated footer and added Lab navigation.writing/pythagorean-triples/index.html — Updated footer and added Lab navigation.README.md — Added the Lab API section with a link to API.md.API.md — Added production-quality API reference documentation.This release marked the completion of the site redesign and API documentation.
Initial release of crypto-lab, a small self-hosted Rust cryptography API.
/crypto-api/.GET /healthGET /v1/infoPOST /v1/hashPOST /v1/hmacPOST /v1/hmac/verify127.0.0.1:8089.crypto-lab is intentionally minimal and focused on cryptographic hashing and HMAC experimentation.