International Journal of Engineering Trends and Technology (IJETT) – Volume 33 Number 7- March 2016 Video Encryption and Decryption using RSA Algorithm Merlyne Sandra Christina C#1, Karthika M*2, Vasanthi M#3, Vinotha B*4 Assistant professor and Student & Computer Science and Engineering & Anna University Saranathan College of Engineering, Punjapur, Trichy, Tamil nadu, India. Abstract―Advance in digital content transmission have increased in the past few years. Security and privacy issues of the transmitted data have become an important concern in multimedia technology. To maintain balance between computational time and security, proposed RSA algorithm has been used to selectively encrypt and decrypt the sensitive video. Using this approach, unauthorized viewing of the video file can be prevented. Also this algorithm provides a high level of security. Multimedia data is transmitted in various fields like military, commercial, medicine, which generally have sensitive data. To provide security while transferring the video over internet, we are using RSA algorithm. A comparative study of the proposed algorithm with other existing algorithms has been put forward in this paper to prove the effectiveness of the proposed algorithm. Key words— Upload, Encryption, Sending, Receiving, Decryption. I. INTRODUCTION Many techniques are needed to protect the shared data. The present work focus on cryptography to secure the video while transmitting in the network. Firstly the video which is to be transmitted from sender to receiver in the network must be encrypted using the encryption algorithm in cryptography. Secondly, by using decryption technique the receiver can view the original video. Multimedia applications such as Video onDemand, Video broadcast, multimedia mail and video conferencing must be provided with secure transmission. Secure video transmission means transferring or receiving a video with the assurance that any unapproved eavesdroppers along the way will not be able to get any information about or from that video. In that kind the video will be converted with some highly secured data. Here we are going to use the art of Cryptography which plays the vital role in security. The reverse of data encryption is data Decryption, which recuperate the original video. Here we are going to use RSA algorithm for security. Further explanations will be followed later in this paper. ISSN: 2231-5381 II. RIVEST-SHAMIR-ADLEMAN (RSA) ALGORITHM RSA is designed by Ron Rivest, Adi Shamir, and Leonard Adleman in 1978. It is one of the best known public key cryptosystems for key exchange or digital signatures or encryption of blocks of data. RSA uses a variable size encryption block and a variable size key. It is an asymmetric (public key) cryptosystem based on number theory, which is a block cipher system. It uses two prime numbers to generate the public and private keys. These two different keys are used for encryption and decryption purpose. Sender encrypts the message using Receiver public key and when the message gets transmit to receiver, receiver can decrypt it using his own private key [12, 13]. RSA operations can be decomposed in three broad steps; key generation, encryption and decryption. When the small values of p & q are selected for the designing of key then the encryption process becomes too weak and one can be able to decrypt the data by using random probability theory and side channel attacks. On the other hand if large p & q lengths are selected then it consumes more time and the performance gets degraded in comparison with DES. In order to overcome these drawbacks, we are using paging technique which improves the speed of encryption and decryption without degrading the performance of the system. 1. Choose two distinct large random prime numbers p & q such that p ≠ q. 2. Compute n= p × q. 3. Calculate: phi (n) = (p-1) (q-1). 4. Choose an integer e such that 1<e<phi(n) 5. Compute d to satisfy the congruence relation d × e = 1 mod phi (n); d is kept as private key exponent. 6. The public key is (n, e) and the private key is (n, d). Keep all the values d, p, q and phi secret. 3.1.2 Encryption Plaintext: P < n Ciphertext: C= Pe mod n. 3.1.3 Decryption Ciphertext: C Plaintext: P=Cd mod n. http://www.ijettjournal.org Page 328 International Journal of Engineering Trends and Technology (IJETT) – Volume 33 Number 7- March 2016 III. EXISTING SYSTEM Table I: Comparative Study of Existing and Proposed System Factors Created by Key length Rounds Block size Speed Security Algorithm Power consumption Deposit of keys Stimulation speed Trojan Horse Ciphering and Deciphering algorithm, Key exchange RSA(Paging) Ron Rivest, Adi Shamir & Leonard Adelmen Depends on number of bytes in the modules 1 DES IBM Variable Fast Excellent Asymmetric Medium 64 bits Slow Medium Symmetric low 10 or 12 or 14 128 bits Fast High Symmetric Medium Needed Needed Needed Faster Faster Faster No Same No Different Not proved Different Not needed Needed Needed 56 bits 16 AES Vincent Rijmen, Joan Daemen 128,192 or 256 bits A. Disadvantages in existing system Number of rounds in other existing system is more than proposed system. Process speed is lower in DES when compared with RSA. Need of memory space to deposit the keys used in AES and DES. Level of security of all the existing system is lower than proposed system. Encryption and decryption process in existing system is difficult. IV. been proposed in the literature and some have been used in real products. Achieving an efficiency, flexibility and security is a challenge of researcher. So we are using RSA algorithm to encrypt and decrypt the video. RSA is one of the first practical public-key cryptosystems and is widely used for secure data transmission. In such a cryptosystem, the encryption key is public and differs from the decryption key which is kept secret. In RSA, this asymmetry is based on the practical difficulty of factoring the product of two large prime numbers, the factoring problem. RSA is made of the initial letters of the surnames of Ron Rivest, Adi Shamir, and Leonard Adleman, who first publicly described the algorithm in 1978.In RSA algorithm asymmetric key is used whereas all other algorithm uses symmetric key. Since it used asymmetric key, there will be no way to hack the original video. If any person try to hack the video, it will be open as encrypted video. So the transaction will be highly secured. The video will be converted into several bytes. Then it will be encrypted using public key. After encrypting the encrypted video will be in the form of text. Then it will be send to the receiver using FTP (File Transfer Protocol). The receiver will receive the encrypted video and decrypt it by using private key. Here there is no need to exchange the key. Because receiver can compute their own private key.Separating audio and video track is quite complicated. So we are directly encrypt and decrypt the video without any separation. To speed up the encryption and decryption process Paging technique is used. In paging ,the video will be divided into several number of units .Then we apply RSA algorithm to each unit in order to encrypt. And the encrypted video of each unit will be saved in a text file concurrently. PROPOSED SYSTEM With the rapid development of various multimedia technologies, more and more multimedia data are generated and transmitted in the medical, commercial, and military fields, which may include some sensitive information which should not be accessed by or can only be partially exposed to the general users. Therefore, security and privacy has become an important. Over the last few years several encryption algorithms have applied to secure video transmission. While a large number of multimedia encryption schemes have ISSN: 2231-5381 Fig. 1: Overall diagram of video encryption and decryption http://www.ijettjournal.org Page 329 International Journal of Engineering Trends and Technology (IJETT) – Volume 33 Number 7- March 2016 B. Advantages in proposed system Fig. 2: Intruder Interruption Intruder may try to hake the video. But only the encrypted video will open. Original video will not be open. Number of rounds in proposed system is very less. Process speed of RSA is very high. Need not require memory space to deposit the keys used in proposed system. Level of security of proposed system is excellent. Encryption and decryption process in proposed system is easy to execute. C. Modules involved 1) Upload: This system will accept any type of video. The selected video path will be shown in the encryption phase. The uploaded video will then be converted into bytes and then send for encryption. Fig. 3: Architecture diagram of proposed system A. Activity Diagram Fig. 5: Uploading video 2) Encryption: In encryption the converted bytes of video will be used for applying RSA algorithm. After applying RSA algorithm the original video will be converted into an unreadable form called as encrypted video. Paging technique is used in our project. This technique will divide the video into number of units. After that encryption will be done for individual unit. Encrypted video of each unit will be of 128 bytes. Fig. 4: Activity diagram ISSN: 2231-5381 http://www.ijettjournal.org Page 330 International Journal of Engineering Trends and Technology (IJETT) – Volume 33 Number 7- March 2016 Fig. 6: Encryption process 3) Sending: After completing encryption the encrypted video is send to the destination by giving their corresponding IP address. This will be done by making use of File Transfer Protocol (FTP). Destination can be one or more than one people. Fig. 7: Sending video 4) Decryption: In the decryption phase the encrypted video will be received to the receiver. Receiver may or may not accept the incoming encrypted video. If the receiver accepted the video then he/she can decrypt the video easily by just clicking the decrypt button. If the receiver does not accept then the transaction will be failed and will show an error message at the sender side. Fig. 9: Saving video V. CONCLUSION Encryption algorithm plays very important role in communication security. Six modules are made, each for a specific purpose and will be interlinked to each other. Encryption and decryption modules are the main modules, converting video into the text form and send to the receiver. In decryption, again converting it into the original video. Our project can be used in any field to maintain the secure transaction. The very big advantage of our project is security. But it depends on the size of the prime. If high security is needed, we have to use big prime numbers. ACKNOWLEDGEMENT We are thankful and would like to express our sincere gratitude for our Head of the DepartmentMr. S Venkatasubramanian and oursupervisor Mrs. CMerlyne Sandra Christina for the guidance, support and continuous encouragement in making this project possible.Their guidance from initial to final level enabled us to achieve our objective of final year project. Our sincere thanks to all the Lecturers who helped us in many ways, gave valuable advises and made our journey easy. REFERENCES Fig. 8: Decryption process 5) Save: This module is used to save the incoming encrypted video in the system and also for saving the decrypted (original) video in the desired location. ISSN: 2231-5381 [1] A Secure Dual Encryption Scheme Combined with Steganography A Aswathy Nair#1, Deepu Job#2: # 1 PG Scholar, # 2Assistant Professor- International Journal of Engineering Trends and Technology (IJETT) – Volume 13 Number 5 – Jul 2014 [2] International Journal of Computer Applications (0975 – 8887) Volume 65– No. 4). Securing Video Data: A Critical Review Akansha Agrawal1, Virendra Singh2 M. Tech Research Scholar, Department of Computer Science, Indore Institute of Science and Technology-II, Indore, India. Assistant Professor, http://www.ijettjournal.org Page 331 International Journal of Engineering Trends and Technology (IJETT) – Volume 33 Number 7- March 2016 Department of Computer Science, Indore Institute of Science and Technology-II, Indore, India2. 1, March 2013 [3] A Real-time MPEG Video Encryption Algorithm using AESJayshriNehete K. Bhagyalakshmi, M. B. Manjunath, ShashikantChaudhari, T. R. Ramamohan. Central Research Laboratory [4] An Overview of Video Encryption Techniques -M. Abomhara, Omar Zakaria, Othman O. Khalifa. International Journal of Computer Theory and Engineering, Vol. 2, No. 1 February, 2010 [5] Dual-Layer Video Encryption using RSA AlgorithmAmanChadha, SushmitMallik, AnkitChadha, RavdeepJohar, M. Mani Roja. International Journal of Computer Applications (0975 – 8887) Volume 116 – No. 1, April 2015. [6] A Study Based on the Video Encryption Technique -Saurabh Sharma#1, Pushpendra Kumar Pateriya*2, Lakshmi#3. #1M.tech Student, *2Assistant Professor, #3M.Tech Student . Department of Computer Science Engineering . Lovely Professional University, Phagwara, India [7] Proposed Video Encryption Algorithm v/s Other Existing Algorithms: A Comparative Study. Ajay Kulkarni,SaurabhKulkarni,KetkiHaridas, Aniket.Vidyalankar Inst. Of Tech. Mumbai. [8] ”Data Security in Cloud Computing using RSA Algorithm”. - KalpanaParsi, SingarajuSudha. International Journal of Research in Computer and Communication technology, IJRCCT, ISSN 22785841, Vol 1, Issue 4, September 2012. pp. 145. [9] "Research and Implementation of RSA Algorithm for Encryption and Decryption", - Xin Zhou and Xiaofei Tang. The 6th International Forum on Strategic Technology, pp. 1118 – 1121, 2011.8 [10] A Study of Encryption Algorithms (RSA, DES, 3DES andAES) for Information Security -1Gurpreet Singh M.Tech Research Scholar, Department of Computer Science and Engineering ,Sri Guru Granth Sahib World University, Fatehgarh Sahib, Punjab, India. 2Supriya Assistant Professor, Department of Computer Science and Engineering , Sri Guru Granth Sahib World University, Fatehgarh Sahib, Punjab, India. [11] New Comparative Study Between DES, 3DES and AES within Nine Factors Hamdan.O.Alanazi, B.B.Zaidan, A.A.Zaidan, Hamid A.Jalab, M.Shabbir and Y.Al-Nabhani ISSN: 2231-5381 http://www.ijettjournal.org Page 332