0% found this document useful (0 votes)
161 views

HW 5

This document summarizes an assignment on number theory, public key cryptography, and RSA. It includes problems from course materials on public key cryptography, the RSA cryptosystem, and the Diffie-Hellman key exchange. It works through problems on topics like the Euclidean algorithm, Fermat's little theorem, and encrypting/decrypting messages using RSA with given public and private keys.

Uploaded by

api-484620426
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
161 views

HW 5

This document summarizes an assignment on number theory, public key cryptography, and RSA. It includes problems from course materials on public key cryptography, the RSA cryptosystem, and the Diffie-Hellman key exchange. It works through problems on topics like the Euclidean algorithm, Fermat's little theorem, and encrypting/decrypting messages using RSA with given public and private keys.

Uploaded by

api-484620426
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Coding Theory and Cryptography: HW 5

Paridhi Latawa

April 2021

Abstract

This assignment covers number theory, public key cryptosystems, and


RSA. 1. Module: Public Key Cryptography and the RSA Cryptosystem,
pages 7 - end. Problems: 6, 8, 10, 11, 12, 14, 15, 16, 17, 18, 19 2. Trappe
and Washington: 3.1 - 3.6, 6.1 Problems: Pages 104-5 - 4, 8, 9, 12, 13, 14,
16. Pages 192 - 3: 1, 2, 3, 4, 5, 6, 7, 8 3. Hankerson: Section 12.2 4. Video:
Public Key Cryptography - Diffie-Hellman Key Exchange

1 Public Key Cryptography and the RSA Cryptosystem


Problem 6: Suppose a|x and a|y. Show that a|(x ∗ n + y ∗ m) for any integers n
and m.
x = k1 a, k1 ∈ set of integers
y = k2 a, k2 ∈ set of integers
nx = n ∗ k1 a my = m ∗ k2 a (nx + my) = nk1 a + mk2 a = (k3 + k4 )a (nx + my) = k5 a
So, a|(nx + my)
Problem 8: Show that if a|bc and (a, b) = 1, then a—c
(use the fact that 1 can be written as a linear combination of a and b)
Use the theorem ax + by = gcd(a, b)
gcd(a, b) = 1
So
k1 a + k2 b = 1
Multiplying both sides by C

1
k1 ac + k2 bc = c
Since a divides bc (given), a|bc and a divides k, ac and a|k2 bc, so k|c
Problem 10: Show that a zero divisor in Zn does not have a multiplicative inverse
a ∗ b = 0, a and b are zero divisors
Assume (a ∗ b)−1 exists
(a ∗ b)−1 ∗ (ab) = 0, since a ∗ b = 0
Which is a contradiction since if multiplicative inverse exists, then (a∗b)−1 ∗(ab) =
1, but here it’s 0
So,
(ab)−1 does not exist
Problem 11: Find φ(11). What is φ(p) for a prime number p?
φ(11) = 10 as we can have 1, 2, 3, 4, 5, 6, 7, 8, 9, 10.
φ(p) = p − 1
Problem 12:
Order of:
4=3
5=6
7=3
8=2
Others are
1, 2, 4, 5, 7, 8
Problem 14: Prove part a of the above theorem.
For a prime p, and a positive integer r, φ(pr ) = pr − pr−1 = pr−1 (p − 1)
The gcd(q, pr )can by multiples of p - eitherp0 , p1 , p2, ..., pr
If gcd(q, pr ) doesn’t equal 1, then q is a multiple of p
All the multiples of p are less than or equal to the multiples of pr - 1p, 2p, 3p, ...,
pr−1 p, which means total pr−1 multiples
The total multiples are pr

2
So the other multiples with gcd = 1 are pr − pr−1
So, φ(pr ) = pr − pr−1 = pr−1 (p − 1)
Question 18:
Deciphertext - [78537025780917214308351108661157,6192349888138720544404835244]

2 Trappe and Washington: 3.1 - 3.6, 6.1


