This is a short post on *distributed key generation* (DKG)
in the context of cryptographic groups, such as elliptic curves.

- 2022年10月09日
- 15 分

DKGs in Groups- 2022年09月25日
- 11 分

Notes on STARK ArithmetizationI’ve been playing around with STARKs lately, meandering my way towards a toy implementation.

- 2022年08月21日
- 23 分

The Paper that Keeps Showing UpLet’s talk about one of my favorite cryptography papers.

- 2022年08月14日
- 35 分

Some KEMs and Some ProofsIn this post, I’d like to provide a technical introduction to key encapsulation mechanisms (KEMs), with a focus on proving the security of various constructions.

- 2022年07月16日
- 8 分

Basic Cryptography Without FluffMany topics in cryptography on this blog so far, but not many basic topics. This post is a crack at providing such an approach. With luck, it should bring utility to unfamiliar folk, but also grins for folk familiar with this art.

- 2022年06月26日
- 12 分

On Identifiable AbortsMany cryptographic protocols attempt to satisfy a notion of “identifiable abort”, where if a malicious party causes the protocol to prematurely halt, then they can be detected. In practice, I think that this notion isn’t all that useful.

- 2022年05月28日
- 43 分

State-Separable Proofs for the Curious CryptographerThis blog post is an introduction to

*state-separable*proofs, a technique for proving the security of Cryptographic schemes.- 2022年05月14日
- 13 分

Some Cryptography Books I LikeThis is just a brief post going over a few books on Cryptography I’ve read, and would potentially recommend to people interested in the topic.

- 2022年05月01日
- 13 分

Explaining Yao's Garbled CircuitsThe protocol so fun you have to implement it! Like I did recently.

- 2022年04月23日
- 14 分

Canetti et al's Paradoxical Encryption SchemeWhen proving security, Cryptographers often model hash functions as random oracles, which act like random functions. In practice, hash functions are different from random oracles. The question is: does this difference impact security?

- 2022年04月03日
- 5 分

What I've Been Working On: 2022-W13Secret sharing seed phrases, studying MPC, and Yao’s Garbled Circuits.

- 2022年03月20日
- 9 分

Encoding Traits with Go GenericsIt turns out that Go v1.18’s generics functionality is enough to encode traits, which has many applications. In particular, we could write a generic library for Elliptic Curves, among other things.

- 2022年03月13日
- 9 分

What I've Been Working On: 2022-W10A toy blockchain in Haskell, simulation-based security, and tinkering on Cryptographic foundations.

- 2022年03月07日
- 12 分

On Monero's Ring SignaturesMonero is a cryptocurrency which claims to be “private, and decentralized”. One of Monero’s main tools towards this privacy is the ring signature. Ring signatures allow you to sign on behalf of a group, without revealing which member of the group you are. They can be constructed as an elegant extension of Schnorr signatures, and aren’t all that hard to understand either.

- 2022年02月06日
- 9 分

On the Malleability of ECDSA SignaturesThe ECDSA signature scheme is quite ubiquitous, used everywhere from TLS to various cryptocurrencies like Bitcoin. Funnily enough, it turns out that it suffers from a few

*malleability*issues, although I doubt these pose a serious issue in practice.- 2021年10月02日
- 6 分

Porting Ludus to the WebRecently, I ported my NES emulator, Ludus to run in the browser, using WASM. You can play around with it here. This post is a brief overview of the interesting aspects in creating this port. Ludus Ludus was an NES emulator that I wrote 3 years ago, back in 2018. I was starting my BSc at EPFL then, so it’s a bit fitting to revisit the project now that I’m starting my MSc.

- 2021年09月03日
- 2 分

My Quick Attempt at Bluesky's Satellite ChallengeTwitter’s Bluesky initiative created a little challenge where the goal was to verifiably link different digital identities together. This is my attempt at this.

- 2021年08月03日
- 5 分

Taproot Signatures and BIP-32How do Bitcoin’s new Taproot signatures interact with the good old key derivation methods from BIP-32? It turns out that the answer isn’t all that straightforward.

- 2021年07月25日
- 9 分

On Multi-Set HashingDesigning a hash function where the order of inputs doesn’t matter is surprisingly easy.

- 2021年07月18日
- 9 分

Quantum Computing: Some AnalogiesI’ve developed a few intuitions about algorithms on quantum computers. This post is an attempt to share them.

