RSS Amplifier

Blog

Andrea Corbellini

andrea.corbellini.nameSource feed ↗25 posts

Live Last read · last published · next check

Latest posts

Testing crash recovery features in a CI environment

About two years ago I wrote a Rust crate to fulfill this promise: If a crash occurs while updating a file, the file either contains the old contents, or the new contents, nothing in between. This crate essentially solves the following problem: when you update a file, generally you open it, truncate it, write to it block-by-block, and eventually close it. The problem with …

It will take decades to undo the damage done by "AI"

Many business owners in the software development industry are investing a lot into LLM bots, marketed as “generative AI”. Some of them go as far as forcing software developers to use such tools under the threat of being fired if they don’t comply. After all, why shouldn’t they? This technology has a catchy name, it produces very convincing output that sometimes is …

Running the operating system that you're currently using in a virtual machine (with Secure Boot and TPM emulation)

In this article I will show you how to start your current operating system inside a virtual machine. That is: launching the operating system (with all your settings, files, and everything), inside a virtual machine, while you’re using it. This article was written for Ubuntu, but it can be easily adapted to other distributions, and with appropriate care it can be adapted to …

How to run Remark42 on Fly.io

As I wrote on my previous post , I recently switched from Disqus to Remark42 for the comments on my blog. Here I will explain how I set it up on Fly.io . Overview The setup that I ended up with looks like the following: Something to note about this setup is that the “machine” (more on that later) and the storage volume are both …

My journey from Disqus to Remark42

Readers of this blog might have noticed a few changes recently. For example, I’ve been working on improving the look of the blog (maybe with questionable results), as well as improving the experience on mobile. But one of the biggest changes that perhaps some have noticed is that all of the comments on all of my articles have suddenly disappeared since February 2023 …

On ignoring mistakes, resilience, and the hidden dangers therein

As a scuba diver who often explores new places, I can say that I have found myself in some dangerous situations, but I always made it back to the surface without facing any negative consequences. Does this mean that I never made any mistakes? Absolutely not: mistakes were made, and lessons were learned. We can all agree that learning from mistakes is good, but …

Authenticated encryption: why you need it and how it works

In this article I want to explore a common problem of modern cryptographic ciphers: malleability. I will explain that problem with some hands-on examples, and then look in detail at how that problem is solved through the use of authenticated encryption. I will describe in particular two algorithms that provide authenticated encryption: ChaCha20-Poly1305 and AES-GCM, and briefly mention some of…

What time is it? A simple question with a complex answer. How computers synchronize time

Ever wondered how your computer or your phone displays the current date and time accurately? What keeps all the devices in the world (and in space) in agreement on what time it is? What makes applications that require precise timing possible? In this article, I will explain some of the challenges with time synchronization and explore two of the most popular protocols that devices …

Can we encrypt data using Elliptic Curves?

