Java Code --------- ->I have modified the JAVA code for RSA to accept file (for message), probability factor of a number being prime, and key-size -> Also i have changed the output such that the program prints only parameter values for the RSA algorithm Shell Script ------------ I have created a shell script which calls "java program" with different parameteres which generates following summary information in three different files, namely, key_ana, file_ana and prob_ana. Analysis/Conclusion ------------------- 1) Analysis as a function of key-size (Times are in miliseconds) Key_Size : File_Size(b): Probability : KeyGen_time :Encry_time : Decry_time 8 :15 :10 :12 :3 :9 16 :15 :10 :14 :11 :24 64 :15 :10 :38 :28 :8<-- 128 :15 :10 :180 :34 :33 256 :15 :10 :302 :202 :200 512 :15 :10 :1241 :1426 :1407 1024 :15 :10 :15366 :10679 :10455 As shown in above table, as we increase the size of the key the time required for key-generation (col 4), encryption (col 5) and decryption (col 6) of given message increases exponentially. Also it can be seen that the time required for generating KEYs increases most rapidly(as compare to encryption and decryption time), this is due to difficulty in finding out large PRIME numbers. It is this difficulty which makes RSA a strong algorithm. Time required for encryption and decryption is almost same, which describes symmatric behaviour of RSA algorithm. The decryption time with key-size of 128 bit is suddenly decrease to 8. This may be due to the text of the message. 2) Analysis as a function of message size (Times are in miliseconds) Key_Size : File_Size (b): Probability : KeyGen_time :Encry_time : Decry_time 128 :15 :10 :203 :33 :30 128 :947 :10 :185 :2036 :2009 128 :2051 :10 :207 :4285 :4263 128 :3462 :10 :207 :7191 :7303 128 :3098 :10 :177 :10847 :11017 (GIF file) 128 :15868 :10 :193 :28685 :29874 (Binary file) Here the time required for encrypting and decrypting the messages increses. It almost doubles with doubling the message size. So from this data we can say that it is in linear relationship. But this may not be true for large amount of data or non-text data as observerd by second-last row. The fifth row is for a "gif" file which require almost 1.7 times more time than a text file of same size. The last row is for a binary file which is actually a binary file for C-CGI script. In conclusion the above result shows that for a given key size the time required to encrypt and decrypt the given message is almost double or more than the size of the message. 3) Analysis as a function of Probability factor (Times are in miliseconds) Key_Size : File_Size (b): Probability : KeyGen_time :Encry_time : Decry_time 128 :15 :0 :168 :58 :32 128 :15 :1 :188 :32 :34 128 :15 :2 :172 :33 :32 128 :15 :5 :160 :33 :34 128 :15 :8 :155 :31 :32 128 :15 :10 :175 :33 :32 The probability parameter does not seem to affect the encryption and decryption times as well as key-generation time. This is an experiment which may not be true in all cases.