PROJECT EULER · #0182
RSA Encryption
The RSA encryption is based on the following procedure:
Generate two distinct primes
Compute
Find an integer
A message in this system is a number in the interval
A text to be encrypted is then somehow converted to messages (numbers in the interval
To encrypt the text, for each message,
To decrypt the text, the following procedure is needed: calculate
There exist values of
We call messages
An issue when choosing
For instance, let
Then
If we choose
For any valid choice of
It's important that the number of unconcealed messages is at a minimum.
Choose
Find the sum of all values of
Write-up coming later
The complete problem is available here. An approach, code, and answer will be added later.