Photo by jordan Huie on Unsplash

The Moment I Finally Got Public Key Encryption: The Inverse Mod

--

The moment I got public-key encryption was when I understood a finite field, and that it was fairly simple. Even the words of “finite field” sounded grand. And when research papers started talking about a “Galois field”, I lost it a bit more. But it was really simple. The numbers were just groups of numbers, and where one group of numbers mapped to another group, and that these groups were just a collection of the number that were constrained to be finite.

A finite field of 12, is the values of 0, 1 … 11, and a Galois field of 2 (GF(2)) is the values of 0 and 1. In fact, finite fields are actually Galois fields by another name! And so a symbol of 𝔽𝑞 was just the values from 0 to q, and GF(q) was also the values of 0 to q.

Let’s say I have a finite field of 5, and so we have A={0,1,2,3,4}, and then multiply them all by 3, and take (mod 5), we get B={0,3,1,4,2}. We have one group (A) and then multiply each by 3 and take (mod 5) to get B. Every value from A now maps to a single value in B. By looking at any of the values in B you might not be able to map them back unless you knew the multiplier and reverse the operation. In public-key encryption, we must find a method that makes it easy to reverse back if we know a secret, but difficult if we do not.

--

--

Prof Bill Buchanan OBE FRSE
ASecuritySite: When Bob Met Alice

Professor of Cryptography. Serial innovator. Believer in fairness, justice & freedom. Based in Edinburgh. Old World Breaker. New World Creator. Building trust.