Project Euler 182 - RSA Encryption
Project Euler 182 - RSA Encryption
Official link: https://projecteuler.net/problem=182
Thought Process
Thought Process
While doing some research I found the formula which instantly solves this problem, but that is no fun at all, and the solution is quite nice involving some basic number theory so I present it below!
Proof is inspired by Recent Advances in RSA Cryptography by Stefan Katzenbeisser, Lemma 5.1
Interactive Code
Interactive Code
Input 2 integers separated by a space (a, b)
Code will output sum of all values e, 1 < e < φ(a, b), gcd(e, φ) = 1, so that the number of unconcealed messages for this value of e is at a minimum.