I recently bought an ST NUCLEO-L432KC , a small dev board with an STM32L432KC , a Cortex-M4 micro-controller designed for ultra-low-power applications. 1 These STM32 MCUs come with a proprietary tool for code generation called STM32CubeMX, unfortunately my experience with it was very poor so to speak: I couldn’t even generate a functioning base project for this board. 2 Since ST doesn’t provide…
This is a quick guide on how to program a Sipeed Tang Nano 9K (GOWIN GW1NR-9) using a fully open source toolchain for FPGA programming. I will use Arch Linux but you may find some of the required packages available in your distro’s package repository as well. Install Yosys and OpenFPGALoader from the official Arch repository with pacman : sudo pacman -S yosys openfpgaloader Now you will need to…
This is an introduction to the concept of monads in Haskell for those who are starting to get familiar with the basics of the language - things like polymorphism, type signatures, higher-order functions and so. I will use a very simple example that looks useless but will hopefully help you understand this concept. Start a REPL session with the command ghci and try the following: ghci> f = (\x ->…
Most software projects avoid formal verification due to time constraints and expertise requirements. Tools like the Coq proof assistant, commonly used to introduce the topic to computer science students, can appear too cumbersome for real-world applications and therefore hard to justify. In contrast, in the field of cryptography specialised tools such as ProVerif have been regularly used for the…
You may have never heard of GNU Readline before, but provably you have used it many times. Readline is a library for command-line interfaces that manages user interaction: it’s the thing that shows you a prompt and allows you to write commands in programs like Bash and the Postgres client. One of the “tricks” you learn when using a shell for the first time is to press Tab to autocomplete commands…
When working on multiple files or sections of code I often leave XXX tags with comments like “remove this line”, “uncomment this call”, “rename me”, etc., to remember to change back or finish something before pushing to remote. While tags are highlighted on most text editors it is still easy to miss them, so I have the following Git pre-push hook to abort a push if the tag is found in the changes:…
The Stanford Javascript Crypto Library, or simply SJCL , is probably the best option available right now for using cryptography on the client-side: the project started in 2009 as a paper describing how to implement a secure and fast crypto library for web browsers, including, for instance, a CSPRNG algorithm and symmetric encryption. Today, it also has public-key crypto, hashing, and ECC…
Your quest is at an end for you have reached the home of Peramides 1 . This is a personal blog about things I’ve learnt, discovered, thought, or that I just need to write down somewhere because I always forget them. It’s a spiritual successor of my old WordPress blog. I needed something fresh so I built this using Jekyll/Octopress (I almost chose Hakyll but its documentation was scarce and…