• No results found

In this chapter very interesting analysis is presented based on the elliptic curves and RSA results. The results are obtained from the ECC and RSA applications that are developed during the research work. All the results obtained are based on the DELL Optiplex P4 with 128 MB RAM, results may vary if application is tested on different platform and operating system.

8.1 ECC results

In the Table 8.1, curves of different bit lengths are tabulated against the execution time of different functions of ECC such as key generation, encryption and decryption time. The plaintext data size in this case is 9693 bytes. Analysis of the key generation cost against curves concludes that both are directly proportional. Key generation cost also increases as the increase in bit length of curve.

Curve Key generation

time (milli sec.) Encryption time(milli sec.) Decryption time(milli sec.)

NIST 163 125 265 250

NIST 233 328 578 500

NIST 283 328 922 922

NIST 409 704 1953 1781

NIST 571 1485 4594 4750

Table 8.1 ECC key generation, encryption and decryption cost.

Analysis of the encryption cost against curves concludes that both are directly proportional. Encryption cost also increases as the increase in bit length of curve but this increase is more exponential then key generation cost.

Analysis of the decryption cost against curves again gives an idea that both are directly proportional. Decryption cost also increases as the increase in bit length of curve but this increase is too much exponential as compared with other two costs.

As a result of ECC, we can conclude that key generation is the least costly process in ECC, but encryption and decryption takes much more time. Hence it is best practice to encrypt only small session key and not to encrypt the whole message with elliptic curves.

The results that we have discusses so far are also presented in graphically in Figure 8.1 for easy visual representation.

0 500 1000 1500 2000 2500 3000 3500 4000 4500 5000

NIST 163 bit NIST 233 bit NIST 283 bit NIST 409 bit NIST 571 bit

Key generation time (milli seconds) Encription time (milli seconds) Decription time (milli seconds)

tim

e

(m

s)

Figure 8.1 ECC key generation, encryption and decryption cost.

8.2 RSA results

In the Table 8.2, key length are tabulated against the execution time of different functions of RSA such encryption and decryption cost. Analysis of the encryption cost against key length gives an indication that encryption seems to be a constant function against key length as encryption time is always around 15 milliseconds, even if we continue to increase the key length.

The message size that is to be encrypted also increases as the key size increases. For example 1024 bit key is secure only for 86 bytes message. Hence the data size is also directly proportional to key length.

Analysis of the decryption cost against key length indicates that both are directly proportional. Decryption cost also increases as the increase in bit length of key but this increase much exponential as compared with other two costs.

As a result of RSA, we can conclude that RSA encryption time remains constant while the bit length increases, but the decryption cost increases rapidly.

Key length(bits) Encryption time (ms) data size (bytes) Decryption time (ms)

512 bits 16 22 1

1024 bits 15 86 15

2048 bits 15 214 78

4096 bits 15 470 438

8192 bits 15 982 2625

Table 8.2 RSA encryption and decryption cost

The results of RSA encryption and decryption are also presented in graphically in Figure 8.2 for easy visual representation.

0 500 1000 1500 2000 2500 3000

512 bits 1024 bits 2048 bits 4096 bits 8192 bits

Encryption time (milli sec) data size (bytes)

Decryption time (milli sec)

tim

e

(m

s)

Figure 8.2 RSA encryption and decryption cost

In the Table 8.3, key length is tabulated against the execution time of key generation function of RSA. The key generation time is highly exponential that’s why we have tabulated it separately. The analysis shows that key generation is directly proportional and increases at an exponential rate as the key length increases. This is the most interesting fact that we have obtained so far about RSA. It shows that the key generation process in RSA is really very time consuming process and is the most costly process. For example for 8192 bit key it takes about 116.891 seconds or approximately 2 minutes.

1024 bits 141

2048 bits 531

4096 bits 63844

8192 bits 116891

Table 8.3 RSA key generation cost

The results of RSA key generation is also plotted in the following plot, i.e., Figure 8.3 Key generation time(milli sec)

0 20000 40000 60000 80000 100000 120000 140000

512 bits 1024 bits 2048 bits 4096 bits 8192 bits

tim

e

(m

s)

Figure 8.3 RSA key generation cost

The same results as plotted in Figure 8.3 that is RSA key generation time is again plotted as a 3 dimensional bar graph in Figure 8.4 The reason to plot another 3D bar graph is to clarify that decryption time is not equal to zero in case of 512 bits and 1024 bits of data. The values under consideration in Figure 8.3 look like zero although it has some as also shown in Table 8.3.

512 bits

1024 bits

2048 bits

4096 bits

8192 bits

