Security is the very important principle of distributed systems. Security in distributed systems can be divided into two parts. One part concerns the communication between users and processes, possibly residing on different machines. The principal mechanism for ensuring secure communication is that of a secure channel and via authorization. In this research paper, we focus on the study of several encryption algorithms for security in distributed systems. The RSA algorithm has some important parameters affecting its level of security. It is shown here that increasing the modules length plays an important role in increasing the complexity of decomposing it into its factors. This will increase the length of the public key and the length of the encrypted message making it more difficult to be decrypted without knowing the decryption key. However the public key length has no major affect on the private key length. When the length of the message is changed then the length of the encrypted message will proportionally change, hence larger chunks are selected to obtain larger encrypted message to increase the security of the data in use.