- 2021年07月10日
- 13 分

Signatures From Identification SchemesIt turns out that all you need to make a signature scheme is a way to prove your identity.

- 2021年07月05日
- 15 分

Introducing NuntiusRecently, I made a toy E2E encrypted messanger, called Nuntius. I had fun tinkering on it, and thought that some of the cryptography involved would be fun to explain.

- 2021年06月20日
- 11 分

End-to-End Encryption in Web AppsEnd-to-end encryption is a very appealing guarantee of privacy, and more applications want to provide this guarantee. Web applications are popular, and they want to implement this functionality in the browser. What kind of guarantees does a user still have with a web app, served to them dynamically?

- 2021年06月06日
- 17 分

Introducing NimotsuRecently, I’ve been working on a little encryption tool called Nimotsu. My goal with this project was to implement all of the cryptographic primitives involved. I had a lot of fun doing so, and thought it would make for an interesting blog post.

- 2021年04月05日
- 23 分

Constant-Time Big Numbers: An IntroductionOver the past couple months, I’ve been working on a library for constant-time Big Numbers in Go. I think it’s about time that I presented a bit of this work.

- 2021年02月28日
- 9 分

Some Thoughts on Numeric ClassesThis is just a quick post, crystallizing some of the ideas I’ve had recently about organizing numeric classes in Haskell.

- 2021年02月21日
- 6 分

Fractals on The WebLast week, I made a little web application for visualizing some fractals, and I thought I’d write up a few thoughts about how it works.

- 2021年02月14日
- 11 分

Spaced Repetition for MathematicsRecently, I’ve been experimenting with using

*spaced repetition*for self-studying “advanced” mathematics. This post goes through my motivations for adopting this system, as well as a few techniques I’ve used in adapting it to mathematics.- 2021年02月05日
- 5 分

Programming Problem: Run-Length EncodingThis is just a quick post about a programming problem that’s been circulating around on twitter recently:

- 2021年02月02日
- 17 分

Tychonoff's Theorem and Zorn's LemmaTychonoff’s theorem proves that the product (even infinite) of compact spaces is also compact. The proof makes judicious use of Zorn’s lemma. In fact, it uses it so well, that I gained an appreciation for how fun the lemma can be.

- 2021年01月24日
- 6 分

On Strings in CompilersI’ve been thinking recently about handling strings and names in compilers in a more principled way, and I think I’ve come up with a nice way of doing this.

- 2021年01月16日
- 6 分

Let's Describe Algorithms BetterI was reading a cryptography textbook, and I came across an algorithm that reminded me why I often dislike descriptions of algorithms in textbooks. This is a short post going over this example, and thinking about how to improve these descriptions.

- 2021年01月10日
- 13 分

Making an IORecently I’ve been wrapping up my work on a compiler for a subset of Haskell. While my subset doesn’t (yet) have any support for

`IO`

, I’ve been thinking about how to implement it.- 2020年12月31日
- 8 分

(Basic) Universal Properties in HaskellThis is a post going over the basic concept of defining objects through

**Universal Properties**, in Category Theory, with explanations and examples in Haskell.- 2020年12月28日
- 67 分

(Haskell in Haskell) 3. ParsingThis is the third post in the Haskell in Haskell series.

In this post, we’ll go over creating a

*parser*for our subset of Haskell. This stage of the compiler is responsible for taking the tokens that our lexer produced in the previous part.- 2020年12月13日
- 12 分

Chinese Remainder Theorem for ProgrammersThis is a quick post about the Chinese Remainder Theorem. Specifically, how to use it to solve a system of system of simple modular equations.

- 2020年12月10日
- 61 分

(Haskell in Haskell) 2. LexingThis is the second post in the Haskell in Haskell series.

In this post, we’ll go over creating a

*lexer*for our subset of Haskell. This stage of the compiler goes from the raw characters in our a source file, to a more structured stream of*tokens*.We’ll finally be digging into some serious code this time, so get your editor ready if you’re following along!

- 2020年12月07日
- 7 分

(Un)fold as (Co)algebraOne cool thing about lists is that they have canonical ways of consuming and producing them: folds, and unfolds. It turns out that these are canonical, in that folding and unfolding functions are themselves isomorphic to lists. In this post, we’ll explore why this is true.

- 2020年12月05日
- 4 分

