# Efficient Transcoding and Encryption for Live 360 CCTV System
## 3 Fast Multiple Transcoding and Encryption
### ARIA Encryption  
To adapt secured video transmission over the Internet, an encryption algorithm is applied to encrypt the transcoded video bitstream. From the security point of view, various well known encryption algorithms can be used, such as Advanced Encryption Standard (AES), Digital Signature Algorithm (DSA), etc. Additionally, to provide a real solution for CCTV system specially in Korea, the ARIA encryption algorithm is used, which implemented the first version under the government's standard. The proposed system was considered using cryptographic and plaintext attacks on ARIA to check the secured capability. Moreover, some related studies were verified to estimate the performance of ARIA. [PERSON] et al. [18] provided the security and performance of ARIA encryption in specified report. [PERSON] et al. [19] showed some cryptanalysis analytics on ARIA. [PERSON] et al. [20] showed the comparative survey of different cryptographic algorithms, which included ARIA cryptographic algorithm.  
ARIA algorithm is a block cipher designed by a large group of researchers from South Korea. Additionally, the Korean Agency for Technology and Standards voted and selected it as an efficient  
Figure 8: Intel Media SDK architecture.  
Figure 9: Video transcoding—elementary streams.  
standard cryptographic technique in 2004. More information about ARIA encryption can be reviewed in [21; 22; 23]. The ARIA algorithm provides a mechanism that uses a substitution-permutation network structure based on the well-known AES encryption. The interface is similar to AES encryption such as the key size of 128, 192, or 256 bits with 128 bits block size. Moreover, the number of rounds depends on the key size with possible values of 12, 14, or 16. The ARIA encryption algorithm uses two 8 \(\times\) 8-bit S-boxes, and their inverses in alternate rounds; one of these boxes is the Rijndael S-box [21].  
To achieve real-time transcoding/encryption, the proposed system uses ARIA to encrypt each output video stream from the transcoder, as shown in Figures 6 and 7. Instead of encrypting whole output stream, ARIA crypto library [24] was used to encrypt a few special frames of video streams. For example, to perform encryption while transcoding to HEVC, the proposed system only encrypts VPS, PPS and SPS slices. Additionally, the encryption mechanism also allows the transcoder encrypting a part of the video stream as the length of the multiple of 16 bytes. As shown in Figure 10, \"encDataLen\" is required as multiple of 16 bytes because of the \"padding\" issue. The padding issue leads to hard work of decryption in client-side or control center. In this paper, we propose the encryption for both video and audio data.  
The master key and round-key can be pre-generated and stored at both client and server sides. The other option is that all keys are attached to full name (RTSP) stream at the server side, as shown in Figure 11. Then, clients can interact with some particular points inside RTSP stream to detach master key and round-key. In this case, the location and length of these keys are stored in a secret process, which is only shared between server and client by another communication channel.