at the core of this demo are some important libraries - while I typically try to do these projects (at least close to) libraryless, i wasn't super interested in writing (e.g.) highly optimized powmod/modular inverse algorithms. for these, we use gmpy2, a crazy-fast c-coded python module, for charting we use jsxgraph, and for TeX math rendering we use mathjax. however, all of the algorithms in use were written by me, albeit often adapted from available pseudocode - check the github page applets/ecc.py
while developing this demo, i had originally wanted to dynamically generate a large prime and solve for the cardinality using my implementation of the baby-step giant-step algorithm, but the time it takes to compute the cardinality varies widely even for primes of roughly the same size (partially due to the fact that this server runs on only 512mb of ram) - instead, i picked a random 9-digit prime and precomputed the cardinality. the method of breaking up the message into one point per ascii character is not by any means rigorous/secure, but it is an incredibly simple and illustrative embedding.
all interactive portions of this demo point to the same endpoint /elliptic/eccencode/ to ensure that the user-submitted input message and the randomized keypairs remain in sync between the client and the server - the endpoint is called once on page load to prepopulate the relevant fields across all of the slides, and then again each time the user submits a new message or generates new keypairs.