A simple algorithm for UNIX's TreeThis morning I decided to implement my own version of UNIX’s classic

`tree`

command in Rust. I thought the algorithm was both non-trivial, and interesting enough to warrant a quick blog post.- 2020年11月23日
- 19 分

(Haskell in Haskell) 1. SetupThis is the first “real” post in the Haskell in Haskell series.

In this post we’ll go over setting up a basic project in Haskell. We’ll be building our compiler on top of this foundation in the next posts.

- 2020年11月10日
- 9 分

On Deep ImmutabilityThis post is about the different ways objects can be immutable and mutable in programming languages, why deep immutability is what we really want, and a path towards implementing that in higher level languages.

- 2020年11月01日
- 13 分

(Haskell in Haskell) 0. IntroductionThis is an introduction to a series I’m calling

**Haskell in Haskell**. The goal of this series of posts is to go through the implementation of a subset of the Haskell language, from parsing, to typechecking, to code generation, using Haskell itself.- 2020年10月19日
- 2 分

Always use offsetofIf you want to find out how many bytes a certain portion of a struct uses, you might be tempted to do some arithmetic with

`sizeof`

, but this will yield unpredictable results!- 2020年10月18日
- 12 分

Lexer CombinatorsWhen you write a parser in Haskell, you want to use parser combinators. When you write a lexer, you should use lexer combinators! We’ll see what these are, and how to use them to write a simple lexer.

- 2020年10月14日
- 8 分

Monty Hall and CounterfactualsThis is about some shower thoughts I had recently about the infamous Monty Hall problem. Namely, how to make sense of the counter-intuitive results involved. We’ll see how reasoning counterfactually can make the best strategy seem a lot clearer.

- 2020年10月10日
- 7 分

My Blog: Version 4Having recently inaugurated the 4th version of this blog, I want to go over the technologies that I used to make this, as well as some of the tricky things I had to do to make things work.

- 2020年10月02日
- 9 分

Categorical GraphsThis post is a basic introduction to the idea of Categorical Graphs, or just the standard theory of Graphs, developed through the lens of Category Theory, and generalized in the obvious ways that follow through that lens. This is just an introduction mainly because this theory doesn’t seem to have been developed very far yet, and I haven’t been able to develop it that much independently so far. I think I have a good grasp on some very basic ideas here, and wanted to present them while they’re still fresh in my head.

- 2020年09月28日
- 8 分

The Web or The Internet?So this is going to be a bit of a Rant on some things I’ve been thinking about recently. To set the background for this post, I’ve been working on a note-taking app with a focus on individual blocks referencing eachother. Kind of like Roam. The idea is that this kind of system can be used for discrete nodes of knowledge, which we can call blocks, for simplicity. Blocks don’t contain much on their own, besides some text, and references to other blocks.

- 2020年09月20日
- 5 分

Wrapping GtkImContextSo, recently I’ve started working on a text editor, using Gtk, via gtkmm in C++. I’ve decided to try my hand at writing the text area widget from scratch, just using the text layout facilities provided by Gtk’s Pango. My rationale for this is twofold: It seems that Gtk’s TextView widget is missing a few nice things, like source lines, and using the more developed SourceView is not doing a lot of the work myself.

- 2020年09月09日
- 10 分

Recursive Types as Initial AlgebrasRecently (well, more like a month ago), I came across this interesting observation: In my head, I immediately jumped to the notion of Algebras in Category Theory. I had recently studied that notion, found it quite interesting, and was very happy to see this observation, because it was actually quite obvious to me thanks to what I’d recently learned. The goal of this post is to unpack that tweet, and then explain why that observation is true.

- 2020年08月30日
- 17 分

Encoding the NaturalsIn this post, we’ll cover 3 ways I know of encoding the natural numbers $\mathbb{N}$ in your standard functional language with recursive types and polymorphism. At least, these are the 3 most generalized ways of doing it. As we’ll see, some common encodings are just specific cases of a more general encoding. Prerequisites Some familiarity with defining data types in a functional-esque language might be helpful, but shouldn’t be strictly necessary.

- 2020年08月17日
- 14 分

Empty vs NonEmpty GroupsThe usual definition of a Group excludes empty groups by definition. There are alternate definitions of a Group that allow us to include the empty set, and which are quivalent to the normal definition in all other cases. This post explores this alternate definition, and the resulting differences with the normal concept of a Group. What is a Group? A Group is one of the most important structures in abstract algebra.

