Sunteți pe pagina 1din 2

Linnaeus University

Department of Mathematics
Marcus Nilsson
Per-Anders Svensson

Mathematical Cryptography, 4MA423


Assignment 1, 2019

Instructions
• The solutions are handed in individually. It is not allowed to copy (parts
of) existing solutions in any way. Of course you may discuss the problems
with fellow students on the course, but try to work independently as much
as possible.

• The solutions should preferably be written using a word processor or a


typesetting program, e.g., LATEX. The steps and arguments of your solu-
tions must be carefully justified. Also be careful to present your solutions
in such a way, that they will be easy to follow.
• If you have used a computer program to solve some of the tasks, a pro-
gram listing of should be supplied, adjoined with a documentation of the
program code. You may use any programming tool of your choice, but
some kind of a mathematical software tool is recommended, such as for
example Matlab or Mathematica.
• Hand in the assignment via the mailbox for the assignment in MyMoo-
dle. The recommended deadline is March 5. The absolute deadline is
March 26. Don’t forget to enclose your name with your solutions!

1
Problems
1. Solve the congruence equations

3x ≡ 116 (mod 281) and 10x ≡ 174 (mod 313)

by using a combination of Shank’s Baby-Step-Giant-Step algorithm and


Pohlig-Hellman’s algorithm.
2. Alice and Bob want to decide a four-digit code for a combination padlock
that they share, by using Diffie-Hellman’s protocol with the parameters
p = 10007 (a prime) and g = 5 (a primitive root modulo p). They agree
that the common number that they both will compute when this protocol
is used, will serve as the combination.
According to the protocol, Alice and Bob should independently select
secret numbers by random. Suppose Alice’s choice is a = 125. What
number b did Bob choose, if the padlock combination determined by the
protocol turns out to be 3141?
3. (a) Choose a suitable prime p, 3000 < p < 3500, to be used for the
ElGamal cryptosystem, for example by using the Miller-Rabin test.
Also find a primitive root g modulo p. Explain your method and
motivate your choices.
(b) Alice wants to send a message to Bob by using the ElGamal cryp-
tosystem with the parameters p and g from (a). The message should
consist of in total four letters (a-z) and they should be encoded ac-
cording to the encoding scheme a ↔ 01, b ↔ 02, . . . , z ↔ 26.
Perform the computations Alice and Bob must do to encrypt and
decrypt the message.
4. Factorize the integer 2896753 by using
(a) Pollard’s rho-method.
(b) Pollard’s p − 1-method.
(c) (*)The quadratic sieve.
5. An RSA cryptosystem with the public key n = 2896753 and e = 791 is
used for sending messages between Edward S and Julian A. You man-
age to eavesdrop their communication and find the following piece of the
ciphertext

1655637 2581947 487259 383654 2285010 883585 281800 602993


649955 1751820 721439 911097.

You also know that they are using the same encoding scheme as in ques-
tion 3b. Find the plaintext.

S-ar putea să vă placă și