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

Equivalence Relations and Partitions

While reading Judson’s Abstract Algebra book (described more in this post) I also learned about equivalence relations. This topic is covered early in the book as part of a review about sets. I think equivalence relations represent a very elegant idea. If you can create an “equivalence” between two objects in a set then you can use the same equivalence relation to partition the set into distinct non-overlapping subsets. Definition An equivalence relation is an operation on two elements that returns true or false....

November 15, 2021 · 5 min

Abstract Algebra: Introduction to Groups

Why Abstract Algebra? I have always liked formalisms. They usually take a complex system and try to describe it through few simple rules that generate the complexity through their interactions. It might seem that in Mathematics the causality is reversed: we describe the rules first (axioms) and then explore the system. This is misleading because that’s usually how the final product is presented. In reality, there are many different formalisms of related systems and with time each formalism get polished....

October 9, 2021 · 13 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

Mughal Art

I was recently visiting the RISD Museum where they had an exhibit on Text, Paratext, and Images. I noticed some Indian art, particularly from the Mughal period, that stood out to me. Emperor Babur Overseeing the Altering Course of a Stream[RISD: Public Domain] Since then I have been looking at a lot of Mughal Art/Paintings from the period (1500-1700 AD). So I wanted to write out some tendencies that I noticed that I think help define the style for me....

July 24, 2021 · 4 min

Year Review 2020

So 2020 was crazy. I am just going to ignore the obvious insanity of it and focus on reading and personal projects. Books This year I read fewer books, 8 compared to 21 from last year. This was partly because of the loss of dedicated reading time on my commute and partly because I was working on some new projects. Below are the books I read and my thoughts on some of them....

January 28, 2021 · 6 min

Books Review 2019

Last year I read 19 books without setting a specific goal so this year I decided to stick with a goal of 20 books. It felt like a comfortable goal. I read 21 books which I am pretty happy with. The change in the distribution of books is interesting too. The last two years I read 10 and 14 nonfiction books, respectively. This year the trend continued and I read 18 nonfiction books....

January 2, 2020 · 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

Books Review 2018

After reading 27 books in 2016 and 30 books 2017. I decided to take it a little easier this year by not setting a specific goal. I managed to read 19 books this year and I am pretty happy with it. Compared to last year, this year I read a lot more nonfiction books. Last year I read 10 nonfiction books (out of 30) and this year I read 14 (out of 19)....

January 5, 2019 · 6 min