- 2020年06月18日
- 7 分

Monomorphisms vs EpimorphismsThe concepts of

*monomorphism*and*epimorphism*are very important in*Category Theory*. I always had a hard time remembering which one was which until I thought about a good mnemonic.- 2020年06月10日
- 8 分

Simple WebRTC Video ChatRecently I made an app for making group video calls. The difference between this and something like zoom is that there’s no central server responsible for routing video calls between the participants. Instead, I used WebRTC in order to set up peer-to-peer (P2P) calls between all of the members of a group.

- 2020年06月03日
- 25 分

Parsing A Whitespace-Sensitive LanguageThis post is about how to parse programming languages which define blocks using indentation, instead of braces and semicolons. We’ll end up learning how to infer these blocks based on the indentation, using Typescript to parse a toy functional language.

- 2020年04月13日
- 6 分

What I like about Roam (so far)I read a lot of stuff, mainly on the internet. One problem I’ve always had is keeping track of the important bits of the things that I read. The most important information sticks with you, but it’s not easy to remember everything. There’s always a nagging fear that there’s some importing bit you might be missing, or that you might forget something useful.

- 2020年02月13日
- 15 分

Against Fullstack Data SharingThis is a post about how I work with data in fullstack development. Specifically, I share what I think are good patterns for sharing data and logic between the frontend and the backend of an application.

- 2020年01月31日
- 19 分

Review: The New York TrilogyThis is a review of The New York Trilogy written by Paul Auster in 1987.

As the title says, this book is actually a trilogy of three shorter novels:

*City of Glass*,*Ghosts*, and*The Locked Room*.- 2020年01月10日
- 7 分

Integrating Notes and Spaced RepetitionSo I’ve been tinkering around with better systems for taking notes recently. I’m not a big fan of keeping notes, around because I don’t find myself actually revisiting them, and when I do, I don’t get much value out of it. On the other hand, my experience with language learning has definitely showed me how effective spaced repetition is when it comes to keeping things in your head.

- 2020年01月09日
- 5 分

React Pitfalls: useState initializationThis is a quick post about a “gotcha” I encountered recently in a React application. This involved the use of React’s

`useState`

hook, which had a subtle difference between how I thought the hook worked, and how it actually worked.- 2019年12月28日
- 12 分

Structured ImmersionWhen it comes to language learning, one approach that I really subscribe to is immersion. This means trying to absorb as much of the language as possible, as often as possible. It’s often said that “speaking with locals” is a good way to accelerate the learning process, and there’s a lot of truth with that statement.

- 2019年10月27日
- 5 分

Layerability and AbstractionThis is a post about one of my favorite aspects of networking: how different protocols and concepts are layered together. I go over the concept of

*Layerability*and how it applies to networking and programming more generally.- 2019年08月31日
- 9 分

- 2019年08月17日
- 8 分

From Interfaces to TraitsThis is a post about how different languages handle the concept of

*interfaces*. We’ll go over the classical*OO*way of handling them, with*Java*, to the more recent approaches of languages like*Rust*, as well as others in between.- 2019年07月07日
- 5 分

- 2019年06月14日
- 6 分

Data Races vs Race ConditionsThis is a quick post about the difference between

*Data Races*and*Race Conditions*, and how data structures or patterns providing freedom from data races can fail to provide race condition freedom.- 2019年06月13日
- 3 分

Introducing LudusThis is a short post about a crate I recently published: https://crates.io/crates/ludus. This crate provides the core logic of an NES emulator, and can be used to build independent GUI applications.

- 2019年05月14日
- 5 分

The Component PatternThis post details a useful pattern for organizing stateful components in functional code. This post assumes knowledge of

**Haskell**, up to**Monad-Transformers**.- 2019年05月03日
- 12 分

Bittorrent Is Hard - 1Having worked on a bittorrent client in Haskell recently, I wanted to write about a few tricky aspects of the implementation that I encountered: managing the concurrent piece downloads, and saving them to files.

- 2019年03月06日
- 6 分

Mutability Is a Great Secret To HaveWhen programming in a Functional style, Mutability is often avoided on principle. But what’s more important is having functions be immutable from

*the outside*. In this post we’ll see how to use interior mutation while providing an immutable interface.