This project presents a comparative study of two cryptosystems, Data Encryption
Standard (DES) and the Rivest-Shamir-Adleman (RSA) schemes. DES is a symmetric (or
private) key cipher. This means that the same key is used for encryption and decryption. RSA, on
the other hand, is an asymmetric (or public) key cipher, meaning that two keys are used – one for
encryption and the other for decryption. The objective of this project is to implement these two
schemes in software. The program is written in the Java™ language. It generates a key form a
passphrase given by the user, encrypts and decrypts a message using the same key, for the case
of DES. In RSA, decryption is done by computing the decryption key from the encryption key.
Finally, the program returns the time taken to encrypt and decrypt a message.
DES is much faster in producing a cipher text and the original plain text compared to
RSA. This is because DES is mostly a substitution cipher, and therefore it is not computationally
intensive. RSA is based on mathematical functions and depending on the keys and message size,
the numbers involved can be very large. Due to its resource requirements, RSA is not suitable for
use in small mobile devices. Its security is, however, guaranteed, depending on the choice of
parameters  and . DES is secure only if the plain text is valid for such a time that a
cryptanalyst with unlimited resources would be insufficient to produce the plain text without the
benefit of the correct key. This is done by testing all the 2 possible keys.
This project, therefore, presents a comparative study of DES and RSA in terms of
encryption and decryption times. The results were observed, analyzed and compared so as to
identify which method is appropriate to a particular need.