Vrijeme: 23:16
Kriptolanac | Cryptochain #5
Diffie-Hellman je metoda za sigurnu razmjenu ključeva preko kanala koji netko može prisluškivati. Osobe A i B međusobno komuniciraju. Prije toga su se dogovorile da koriste isti prosti broj
. Zatim osoba A odabere nasumičan broj
, izračuna
(ostatak pri dijeljenju
s
) i pošalje ga osobi B. Na isti način osoba B odabere nasumično
, izračuna
i pošalje ga osobi A. Osoba A je primila broj
od osobe B i zatim ga potencirala na svoj
, i dalje modulo
, a osoba B učinila je isto s primljenim
i, naravno, svojim
. Nakon ovog postupka obje su strane došle do istog broja
. U to se mogu uvjeriti na razne načine (jedan od njih je da uspostave šifriranu komunikaciju tako da iz tog broja izvedu ključ za šifriranje), a ako ne uspiju, to znači da je netko u komunikacijskom kanalu izmijenio njihove poruke.
. Zatim osoba A odabere nasumičan broj
, izračuna
(ostatak pri dijeljenju
s
) i pošalje ga osobi B. Na isti način osoba B odabere nasumično
, izračuna
i pošalje ga osobi A. Osoba A je primila broj
od osobe B i zatim ga potencirala na svoj
, i dalje modulo
, a osoba B učinila je isto s primljenim
i, naravno, svojim
. Nakon ovog postupka obje su strane došle do istog broja
. U to se mogu uvjeriti na razne načine (jedan od njih je da uspostave šifriranu komunikaciju tako da iz tog broja izvedu ključ za šifriranje), a ako ne uspiju, to znači da je netko u komunikacijskom kanalu izmijenio njihove poruke.Ti si presreo komunikaciju osoba A i B koje su koristile
i razmijenile sljedeće poruke:


Odredi tajni broj
koji su obje osobe izračunale nakon razmjene ključeva!
Diffie-Hellman is a method for securely exchanging keys over a channel that someone may be able to eavesdrop on. People A and B communicate with each other. Beforehand, they agreed to use the same prime number
. Person A then chooses a random number
, calculates
(the remainder when dividing
by
), and sends it to person B. In the same way, person B chooses a random number
, calculates
, and sends it to person A. Person A receives the number
from person B and then raises it to their own power
, still modulo
, while person B does the same with the received
and, of course, their own
. After this procedure, both parties arrive at the same number
. They can verify this in various ways (one of them is to establish encrypted communication by deriving an encryption key from that number), and if they fail, it means that someone in the communication channel has altered their messages.
. Person A then chooses a random number
, calculates
(the remainder when dividing
by
), and sends it to person B. In the same way, person B chooses a random number
, calculates
, and sends it to person A. Person A receives the number
from person B and then raises it to their own power
, still modulo
, while person B does the same with the received
and, of course, their own
. After this procedure, both parties arrive at the same number
. They can verify this in various ways (one of them is to establish encrypted communication by deriving an encryption key from that number), and if they fail, it means that someone in the communication channel has altered their messages.You intercepted the communication between people A and B, who used
and exchanged the following messages:


Determine the secret number
that both people calculated after the key exchange!