0%

Problem 182


Problem 182


RSA encryption

The RSA encryption is based on the following procedure:

Generate two distinct primes p and q.Compute n=pq and φ=(p-1)(q-1).
Find an integer e, 1<e<φ, such that gcd(e,φ)=1.

A message in this system is a number in the interval [0,n-1].
A text to be encrypted is then somehow converted to messages (numbers in the interval [0,n-1]).
To encrypt the text, for each message, m, c=me mod n is calculated.

To decrypt the text, the following procedure is needed: calculate d such that ed=1 mod φ, then for each encrypted message, c, calculate m=cd mod n.

There exist values of e and m such that me mod n=m.
We call messages m for which me mod n=m unconcealed messages.

An issue when choosing e is that there should not be too many unconcealed messages.
For instance, let p=19 and q=37.
Then n=19*37=703 and φ=18*36=648.
If we choose e=181, then, although gcd(181,648)=1 it turns out that all possible messages
m (0≤m≤n-1) are unconcealed when calculating me mod n.
For any valid choice of e there exist some unconcealed messages.
It’s important that the number of unconcealed messages is at a minimum.

Choose p=1009 and q=3643.
Find the sum of all values of e, 1<e<φ(1009,3643) and gcd(e,φ)=1, so that the number of unconcealed messages for this value of e is at a minimum.


RSA加密

RSA加密基于以下流程:

生成两个不同的素数p和q。计算n=pq以及φ=(p-1)(q-1)。
找到整数e,满足1<e<φ,且gcd(e,φ)=1。

RSA系统能加密的信息是区间[0,n-1]中的整数。
因此,需要加密的文本首先需要转换成可加密的信息(即区间[0,n-1]内的某个整数)。
加密文本时,如果文本转换成的信息是m,则加密为c=me mod n。

解密文本时,需要以下流程:计算d满足ed=1 mod φ,如果加密的信息是c,则解密为m=cd mod n。

存在某些e和m使得me mod n=m。
我们称满足me mod n=m的这些m为未加密信息。

在选择e时,很重要的一点就是不应该有太多未加密信息。
例如,令p=19,q=37。
然后n=19*37=703,φ=18*36=648。
如果我们选择e=181,那么尽管gcd(181,648)=1,但是所有可能的信息
m (0≤m≤n-1)都是未加密信息,只要我们计算一下me mod n就能发现。
对于任意的e,总是存在一些未加密信息。
使得未加密信息的数目为最小值是很重要的。

现在我们选择p=1009,q=3643。
找出所有e,满足1<e<φ(1009,3643)且gcd(e,φ)=1,并且此时未加密信息的数目为最小值。求出所有这些e的和。