Key generation time(milli sec) 0 20000 40000 60000 80000 100000 120000

Key generation time(milli sec)

Key generation time(milli sec)

Figure 8.4 RSA key generation cost

8.3 Comparison of ECC and RSA

The results presented in Table 8.1 for ECC is not comparable to RSA because data size for the plaintext was different. For the comparison of ECC and RSA we have regenerated the results for both ECC and RSA based on the same data size, (i.e., 22 bytes) which is represented as Table 8.4 and Table 8.5.

Curve Key generation

time (ms) Encryption time (ms) Decryption time (ms)

NIST 163 291 521 470

NIST 233 530 112 2 1082

NIST 283 731 2013 2053

NIST 409 1563 4396 4026

NIST 571 3695 11206 11858

Table 8.4 ECC key generation, encryption and decryption cost (22 bytes) Key length (bits) Key generation

time(ms) Encryption time (ms) Decryption time (ms)

512 bits 100 30 30

1024 bits 370 30 50

2048 bits 4736 20 110

4096 bits 10224 30 531

8192 bits 417330 30 3115

Table 8.5 RSA key generation, encryption and decryption cost (22 bytes) Key lengths of 160 bit as in ECC ensure the security of a RSA key of 1024

tim

e

(m

generation time of 1024 bit RSA keys is 370 ms whereas it is 291 ms as compared to NIST 163 bit keys. It means that ECC key generation process is 1.2 times faster. For easy visual representation comparison is also shown graphically in Figure 8.5.

Also as we can see from Table 8.1, that NIST 160 bit curve is secure enough to encrypt huge data of 9693 bytes in RSA 1024 bit keys can only manage data up to 86 bytes. If we increase the data more than 86 bytes, then application will throw an error that message is too long for this key.

tim e (m s) 0 100 200 300 400 500 600 ECC key

generation encryptionECC decryptionECC generationRSA key encryption RSA decryption RSA

Figure 8.5 ECC 160 bit vs. RSA 1024 bit

On the other hand we can see that encryption and decryption costs of RSA are much lower than its equivalent of ECC, i.e., NIST 160 bit. This proves that ECC encryption and decryption are highly computation intensive processes. Encryption of RSA is 17.3 times faster than ECC similarly RSA decryption is also 15.6 times faster. That’s why in our application we have used ECC to encrypt 128 bit session key which is an effort to make it cost effective.

Note that results of Table 8.4 and Table 8.5 are generated on a system having Celeron 700 MHz processor with 256 MB RAM.

8.4 Relative cost of equivalent key sizes in RSA and ECC

Symmetric

Key ECCKey RSA Key Time to Break Memory

56 112 430 less than 5 minutes Trivial

80 160 760 600 months 4 Gb

96 192 1020 3 million years 170 Gb

128 256 1620 1016 yrs 120 Tb

As we can also see from Table 8.4 [16] that the key length of RSA is far larger as compared with the ECC key lengths and hence it gives more memory overhead for a secure message transmission such as 1620 bit key length of RSA.

As we can see from the data that is generated by our ECC messaging application, as the no of bits increases the time to generate the keys, encryption time and the decryption time increases.

The Key generation time is always very small as compared to encryption and decryption time. In our application we have used ECC only to encrypt a small session key and for actual encryption of plaintext we have used the symmetric key encryption as it is always fast for lengthy messages as compared with public key encryption scheme of ECC. This also proves that our adopted methodology is also the most cost effective way that combines the advantages of both of the symmetric and asymmetric key cryptography.

Figure 8.6 Time to break ECC and RSA

The graph in Figure 8.4 shows how long should it take to break the ECC and RSA cryptosystems of different key length [18]. The hard problem of RSA is factorization of a large integer while solving the discrete logarithm problem [25] is

RSA

ECC

1E+36 Time to break (MIPS years)

K ey s iz e (b its ) 1E+20 1E+12 1E+8 10000 1000 0 7000 6000 5000 4000 3000 2000

shorter then RSA. In other words, ECC provides a more secure cryptosystem for the same key length as RSA.

8.5 Important considerations:

Most of the results are generated on Pentium 4 (Dell Optiplex GX 240) system having 256 MB RAM. It is very important to take the hardware as an important factor in the results generation because all the costs including key generation cost, encryption cost and decryption cost depends on the hardware used. For instance if RAM or processor speed is lower then the test system used in our case then time taken for encryption, decryption and key generation maybe much higher then our calculations. . If you are using a different hardware to regenerate the results again of the secure ECC messaging application then your results may vary according to the hardware configuration that you are using.

Chapter 9

Related documents