From time to time, I hear people saying that Elliptic Curve Cryptography (ECC) cannot be used to directly encrypt data, and you can only do key agreement and digital signatures with it. This is a common misconception, but it’s not actually true: you can indeed use elliptic curve keys to encrypt arbitrary data. And I’m not talking about hybrid-encryption schemes (like ECIES …

The curious case of bad blocks on an SSD, and how I got rid of them

I recently inherited a laptop that was broken by pouring some hot coffee on it. When I dissected it, it was pretty clear that most of it was unrecoverable: the CPU was completely fried, and its thermal paste splashed everywhere on the motherboard. (I wish I took a picture of it that I could share.) There were however a few pieces that looked in …

How to use the same DNS for all connections in Ubuntu (and other network privacy tricks)

Problem Currently Ubuntu does not offer an easy way to set up a “global” DNS for all network connections: whenever you connect to a new WiFi network, if you don’t want to use the DNS server provided by the WiFi, you are forced to go to the network settings and manually set your preferred DNS server. With this brief guide I want to …

11 years of Ubuntu membership

It’s been 11 years and 1 month since I was awarded with official Ubuntu membership . I will never forget that day: as a kid I had to write about myself on IRC , in front of the Community Council members and answer their questions in a language that was not my primary one. I must confess that I was a bit scared that evening …

Running Docker Swarm inside LXC (outdated)

UPDATE: This article was written in 2016 and refers to a version of Docker Swarm that is now known as “legacy Swarm”. The newer Docker Swarm won’t work in LXC as described in this article. I’ve been using Docker Swarm inside LXC containers for a while now, and I thought that I could share my experience with you. Due to their nature …

When bureaucracy hits the web: the cookie law

For a few years now, every first of April I hoped to read between the news something on the lines of “the cookie law was a joke, sorry for that”. You know, bureaucracy is slow, and it’s reasonable to think that it takes time for them to reveal jokes. Yet, many firsts of April have passed, and no such announcement has been made …

Hello Pelican!

Today I switched from WordPress.com to Pelican and GitHub Pages . First off, let me say: almost all URLs that were previously working should still work. Only the feed URLs are broken, and this is not something I can fix. If you were following my blog via a feed reader, you should update to the new feed. Sorry for the inconvenience. Having said that …

Let's Encrypt is going to start soon

Let’s Encrypt (the free, automated and open certificate authority) has just announced its launch schedule . According to it, certificates will be released to the public starting from the week of September 14, 2015 . Their intermediate certificates, which were generated a few days ago , will be signed by IdenTrust . What this means is that if you browse a web page secured by Let’s …

Elliptic Curve Cryptography: breaking security and a comparison with RSA

This post is the fourth and last in the series ECC: a gentle introduction . In the last post we have seen two algorithms, ECDH and ECDSA, and we have seen how the discrete logarithm problem for elliptic curves plays an important role for their security. But, if you remember, we said that we have no mathematical proofs for the complexity of the discrete logarithm …

Elliptic Curve Cryptography: ECDH and ECDSA

This post is the third in the series ECC: a gentle introduction . In the previous posts, we have seen what an elliptic curve is and we have defined a group law in order to do some math with the points of elliptic curves. Then we have restricted elliptic curves to finite fields of integers modulo a prime . With this restriction, we have seen that …

Elliptic Curve Cryptography: finite fields and discrete logarithms

This post is the second in the series ECC: a gentle introduction . In the previous post , we have seen how elliptic curves over the real numbers can be used to define a group. Specifically, we have defined a rule for point addition : given three aligned points, their sum is zero ($P + Q + R = 0$). We have derived a geometric method and an algebraic method …

Elliptic Curve Cryptography: a gentle introduction

Those of you who know what public-key cryptography is may have already heard of ECC , ECDH or ECDSA . The first is an acronym for Elliptic Curve Cryptography, the others are names for algorithms based on it. Today, we can find elliptic curves cryptosystems in TLS , PGP and SSH , which are just three of the main technologies on which the modern web and IT world …

Let's Encrypt: the road towards a better web?

I’ve always dreamed of a encrypted web, where HTTPS is the standard and plain HTTP is no more. A web where eavesdropping or manipulating information is not possible, or at least much harder than today. I remember that I got excited when I first heard of CAcert : “a community-driven Certificate Authority that issues certificates to the public at large for free” . Unfortunately, CAcert …

Running Ubuntu Snappy inside Docker

Many of you may have already heard of Ubuntu Core . For those who haven’t, it’s a minimal Ubuntu version, running only a few essential services and ships with a new package manager (snappy) that provides transactional updates. Ubuntu Core provides a lightweight base operating system which is fast to deploy and easy to maintain up to date. It also uses a nice …

Are LXC and Docker secure?

Since its initial release in 2008, LXC has become widespread among servers. Today, it is becoming the preferred deployment strategy in many contexts, also thanks to Docker and, more recently, LXD. LXC and Docker are used not only to achieve modular architecture design, but also as a way to run untrusted code in an isolated environment. We can agree that the LXC and Docker …

Prime numbers and universe factories

I’m a XKCD fan, and I look it up regularly. There’s a comic that I particularly enjoyed: Pi Equals . The comic Pi Equals , from XKCD.com (CC-BY-NC 2.5). Well, it appears that Randall was right in that there’s a help message hidden somewhere. And I just found it in a prime number: 245178888024581899558766786108789912235672909204719666025638877624752119760547413887830514281649480308707369249 That…

New blog, again

This must be the third blog I start from scratch. But this time, I’m taking a serious commitment: I’m going to write here regularly. Wish me luck!