Math HL 2020 IA On Cryptography
Math HL 2020 IA On Cryptography
RATIOANALE:
Messaging applications sometimes say ‘your messages are protected by end-to-end
encryption’. What does that mean? This is where my curiosity started. I had heard the
terms, ‘coding’, and ‘encryption’ but never learned about it in detail. After a little
research, I found that the topic had a strong mathematical foundation. Thus, my
curiosity took the form of this investigation.
My Investigation Question is ‘What are RSA encryption and Elliptical curve cryptography
(with respect to Diffie-Hellman Exchange) and how do they compare with each other?’
The investigation explores two important public key encryption methods called the RSA
encryption and Elliptical Curve encryption. These are compared and contrasted at the
end, with respect to their procedure, application in the real world and strategic
advantages.
I would not be exaggerating when I say that this investigation was genuinely enjoyable.
The learning was immense and interesting. This investigation has aided me explore my
curiosity to a reasonable depth and has been an insightful experience
2
TABLE OF CONTENTS:
5. Conclusion --------------------------------------------------------------------------------------12
6. Limitation ------------------------------------------------------------------------------------------13
7. Extension------------------------------------------------------------------------------------------13
8. Bibliography----------------------------------------------------------------------------------13-14
3
1. INTRODUCTION TO CRYPTOGRAPHY:
”Cryptography involves one genius trying to work out what another genius has
done.”
(MAI JIA: Decoded)
Data in today’s world is being constantly shared, sent and received. Some of
this data is sensitive and needs to kept private, thus is not safe to share
publicly. This is easy if people sharing know each other, but what if they
don’t?
For example, a customer from India,
David wants to buy a shirt from a
Brazilian retailer, Anne. Payment is
made online, which mean sensitive
information like the customer’s name,
Card security details are being shared
over the internet. Figure 1: Basic cryptography
This data needs to hidden and protected from potential eavesdroppers like
Elle and this is where cryptography comes in handy.
Cryptography is defined as a “technique of securing information and
communications through use of codes so that only those person for whom the
information is intended can understand it and process it.”1
2. RSA CIPHERS:
RSA is a type of public key encryption cipher named after its authors Ron Risvest, Adi
Shamir and Leonard Adleman in 1977 7
Accessed 02.01.2020
9 ‘An Introduction to Modular Arithmetic’, NRICH, 2019, https://nrich.maths.org/4350, Accessed 02.01.2020
10 ‘Prime Factorisation’, MathIsFun, 2017, https://www.mathsisfun.com/prime-factorization.html, Accessed 02.01.2020
5
35 = 5 X 7
The prime factorization is unique to every number
and this is called the Fundamental Theorem of
Arithmetic or Unique Factorization Theorem11
Another interesting property of prime factorization
is its time complexity. As the number increases, the
time taken to calculate in prime factorization
increases drastically. This is a type of one way
function i.e easy on one way, hard when tried the
other way around. Figure 2: One way function
DLP is a one way function used in public key encryption including RSA. It uses
the modulus function.
The basic principle is that modular exponentiation is a one way function.
i.e. for ab mod c = x,
x can be easily calculated , but when given a, x and c , it is relatively hard to
calculate b i.e. it takes a relatively longer time.
Accessed 02.01.2020
13 Kosek, Amy, ‘An exploration of Mathematical Applications in Cryptography’, Ohio State University, 2015
6
Let us consider two people David and Anne. David wants to share a secret with
Anne but Ella is trying to steal the secret. So, he decides to use the RSA
encryption method to safely share her secret.
Therefore, we have
P1
P2
e
n = p1 x p2
Ф(n) = Ф(p1) x Ф(p2)…….. by 2
Ф(n) = (p1-1) (p2-1)………..by 1
( e−1)n+1
d= ………………..by 3
e
7
m=8
P1 = 61
P2 = 67
e=3
n = p1 x p2
= 61 x 65
n = 4087
Ф(n) = Ф(61) x Ф(67)
Ф(n) = (p1-1) (p2-1)
= 60 x 66
Ф(n) = 3960
( 2)4087+1
d= = 2725
3
3.1. FIELDS
a. Point addition
b. Point doubling
2A(xa , ya ) = B(xb , yb )
Algebraically, we get:
3xa 2+A
Slope of the line joining A and B, s1= 2yd
2
xb = s1 − 2xa
yp = s1(xa − xb ) − ya
c. Scalar multiplication:
If Q = k P where k,Q ∈ Z Figure 6: Point doubling in EC
Cofactor is defined as the ratio between the total number of points on the curve
and the order of the generator
10
Ideally, h = 1
3.5. ECDLP
Let us consider David and Anne want to share a secret, but Elle is
eavesdropping.
David and Anne establish these parameters over a public network:
y 2 = x 3 + Ax + B
Generator point G
Cofactor h
Order of G = n
3.7. AN EXAMPLE
(The values in the example have been used from an elliptic curve worked out
beforehand)18
18Example from : Elliptic Curve Diffie Hellman’, Robert Pierce, YouTube, 10.12.2014, https://youtu.be/F3zzNa42-
tQ?list=PL75HnNTZApiY6Sjs0joCc8cQOjMkv7nh6, Accessed 02.01.2020
12
4. RSA Vs ECC:
- The difficulty of breaking a cipher is proportional to its key length. But, as per the
figure it can be said that for the same key length, ECC provides better security.
- Private keys for RSA are around 12 times larger than ECC keys in 128-bit level.
- RSA key generation is 100 to 1000 times slower in comparison to ECC key
generation.
5. CONCLUSION:
RSA and EC cryptosystems are both used in SSL (Security Sockets layer which is used
to establish encrypted link between server and client19). They provide secure
cryptosystems individually and are sometimes used in combination for better security.
Thus, the analysis of these cryptosystems is relevant for security systems in today’s
world.
But, as compared in section 4. It can be concluded that ECC is a more secure and
preferred crypto-cipher over RSA. Cryptography is a dynamic field coming up with
improvements every moment. Just as the security gets more sophisticated, so will the
methods to tamper with them. Hackers and intruders look into how these security
systems can be defeated. Thus, it is necessary that we come up with better security
options which is what cryptography is all about.
6. LIMITATIONS:
- The scope of this exploration is understand their core functioning and so the
breaking of the code hasn’t been explored.
- The example of ECC has been adapted from elsewhere as the method to
produce one was too complex for this paper. Thus, this could be worked out.
- A study of how the RSA and ECC are tried to be broken can be done. This will
provide a better understanding of the ciphers and their security.
- Another cipher called the Digital Signature algorithm could be explored and then
compared to RSA and ECC ciphers explored in this paper.
- “A cipher suite is a set of algorithms that help secure a network connection that
uses Transport Layer Security (TLS)”20. These typically include a key exchange
algorithm, a bulk encryption algorithm and a Message Authentication Code
algorithm, Thus, the RSA, DSA could be explored as a cipher suite and how they
work together.
8. BIBLIOGRAPHY:
‘Cryptography and its Types’, GeeksforGeeks, 07.07.2019,
https://www.geeksforgeeks.org/cryptography-and-its-types/ , Accessed 02.01.2020
20
‘Cipher Suite’, Wikipedia, https://en.wikipedia.org/wiki/Cipher_suite, 16.12.2019, Accessed 30.01.2020
14
Euler’s Totient Function and Euler’s Theorem’, Elementary Number Theory, 2019,
https://www.doc.ic.ac.uk/~mrh/330tutor/ch05s02.html, Accessed 02.01.2020