The Math Behind a Scanning App

In 2012, I made a simple camera app for Android that undoes the natural projection in a picture.

Of course, now we have all sorts of scanning apps on every phone, but at the time this was a novelty. Let's dissect the application and see what's it made of.

An Attack on RSA With Exponent 3

As I noted in this post, RSA encryption is often carried out reusing exponents. Sometimes, the exponent is exponent 3, which is subject to an attack we’ll describe below [1]. (The most common exponent is 65537.)

Suppose the same message m is sent to three recipients and all three use exponent e= 3. Each recipient has a different modulus Ni, and each will receive a different encrypted message