SIM cards have a PIN and a PUK numbers. Since PINs are used frequently, I know it by heart. I want to write down the PUK to a paper, but I don't want to do it in plaintext, but in a way only I can read it.
With a computer, there are several algorithms readily available to encrypt a number with a key. But can I do it on paper, or better yet, in my head?
Since the PIN is known only to me, it is a good candidate for a key. Can I somehow encrypt the PUK so that it can only be decrypted with this key, all without using a computer? What is my best bet regarding computational complexity and security?
Let $a=a_3 a_2 a_1 a_0$ be the digits of the PIN, and similar let $b_i$ the digits of the PUK. First, you repeat the PIN so often that the PIN and the PUK have the same length. (i will call this repeated PIN still $a$ with digits $a_i$).
Then, for each digit, you can use addition $\mod 10$ to get the encrypted PUK:
$$c_i = a_i + b_i \mod 10$$
This is easy to calculate in your head.
For decryption you have to use substraction: $$b_i = c_i-a_i \mod 10$$
Assuming both PIN and PUK are drawn from a uniformly random distribution, this encryption has the same security as your PIN (e.g. 4 decimal digits), and the encrypted PUK $c$ is uniformly randomly distributed.