Ascon ( NIST , Wikipedia ) is a set of lightweight cryptographic algorithms intended for resource constrained applications that nevertheless is intended to produce modern security. It was originally developed in 2014, and was finalized as a standard in August of 2025 as NIST SP 800-232 “Ascon-Based Lightweight Cryptography Standards for Constrained Devices: Authenticated Encryption, Hash, and…
dram.page is now served by grebedoc.dev
That’s it. If you’re seeing this post, your receiving this page from grebedoc.dev . Check it out if you want a way to serve the contents from a git repo over HTTP(S) on the public Internet. The backend server on grebedoc.dev is called git-pages. I’ll probably use the two names interchangably for the rest of this article. (However, I will use “ grebedoc.dev ” to specifically refer to the domain…
Slide rules approximating Vernier scales
Slide rules are amazing. Even though nowadays we carry around in our pockets a computer with power unfathomed in the last century, I still think slide rules are a wonderful way to manipulate proportions in the analog domain. In fact, I regularly carry one in my daily bag. One problem with the slide rule I carry daily (a Faber-Castelle 62/82) is that it’s rather small, about half a foot (around 15…
Threaded code explained in C
At some point in your life you may have decided that it would be a good idea to represent something in term of a “virtual machine”. You know, a relatively simple format of data that encodes things to do, and a simple interpreter reading it and doing the actual thing. I hope what you were intending to implement is actually a programming language, not just something that got to the point of being…
ELF relative relocations explained
Background Consider this code, where one piece of global data is a pointer to another piece of global data: void *foo; void *bar = &foo; During program execution, the memory at bar contains an address of foo . One way to achieve this is to require all the data to be loaded at a certain address. Then the linker can simply pre-calculate the address at link time and fill in the address for bar .…
VisionFive JTAG adventures, Part 1: JH7100 GPIO
Background The research that went into this article began as a simple technical question: How do I connect to the JTAG debug port on the VisionFive? When luojia asked this very question on the support forum, the only responses were, surprisingly, discouragement. However, for any low-level software development, such a debug port is pretty much the only way to sanely, well, debug anything at all.…
Magic tricks with CRC
An adjustable desk A friend of mine bought a motorized adjustable desk a long time ago and recently got the idea to hook up the controller to the Internet for some reason. They tapped the wire coming from the controls panel with a logic analyzer and was able to capture some packets, hexdumps shown: AAFF 0040 2EEC AAFF 0060 2964 AAFF 0050 2B08 AAFF 040E02 0450 AAFF 050E02 8EDA AAFF 060E02 1D05 AAFF…
The with construct in nix-lang
The Nix package manager comes with its own programming language for, among other things, defining packages. We’re not here to discuss whether that’s a good decision. We’ll call it the Nix language, or nix-lang for short. This article assumes some familiarity with nix-lang. This is not a tutorial. The syntax with A; E Nix-lang has a construct with A; E . Its purpose is to bring the attributes of…
This is a writeup of the Codewars kata ‘Count Empty Triangles in the Future’ . You can see the solution code I submitted if you solve it in C++ (or forfeit…). The problem statement On a grid with width m m and height n n , how many triangles have lattice points as vertices but otherwise have no lattice points on the edges and interiors? (Such triangles are called ‘empty’.) Find the answer modulo…