Malaya Journal of Matematik, Vol. S, No. 2, 3557-3561, 2020 https://doi.org/10.26637/MJM0S20/0915 RSA based video encryption using VHDL J. Josephine Hope Hailma1 Abstract With the advent of technology large number of images are transmitted and received through the internet. Security and privacy are the two major concerns during digital image transmission. Many encryption techniques have been in the literature. They include several crypto analysis techniques, namely DES, RSA etc. However the research has been mostly stopped in the simulation stage itself. Also the available techniques are time consuming, which pose a serious concern especially during video transmission. Hence it is necessary to develop an indigenous hardware that can be exclusively used for video encryption and decryption. Hardware implementation involves developing the algorithm in VHDL and downloading it in a kit. The proposed work aims at developing video encryption and decryption of binary images. Also the proposed techniques have been extended to gray scale videos with 32 gray levels. Keywords RSA, VHDL. 1 Department of Electrical and Electronics Engineering, Bharath Institute of Higher Education and Research, Chennai, Tamil Nadu, India. c 2020 MJM. Article History: Received 01 October 2020; Accepted 10 December 2020 Contents 1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3557 2 Rsa based encryption and decryption of binary images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3558 3 Encryption and decryption of gray scale images3559 4 Results and discussions . . . . . . . . . . . . . . . . . . . . . . . . 3559 5 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3560 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3561 1. Introduction Nowadays large numbers of videos are transmitted through internet. However certain areas like Defence, Forensics, National Security, Telemedicine demand secured transmission of videos. Hence image encryption and decryption are involved while transmitting and receiving the videos. Extensive research is carried out in this area to improve the security of the videos. In most cases, the research ends at developing successful encryption techniques for secured image transmission. Wu-chi Feng et al (2001) proposed an error preserving encryption mechanism for transmission of video over wireless networks. The main objective of this work was to ensure that the basic encryption of the stream can survive bit errors [1]. R.Jaimes et al (2010have proposed an encryption for direct encryption of shading pictures in every edge of a video. Which gives great disarray and dissemination properties that guarantees to a great degree high security as a result of the turbulent blending of pixels hues [2] John Singh et al (2011) have proposedfaster video transmission technique over the network. The proposed algorithm takes very less time for encryption and it gives more security than all other existing algorithms. As the proposed solution employs multi-level encryption along with key encryption, the attacker cannot easily break this algorithm. And analysis shows that lightweight algorithms take less time than existing heavyweight algorithms [3].Gurmeet (2011) have built up a secured video conferencing framework that permits the various clients to trade their continuous sound and video streams in a safe way. It is a customer server based application actualized utilizing Java Media. At the season of joining the gathering by a client who is officially enrolled at the server, the validation is done utilizing RSA open private key sets. For each new conferencing session server produces a crisp emit key (Triple-DES) which is transmitted to the customer after verification in a safe way. The framework permits up to 12 dynamic members to partake in the meeting utilizing P-IV, 2.4GHz processor with 512 MB of RAM [4]. Murthy (2011) have proposed encryption standard for runtime video chatting. The stage planned has three functionalities. It changes over the caught video into .x document arrange, scramble the information record and exchange it over the system and Create associations powerfully [5]. They are not implemented in hardware due to its limited support for image processing. The most commonly used hardware for indigenous system development is Spartan processor RSA based video encryption using VHDL — 3558/3561 kit. It involves developing the algorithm using VHDL and downloading it in the processor. The proposed work aims at developing RSA based encryption and decryption techniques for binary and gray scale videos. The paper is sorted out as takes after. Section 2 portrays encryption and decoding on double recordings. Section 3 depicts both encryption and decoding on dim scale recordings. Section 4 gives results and examination and Section 5 finishes up the work 2. Rsa based encryption and decryption of binary images In the proposed work RSA calculation is utilized for scrambling the video, by changing over the video into picture outlines. Since RSA calculation depends on figuring whole numbers, the pixel values for all the picture edges are scrambled and decoded. At that point the picture edges are recovered as video. The square outline of the proposed work is appeared in Figure 1 and 2. Figure 3: Methodology for public key generation Once the keys are generated, the cipher text is generated for intensities in binary images. However as the cipher text for 0, 1 is 5, 6. These intensities are converted 14 and 30. At the receiver side, decryption key is generated and the procedure for generating the key is shown in Figure 4. Figure 1: Binary video encryption Figure 2: Binary video decryption Figure 4: Methodology for private key generation For encrypting a pixel value public key should be known, for decrypting private key should be known. Both keys are generated by two random prime numbers. The methodology for key generation for encryption using RSA algorithm is shown in Figure 3. The comparing figure code of number 2 to 32 is appeared in Table 1. For the general population keys E=7, N=33 and private keys D=3 and N=33. Table 1: Encrypted value of number 2 to 32 3558 RSA based video encryption using VHDL — 3559/3561 Figure 5: Gray scale video encryption Figure 6: Gray scale video decryption 4. Results and discussions The RSA algorithm is developed in VHDL, key generation, encryption and decryption operation for the sliced image frames from the video file. The obtained wave for key generation process is shown in Figure 7. By this way the intensity value of the image is changed while encryption. 3. Encryption and decryption of gray scale images Though binary videos are used in certain applications which demand less memory space, Binary videos are no longer used in practical cases. Gray scale format is most widely used while transmitting images. Hence an attempt is successfully made to encrypt and decrypt the gray scale images. However due to the inherent limitation in the data type storage allocation in VHDL, 5 bit intensity is used for pixels in an images. The encryption and decryption keys are same as that of the binary images. In a similar way as that of binary images, the gray scale images are encrypted and decrypted. The block diagram for gray scale encryption based on RSA algorithm is shown in Figure 5 and Figure 6. Figure 7: Key generation in VHDL Figure 8: Quantized B&W images and Gray scale images 3559 RSA based video encryption using VHDL — 3560/3561 The proposed technique is applied on 3 different sets of videos. Initially these videos are converted into frames. These frames are then converted into binary images. The frames and the corresponding binary images and gray scale images are shown in Figure7. Further the quantized images are encrypted and decrypted using the public keys and private keys which is generated. The encrypted and decrypted binary images of three different videos are shown in Figure 8. And the corresponding wave forms are shown in Figure 9. Figure 11: Encrypted and Decrypted Gray scale images Figure 9: Encrypted and Decrypted B&W images (a) (b) Figure 10: Binary video (a) encrypted wave, (b) decrypted form. The wave shape (a) demonstrates the force estimation of the first parallel picture outline and the scrambled estimation of the encoded twofold picture. (b) Shows the force estimation of the scrambled picture and the decoded estimation of the encoded paired picture. Same way the gray scale images are encrypted and decrypted. The obtained images are shown in Figure 10. And the corresponding wave form is shown in Figure 11. The wave form (a) shows the intensity value of the original gray scale image frame and the encrypted value of the encrypted image. (b) shows the intensity value of the encrypted gray scale image and the decrypted value of the encrypted image. (a) (b) Figure 12: Grayscale (a) encrypted wave form, (b) decrypted form From these it is observed that the 5-bit video encryption methods woks well on coloured and gray scaled images. 5. Conclusion In this project work RSA based video encryption has been successfully developed it has been verified and validated. It 3560 RSA based video encryption using VHDL — 3561/3561 is found that the reconstructed video is the exact replica of the transferred video, however in this approach binary image were used which may not always be favoured. However hence an attempt also been made to extent this approach for gray scale image, where every pixel is represented with 5 bits. Both encryption and decryption were successfully implemented but the quality of the video can be further increased. If the number of bits for representing each pixel increases, hence the further direction may overcome that inherit imitation in VHDL while implementing the algorithm for more of gray levels. References [1] [2] [3] [4] [5] Wu-chi, On Error Preserving Encryption Algorithms for Wireless Video Transmission, The Ohio State UniversityDepartment of Computer and information Science Columbus, OH 43210, {tosun,wuchi}@cis.ohiostate.edu, (2001). John et al., PUZZLE FAST RANDOM BIT ENCRYPTION TECHNIQUE FOR JOINT VIDEO COMPRESSION AND ENCRYPTION, School of Information Technology and Engineering VIT University, Vellore, Tamil Nadu, India Research Supervisor, Anna University of Technology Coimbatore Tamil Nadu, (2011). Jaimes et al., VIDEO ENCRYPTION WITH CHAOTICALLY COUPLED CHAOTIC MAPS USING DMP6437 AND SIMULINK, Centro Universitario de los Lagos, Universidad de Guadalajara, Enrique D de Leon s/n. Lagos de Moreno, Jal., C. P. 47460, Mco,(2010). Gurmeet, Secure Video Conferencing for Web Based Security Surveillance System, Department of Computer Science and Engineering Indian Institute of Technology, Kanpur July, (2006). Murthy et al., Dynamic Video Conferencing with Fully Secured Encryption Algorithms, International Journal of Computer Applications, (0975-8887)34(8), (2011). ????????? ISSN(P):2319 − 3786 Malaya Journal of Matematik ISSN(O):2321 − 5666 ????????? 3561