So over the past three days I’ve been building beatLock. Basically I resuscitated my old 2013 macbook pro with Arch Linux, but was kinda upset it didn’t have touch ID like my current one does. Long story short: I decided to try to build a form of biometric authentication based on typing patterns, with the idea that this makes passwords safer.
I started with a web demo in HTML/CSS/JS, mostly cuz I know those already and I rlly just wanted to figure out how this thing was gonna work without dealing with syntax errors every five mins. It only took me abt an hour to get this web demo working which was nice. Unfortunately it’s not too polished (sorry abt that), cuz the focus was getting it working on Linux.
Then I started coding in C, which in and of itself ain’t awful cuz I work with C++ regularly. Thing is, you can’t just take input normally, so I sent a couple hours going down a rabbithole of getting keyboard events directly from /dev/input/ (the low-level kernel events basically).
Ironically, the part that screwed me over the most was the part I hoped would be rlly easy. Turns out that writing protected files from a hidden root process brings with it a lot of security considerations, so I had to get AI to help me build smthn that was acc secure instead of the half-baked security nightmare fuel I built. I spent wayy too long on that and compiler errors, but I digress…
Anyways, after going through a couple of iterations of integration hell with the PAM library, I got it working on Linux. Building the Makefile and installation scripts wasn’t too difficult (especially compared to C cough cough). Add a README and a MIT License, and we’re good to go
Basically, the result is a functional biometric typing pattern authenticator that can be installed on Linux (instructions in the README). Currently I’ve got it set up to still fallback to the default PAM (just in case yk), but it is possible to set it as the sole PAM if you want to (see the experimental section of the README). No idea if people will actually wanna use it, but I had fun building it. Hope y’all like it too :)
P.S. For all the Mac users, I found out you can use touch ID to authenticate sudo on MacOS. Here’s the guide if you wanna try. Works like a charm for me