Pages 104-5: Problem 4: a) Use the Euclidean algorithm to compute gcd(30030,
257) The Euclidean algorithm consists of a series of division that can be written
in the following forms: a = q1 b + r1 and the numbers are shifted such that the
order is remainder, divisor, divided, ignore. 30030 = 116 * 257 + 218
257 = 1 * 218 + 39
218 = 5 * 39 + 23
39 = 1 * 23 + 16
23 = 1 * 16 + 7
16 = 2 * 7 + 2
7=3*2+1
2=2*1+0
So gcd(30030, 257) = 1
b) Using the result of part a and the fact that 30030 = 2 ∗ 3 ∗ 5 ∗ 7 ∗ 11 ∗ 13, show
that 257 is prime.
257 would have to be divisible by prime numbers less than 16 approximately for
it to not be prime. These values are what are the factors of 30030. The greatest
common denominator of 30030 and 257 (as shown in part a) is 1 though, so 257
has to be prime.
Problem 8: Let p ≥ 3 be prime. Show that the only solution to x2 ≡ 1 (mod p)
are x ≡ +/ − 1 (mod p).
Given the hint, we are told to apply exercise 7a to (x + 1)(x − 1), so we can rewrite
this statement as (x + 1) (x - 1) = 0 (mod p).
This can be written as
(x + 1) = 0 (mod p)

3
(x - 1) = 0 (mod p)
Simplifying these equations, we get x = - 1 or x = 1, which proves the statement.
Problem 9: Suppose x ≡ 2 (mod 7) and x ≡ 3 (mod 10). What is x congruent to
mod 70?
We basically have to find values of x (multiples) that can fit both the congruences
given.
The properties of the desired values are that when multipled by 7, the ones digit
should have a value of 1, such that when 2 is added to the value (satisfying the first
congruency), it will have a ones digit value of 3 (satisfying the second congruency).
Possible values that x can be congruent to mod 70 include 23, 163, 233, 303.
Problem 12: Divide 210203 by 101. What is the remainder?
Basically this question is asking what we get when computing 210203 (mod 101)
It should be noted that 101 is a prime number.
From Fermat’s theorem, we know that 21 00 ≡ 1 (mod 101)
So, we can write
210203 ≡ (2100 )102 (23 ) ≡ 11 02(23 ) ≡ 8 (mod 101)
Problem 13: Find the last 2 digits of 123562
The last two digits can be found by taking mod 100.
Problem 14: a) Evaluate 77 (mod 4)
b) Use part a to find the last digit of 777 , noting that abc = a( bc ).
Fining the last digit is mod 10.
This can be written in the equation form of 77 = 3 + 4k.
Euler’s theorem tells us that φ(10) = 4
So the above function can be broken into
777 = (74 )k (73 ) = 1k ∗ 73 = 343 = 3 (mod 10)
Problem 16:
a) Let p = 7, 13, or 19. Show that a1728 ≡ 1 (mod p) for all a with pa.
ap − 1 ≡ 1 (mod p) if p is not divisible by a.

4
We can input the values of p given into the above equation
a7−1 ≡ 1(mod 7)
a6 ≡ 1 (mod 7)
a1728 = (a6 )288
1188 = 1 (mod 7)
a13−1 ≡ 1(mod 13)
a12 ≡ 1(mod 13)
a1728 = a12144 = 1144 (mod 13)
a19−1 ≡ 1(mod 19)
a18 ≡ 1(mod 19)
a1728 = (a18 )96 = 196 = 1(mod 19)
b)
p=7
a1729 = a1728 ∗ a
a1728 = 1 (mod p)
a mod p = a
Pages 192 - 3: 1. The ciphertext 5859 was obtained from the RSA algorithm using
n = 11413 and e = 7467. Using the factorization 11413 = 101 * 113, find the
plaintext.
φ(n) = (p − 1)(q − 1) = (101 − 1)(113 − 1) = (100)(112) = 11200
From section 6.5, we can get that 7467−1 mod 11200 = 3.
We can then take
58593 = 1415 (mod 11413) as we are taking mod n
So, the plaintext is the word 1415

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy