1. Introduction
Internet Communication Security plays a phenomenal role in the daily usage of an average netizen. With Public-key cryptography systems such as Riemann-Shadmir-Adleman (RSA) and Elliptic Curve Cryptography (ECC), messages are able to be communicated safely and efficiently. The security behind these two systems are based on the nature of a trap-door function. This trapdoor function makes Encryption, the conversion of plaintext to ciphertext, manageable, while Decryption, the conversion of ciphertext to plaintext significantly more difficult and in some cases, mathematically impossible.
The basis behind a public-key cryptography system is the use of a public key as well as a private key. The public key is disseminated to the public, while the private key are only available to the owner. Public-Key Cryptography is widely used in various industries, especially social media platforms as well as banks. Due to the advent in technology, Bitcoin uses ECC to secure its digital currency. With the long history of RSA as compared to ECC which hackers are unfamiliar with. This essay will be looking to answer “To what extent is Elliptical Curve Cryptography (ECC) more reliable as compared to Rivest-Shadmir-Adleman?” To quantify the cryptographic strength of the two systems, implementation of Big 0 notation will be used so as to determine the time complexities.
2. Riemann-Shadmir-Adleman (RSA)
2.1 A Brief Understanding
RSA is the world’s most popular public-key cryptography system, it is commonly used to ensure the safe communication between two parties. RSA is classified under asymmetric algorithm due to the fact that it requires the computation of a pair of keys, the public key (Kpub) and private key (Kpriv). Up till 1978 the reliance of symmetric algorithm, both parties use the same key, was inefficient and needed secure channel to distribute the keys. Asymmetric algorithm and the diffie-hellman algorithm enables us to efficiently 88exchange cryptographic keys over a public channel. There are a number of key concepts which are essential to RSA: Modular Arithmetics; Euler Totient Theorem; Fermat's Little Theorem; Euler’s Theorem.
2.2 Modular Arithmetics
Modular Arithmetics also known as clock arithmetics is a system where integers go through a cycle. The introduction of a congruence relation in the form of mod n where the remainder (R) and
x = R( mod y )
422 mod 8
RSA is governed by the asymmetric algorithm and hence has a pair of keys, a public key and a private key. The public key (e,n) is used to encrypt the message while the private key (d) is used to decrypt the message (m) once it is transmitted to the other party. The public key is made of the modulus n and the public (or encryption) exponent e. The private key is made of the modulus n and the private (or decryption) exponent d which must be kept secret.
Encryption: me mod n = c
Decrypt: cd mod n = m
equation 2.1 and 2.2
Encryptions is the conversion of a plaintext (m) to ciphertext (c) while decryption is the conversion of ciphertext to plaintext. The encrypting and decrypting steps form what is known as a one-way trapdoor function. The equation for encryption makes decryption significantly challenging if the factors of the public key(n) is not known. So as to ensure the security of the system, the product of two primes are used to form a long series of numbers. Due to the fundamental theorem of arithmetics, any number greater than 1 can be written in exactly 1 way as a product of prime number. It is significantly more manageable to use two primes (,)to find a large integer (), compared to using the integer()to find the prime number(,)that it is comprised of.
=
=
equation 2.3 and 2.4
2.3 Selecting the value of n
Setting up a RSA cryptography system requires choosing the values of the private and public keys (d,e,n). The value of n is the product of two large prime numbers, creating a series of numbers (eqn 2.3). The magnitude of n is proportional to the cryptographic strength of the system, making it harder for computers to be able to find the prime numbers it is comprised of. Today, with the advent of technology, companies have been adopting 2048-bit (22048) and 4096-bit (24096) numbers so as to maximise security.
2.4 Euler’s Totient Function
Euler Totient function is based of the mathematical constant (). represents the number of positive integers up to a given integer n that are relatively prime to n. Prime numbers are unique for the sole reason that the value of phi for a number is 1 less than its magnitude. (eqn 2.5) Prime numbers do not share a factor with any number besides 1 hence
(prime number(n))=n-1
2
3
5
7
11
Due to the fact that is also multiplicative, (x)(y) =(xy) is also true.
2.5 Extended Euclid Algorithm (Selecting the value of d)
The value of the private key (d) is the inverse of e mod. To solve for the value of d we would need to pick a value of e. The value of e is an integer that is greater than 2. Using e, Extended Euclid Algorithm is used to determine the value of d.
e d mod= 1 , e > 2
In the case where p = 89, q = 107 and e = 3,
n = 89 x 107
= 9523
= (89-1)(107-1)
= 9328
9328
9328
Divide
E = 3
Subtract
3109
1 x 3109 = 3109
Remainder
1
9328 – 3109 = 6219
When the remainder is 1 on the left column, the value on the right column next to it is the value of d. Where
3(6219 mod 9328) = 1
2.6 Fermat’s Little Theorem and Euler Theorem
Fermat’s little theorem states that
If P is prime, then for ant integer a, ax-1 -1 is divisible by x. This can be written into
ax-1-10 mod x
Such that for a = 3 and x = 11,
310 – 10 mod 11
(59049 – 1)11= 5368
if P is prime, then for any integer a, ax – a is divisible by x. This can be written into
ax a mod x
Such that for a = 3 and x = 11,
311 3 mod 11
1771473 = 59049
This can be further linked to the special case known as Euler’s Theorem, that for any integer N and a where both integers are coprime. This is essential in the construction of RSA.
a(n)1 mod n
Since the above is true, the following will also be true,
a(m)1 mod m
a(mn)1 mod m
3.1 Application of RSA
With the understanding of the above 4 mathematical theorems we are able to use RSA as a form of public key cryptography. The method of transferring information can be denoted by an analogy of a key, box and a lock.This is known as the diffie-hellman key exchange which works on the basis that instead of giving every sender a key, the receiver gives every sender the same lock which only he holds the key to.
3.2 Example
Using the attribution of numbers to alphabets a to z, where
a
1
n
14
b
2
o
15
c
3
16
d
4
q
17
e
5
r
18
f
6
s
19
g
7
t
20
h
8
u
21
i
9
v
22
j
10
w
23
k
11
x
24
l
12
y
25
m
13
z
26
For example if Jane wanted to send the message “math” to Peter. She would encrypted as 131208, to convert into a secured code using Kpub,
e = 3, n = 9523
Encryption: 1312083 mod 9523 = 6020
The code received by Peter can be decrypted using Kpriv which only he has access to,
Decryption: 60206219 mod 9523
Through this process the receiver is able to get the message through secure means across the public channel.
4.1 Elliptic Curve Cryptography (ECC)
ECC is another form of public key cryptography, which features a type of cubic curve, whose solutions are confined to a limited space. It features a trapdoor function similar to that of RSA, having a Kpriv as well as a Kpub. Despite its existence in the 1980s, this method of encryption was not widely used till today. NSA as well as several US governmental agencies has implemented ECC.
4.2 A Brief Understanding
ECC makes use of functions that are symmetrical across the x-axis by which a set of parameters are laid out so as to convey the message from the sender to the receiver in a manner that no one without the Kpriv can intercept the message. The trapdoor functions works due to the fact that the number of times the points are ‘dot’ is unknown to any third party. This makes it not feasible to divide the multiplication and find the specific point that it was multiplied from, this is known as the elliptic curve discrete logarithm problem and is of large computational complexity.
4.3 Parameters
The parameters are defined p,a,b,G,n,has where p represented the field that the curve is defined over. A and B represented the constants which define the curve. G is the generator point, which essentially is the starting point of the curve. n is the prime order of G and is the smallest prime number such that nG is equivalent to the elliptic identity. h is the cofactor, the number of points over the curve.