Homomorphic Encryption with Images

A model for a homomorphic encryption system. The purple arrow represents a computation that can be done on the plaintext or the ciphertext. Homomorphic encryption is a form of encryption that allows you to do computations on encrypted data! The image above provides a simple model for this. Suppose changing a capital letter (A) to its lowercase version (a) is the encryption algorithm. In this system, we can do computation on the encrypted letter....

January 9, 2022 · 5 min

Parallelizing C++ using Execution Policies

C++’s standard library provides a large collection of generic algorithms that can be used in many different situations. Some of the examples are sort, foreach, binary_search, min, max and accumulate. The usage of these algorithms used to be pretty cumbersome because most of the algorithms required a callable object which meant you had to create a new class just to use the algorithm. However, after Lambda support was added in C++11, it became a lot easier to use the algorithms....

December 30, 2021 · 4 min

Improving Git's Autocorrect Feature

The Feature Git has an autocorrect feature. It is not very popular and for good reason. By default, Git suggests the closest command when you try to run a command that doesn’t exist. For example, if you run git sttus, git will suggest running git status. However if you configure the help.autocorrect setting, Git can also “autocorrect” (as in run the command for you). The feature seems useful till you realize that command will be run without any user action....

September 12, 2021 · 7 min

Solving Non-Existent Problems with Serverless

TL;DR: AWS Lambda’s are much simpler and cheaper than managing a server. For nontrivial AWS Lambda functions, consider using the serverless CLI tool. Non-Existent Problems My personal website is a static website generated via Hugo. You would think a static website wouldn’t need much on the side of dynamic computing but I found a way! I use AWS Lambda (which is AWS’s serverless offering) to generate the static website. The Lambda is triggered by a GitHub webhook which sends a HTTP request when a new commit is pushed to the website repo....

January 21, 2019 · 6 min

Setting up Gogs (git hosting) on Omega2

[Omega2](https://onion.io/omega2/) is a $5 micro-server. It comes with WiFi and SD card support but limited CPU power and RAM. I wanted to use it to host a private Git server for myself. I first looked at GitLab but it has some intense hosting requirements (like 2GB of RAM). That's when I found [Gogs](https://gogs.io/), its a private Git hosting service written in Go. It doesn't have any explicit requirements but its intended to be somewhat light....

July 29, 2018 · 5 min

Cmd+Ctrl Hackathon at DEFCON 25 (2017)

DEFCON 25 was the first security conference I had ever attended. It was a new experience and I learned a lot but all of that is for another post. Here I want to talk about one of my favorite experiences at DEFCON: Cmd+Ctrl hackathon. As the website puts it, the goal of the hackathon is to “explore vulnerable web applications, discover security flaws, and exploit those flaws.” Over the previous year, I worked my way through The Web Application Hacker’s Handbook so I was excited to have an opportunity to try out all the things I learned in the book....

January 28, 2018 · 6 min