Homepage
I use this website to write about computer-related topics, such as cybersecurity, programming, and mathematics. I participate in CTFs and competitive programming contests sometimes. I read, both fiction and non-fiction. I use the DWM window manager on Arch Linux, neovim as my editor, Chromium for web browsing, and Alacritty as my terminal emulator. I know a lot of programming languages, in order of skill, from most to least: Python, HTML, Bash, C/C++, JavaScript, Haskell, CSS, LaTeX, Lean, and x86-64 asm.
-
Tracking Keypresses
Nov 3, 2024rust,trackingI wanted to track/record my keypresses—it would be interesting to analyze the various statistics associated with that. I wrote some code that reads directly from
/dev/input
to get this data, similar to the toolevtest
. Firstly, we can create anevent.rs
file that implements a method to deserialize the data stream from any character device in/dev/input
. We obviously use Rust here, because Python would have too great an overhead. For code that is activated each time a key is pressed, it needs to be lean. -
Random Topics: 001
Oct 24, 2024randomI've been engaging in several disparate activities as of late, none of which are mature enough to be developed into their own individual article. Instead, like one great big spring mix salad, I'm going to amalgamate each of them into this one article covering the tiny pursuits that have captured my interests recently.
-
Generating Strong Pseudoprimes to Fixed Bases
Sep 12, 2024algo,ctf,mathThe hardest challenge in the mathematics section of CryptoHack, entitled "Prime and Prejudice," essentially involves finding a strong pseudoprime to a set of fixed bases—with the aim of tricking the Miller–Rabin implementation to accept our composite number as prime. The title of the challenge is a reference to a 2018 paper exposing security flaws related to adversarial primality testing in cryptographic libraries.
-
Configuring WireGuard VPN on Oracle
Aug 23, 2024linuxMy favourite kind of price is free. Hence, on perusing through all those affiliate web articles which blindly market VPN services and assign them arbitrary ratings, I had an epiphany—why not build my own VPN on free cloud compute? Oracle has a generous free tier, perhaps to compensate for their horrible UI/UX.
-
Generating Order-Preserving Minimal Perfect Hash Functions
Aug 7, 2024algoA hash function is a function that maps a set of strings to integers between an interval. If this function is injective, in other words the function produces no hash collisions, then we call the hash function perfect. If furthermore the function is bijective, then we call it a minimal perfect hash function, sometimes abbreviated as MPHF. In computer science we sometimes refer to strings as words.
-
Algorithms for Sequence Alignment
Aug 5, 2024algoIn bioinformatics, sequence alignment refers to a way of arranging sequences of DNA or RNA to identify regions of similarity. Then, evolutionary and other relationships can be revealed. But this idea is useful for many other purposes, for example
-
Eliminating Terminal Startup Latency
Aug 4, 2024dwm,workflowMy workflow revolves around the terminal. For example, to launch an application such as Chromium or Krita, I press the keybind Win+space to open a new floating Alacritty terminal in the center of my screen. Then, I type
krita
or the name of whatever application to launch it. I have tons of aliases in my.bashrc
that look like this to close the terminal when I open an application: -
The
tempfile
Module in PythonJul 26, 2024pythonThe Python programming language boasts an expansive standard library, providing developers modules for the most specific and esoteric of needs. In fact, there exists a famous XKCD comic where an individual imports "antigravity" and gains the ability to fly.
-
A Ukulele Tuner in React
Jul 15, 2024react,webI really like GuitarTuna, an online tuner for musical instruments with a fun and intuitive user interface. For some reason they only allow you to tune a guitar and not a ukulele, perhaps to encourage you to install the mobile app?