algoTRIC — AI-aware cryptography research & prototype
This page documents the algoTRIC research (matrix/transform cryptography & symmetric/asymmetric comparisons), explains the GitHub prototype you built, and provides interactive demos & live browser benchmarks so readers can reproduce and explore behavior.
The Encryption Dilemma (SE vs AE) — TL;DR
Symmetric Encryption (SE)
Single shared key — extremely fast (AES), good for bulk data, but key distribution is a critical vulnerability.
- • Speed & throughput: excellent
- • Key management: hard in distributed systems
- • Use-cases: encrypted storage, streaming, IoT
Asymmetric Encryption (AE)
Public/private key pairs — resolves key exchange but costs CPU/time (RSA/ECC). Excellent for small payloads, signatures, key wrapping.
- • Key distribution: solved via public keys
- • Performance: heavier (use for key exchange)
- • Use-cases: TLS handshakes, signatures
algoTRIC GitHub Prototype — what it implements
Summary and mapping from the repo to this demo implementation:
- Hybrid AES+RSA pipeline: generate an ephemeral AES-GCM key to encrypt payload; wrap (encrypt) AES key with RSA-OAEP public key. This is implemented with the Web Crypto API here for reproducibility.
- Matrix & transform algorithm: converts plaintext → numeric matrix, multiplies by a key matrix A mod p (Cons = A*M mod p), performs LU-like decomposition and L⁻¹ * Cons as intermediary, then applies reversible polynomial-style transforms to emulate the Gupta/Abaoub steps. This matches the structure of the paper while keeping the demo reversible and fast in-browser.
- Benchmarks: the page runs browser-side benchmarks to compare AES-only roundtrip times vs the hybrid pipeline. Because the browser can't read true CPU% or OS RSS reliably, the script uses wall-clock timings and `performance.memory` when available as proxies for resource trends.
Reproducibility & security notes
The demo is educational — do not use the matrix transform as production crypto. The AES+RSA demo uses Web Crypto primitives correctly but a production system should use standard formats and robust key management.
Interactive demos
Below are two demos — AES+RSA (hybrid) and the matrix-transform educational pipeline.
AES + RSA (Hybrid) — In-browser demo
Generates RSA-OAEP (2048) keys and performs AES-GCM + RSA wrapper operations using Web Crypto.
Matrix-transform cipher — educational demo
Plaintext → numeric matrix → multiply by key matrix A (mod p) → LU-style operations → reversible transform → ciphertext. Reversible educational demo only.
Live Benchmarks — AES-only vs Hybrid (AES+RSA)
Run a lightweight benchmark in the browser. The script measures mean roundtrip times (ms) for AES-only and Hybrid flows and updates charts live.
Future work & research directions
Matrix transform math
Integrate a numerical approximation of the Gupta and Abaoub transforms (requires careful numeric integration / precision). Server-side implementation with Python/NumPy is recommended for heavy math.
Post-quantum & homomorphic
Explore lattice-based primitives, homomorphic schemes for privacy-preserving AI, and hybrid constructions that remain secure post-quantum.