D
D
DVoropaev2019-04-08 00:49:57
Encryption
DVoropaev, 2019-04-08 00:49:57

Where did I go wrong with RSA?

#Берем пару простых чисел и вычисляем их произведение:
p, q = 11, 5
n = p*q = 55
#Функция Эйлера:
phi(55) = (p-1)(q-1) = 40
#Открытая экспонента:
E = 3    #( НОД(55, 3) = 1)
#Закрытая экспонента:
d = 27    #(3 * 27) mod 40 = 1
closeKey: 55 27
openKey: 55 3

#Зашифруем число 65:
65^3 mod 55 = 10
#Расшифруем:
10^27 mod 55 = 10

Why does it decode incorrectly?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
H
hint000, 2019-04-08
@DVoropaev

65 cannot be encrypted, the number must be between 0 and n-1

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question