Discrete Mathematics - Number Theory Exercises
Discrete Mathematics - Number Theory Exercises
(a)
2403 + 791 + 688 + 4339
10
(b) 1 + 1110 + 11110 + · · · + |11 {z
· · · 1}
100times
2. Find
3. Find
4. Jesper has 44 boxes of soda in his truck. The cans of soda in each box
are packed oddly so that there are 113 cans of soda in each box. Jesper
plans to pack the sodas into cases of 12 cans to sell. After making as
many complete cases as possible, how many sodas will Jesper have
leftover?
Use modular arithmetic to solve the problem.
(a) 119
(b) n! − 1
(c) 22000 + 1
(d) n4 + 4
(a) 7, 8, 9, 11
(b) 14, 15, 21
(c) 235 − 1 and 22015 − 1
9. What are the greatest common divisors and the least common multiple
of these pairs of integers?
10. Find the greatest common divisors of the following pairs using Euclid’s
algorithm and prime factorization theorem.
14. If a · 133 − m · 277 = 1, does this guarantee that a has an inverse mod
m? If so, what is it? If not, why not?
20. Knowing that Alice sent a message to Bob using multiplication mod
n = 103 with the common key a = 16. Assume that Bob receives the
message m = 21. What is the original message that Alice sent Bob?
21. In Turing’s cipher, version 1, suppose that the adversary got two nu-
meric encrypted message y1 = 4307 and y2 = 7373.
23. In Turing’s cipher, version 2 given modulus n = 63. Suppose that the
adversary knows both plaintext and ciphertext x = 55 and y = 25
respectively.
(a) Find the common private key e;
(b) Decrypt the numeric message y = 31.
25. The first nine digits of the ISBN-10 for the fifth edition of the book
”DMAäre 0 − 07 − 119881. What is its check digit?
26. Encrypt the message CRIZZLY BEARS using blocks of five letters
and the transposition cipher based on the permutation of {1, 2, 3, 4, 5}
with σ(1) = 3, σ(2) = 5, σ(3) = 1, σ(4) = 2, σ(5) = 4
27. Decrypt the message EABW EFRO ATMR ASIN which is the ci-
pher text produced by encrypting a plaintext message using the trans-
position cipher with blocks of four letters and the permutation σ of
{1, 2, 3, 4} defined by σ(1) = 3, σ(2) = 1, σ(3) = 4, σ(4) = 2.
29. Suppose the RSA modulus n = p.q is the product of distinct 200 digit
primes p and q. A message m ∈ Zn is called dangerous if gcd(m, n) = p,
because such an n can be used to factor n and so crack RSA. Circle
the best estimate of the fraction of messages in Zn that are dangerous:
1 1 1 1 1 1
, , , , , .
200 400 20010 10200 40010 10400
31. Bob and Alice want to choose a key that they can use for cryptography,
but all they have to communicate is a bugged phone line. Bob proposes
thay they choose a secrete number, a for Alice and b for Bob. They
also choose, over the phone a prime number p with more digits than
any key they want to use, and one more number q. Bob will send Alice
bq mod p, and Alice will send Bob aq mod p. Their key (which they
keep secrete) will then be abq mod p. Here we don’t worry about the
details of how they use their key, only with how they choose it. As Bob
explains, their wire tapper will know p, q, aq mod p, and bq mod p,
but will not know a or b, so their key should be safe. In this scheme
safe, that is can the wiretapper compute abq mod p? If so, how does
she do it? Alice says ”You know, the scheme sounds good, but would
not it be more complicated for the wire tapper if I send you q a mod p,
you send me q b mod p and we use q ab mod p as our key.” In this case,
can you think of a way for the wire tapper to compute q ab mod p? If
so, how can you do it? If not, what is the stumbling block?