In this paper, the authors had seen knowledge about number theory which is very essential in implementation of cryptographic algorithm, public key and private key algorithm these are main part of this paper. They discussed some part of elliptic curve cryptography and security. Hence, they conclude that by using above algorithms, security in 'Text file' as well as 'PDF file the cryptographic algorithms are implemented using java. The input and output of each algorithm is shown in the screen shot. The algorithm was also used for developing "PDF-encryption" application.