A File Encoding Using A Combination of Advanced Encryption Standard, Cipher Block Chaining and Stream Cipher In Telkom Region 4 Semarang

The increase in significant advances in information technology greatly provides comfort and convenience in managing data. This convenience is what makes people who are not responsible for using it as a crime such as hacking, cracking, phishing, and so on. In Telkom Region 4 Semarang, there is a container where there are important company data such as customer data. Customer data is very important and the contents of the data must be kept confidential. The company has experienced significant losses due to information leakage due to negligence in the last 5 years. For this reason, data security is necessary so that data is safe and is not misused. This study applies the Advance Encryption Standard algorithm Cipher Block Chaining (AES-CBC) and Stream cipher in order to secure data so as to reduce the risk of data theft by telecom subscribers. Based on the average avalanche effect value of AES-CBC and a stream cipher of 49.34%, this shows that the AES-CBC and Stream Cipher encrypted files are difficult to crack so that data confidentiality is well maintained.


INTRODUCTION
The increase in significant advances in information technology greatly provides comfort and convenience in managing data. Along with this convenience, negative impacts also occur, such as threats to the security of confidential personal data. This convenience is what makes people who are not responsible for using it as a crime such as hacking, cracking, phishing and so on. Of course this will harm certain parties such as state secrecy or the confidentiality of important company data. In August 2013 ago, one of the biggest websites, Yahoo, was hacked by hackers, approximately 3 billion accounts were stolen. The hacker managed to get user account information such as name, email, telephone number, date of birth, password that was received by MD5, to security questions and answers [1].
The impact of the hack made Verizon's acquisition value of Yahoo drop by approximately USD 1 billion. In Telkom Region 4 Semarang there is a website dashboard where there are important company data such as customer data and so on. Customer data is very important and the contents of the data must be kept confidential. The dashboard of the website can only be accessed by Telkom employees who have obtained access permits only. However, it does not rule out the possibility of data theft, such as a third party who managed to get an account to access the dashboard, if this customer data falls into the hands of an irresponsible third party and is misused for personal gain, of course this is very detrimental to the Telkom and its customers. For this reason, data security is necessary so that the data is safe and is not misused.
There are many ways to secure data, including changing data using cryptographic techniques [2]. With data cryptography techniques are encoded or encrypted into confidential data so that the data will not mean anything to unauthorized parties who successfully access the data [3]. Confidential data that has been encrypted and received by the recipient can be changed back or described to the original data so that it can be understood. There are several algorithms that can be used to encrypt data, two of which are the Advance Encryption Standard -Cipher Block Chaining (AES-CBC) and Stream ciphers [4]. The AES algorithm is a block cipher algorithm that uses a permutation and substitution system (P-Box and S-Box) instead of the Feistel network like block ciphers in general. AES or often called Rijndael has been established by the National Institute of Standards and Technology (NIST) as a replacement for DES in current cryptographic standards [5]. As with block cipher algorithms in general, the Rijndael algorithm can be run in several modes of operation, namely Electronic Code Block (ECB) [6], Cipher Block Chaining (CBC) [4], Cipher Feedback (CFB) , and Output Feedback (OFB).
According to research [5] the level of security using the Cipher Block Chaining (CBC) operation mode is safer than the AES / AES Electronic Code Block (ECB) operation mode. In CBC, the feedback technique applies to a block of bits where the encryption results from the previous block are feedback for the encryption and decryption of the next block. In other words, each block of ciphertext is used to modify the encryption and decryption process in the next block. CBC mode requires IV (Initialization Vector) to be used as the initial encryption process [4]. Stream Cipher is a type of symmetric key cipher algorithm. Where the key for encryption is the same as the key for decryption. This algorithm encrypts the plaintext into ciphertext by substituting bits per bit. Stream ciphers use the XOR function, where the plaintext is XORED with a key stream generator or keystream generator [7]. The level of security of the stream cipher lies in the key stream generator. The more random the output generated by the key stream generator, the more difficult the cryptanalyst will solve the ciphertext. To prevent attacks on the AES-CBC algorithm, a stream cipher algorithm is added to strengthen the encryption process and be more secure against cryptanalysis.

Encryption Decription
Encryption is the process of securing data or encrypting data before the original data is sent to the recipient [8]. The encryption process converts the original data or plaintext into ciphertext, while the decryption process is the process of returning the ciphertext to its original plaintext. It takes a cryptographic cipher or algorithm and a key in the encryption and decryption process [9]. The purpose of encryption is to hide messages or information from unauthorized parties. In general, the encryption anda decryption process can be formulated as shown in (1) and (2).
Where E is Encryption Process, D is Decryption Process,K is Key, P is Original or Plaintext message and C is Ciphertext. To perform the encryption process, input in the form of plaintext and key is needed so that it can produce ciphertext [10]. Meanwhile, the decryption process requires input in the form of ciphertext and keys to be able to produce plaintext.

Advanced Encryption Standard
AES is the Rijndael algorithm invented by Dr. Vincent Rijmen and Dr. Joan Daemen. AES is a symmetry algorithm and block cipher [11]. Thus this algorithm uses the same key at the time of encryption and description and the input and output are blocks with a certain number of bits. The Rijndael algorithm was established by NIST (National Institute of Standards and Technology) as AES (Advanced Encryption Standard) 2000 in October. Rijndael has a key length of 128 to 256 bits in 32 bit steps [12]. Because AES has a fixed key length of 128, 192, and 256 and full support of the flexible Rijndael algorithm, AES is currently known as AES-128, AES-192, AES-286. Here are the differences between the three versions of AES as shown in Table 1. Using the key Nk = 4 words or words which each word consists of 32 bits, the total key is 128 bits. Since the total key is 128 bits, there are 2 128 = 3,4 × 10 38 possible keywords. This process would take up to 5,4x1024 years to complete even with a computer capable of processing one million keys per second. The encryption and decryption process in the AES algorithm consists of 4 types of bytes transformations, namely SubBytes, ShiftRows, Mixcolumns, and AddRoundKey. At the beginning of the encryption process, plaintext will undergo an AddRoundKey byte transformation. After that, the resulting state will undergo transformation of SubBytes, ShiftRows, MixColumns, and AddRoundKey repeatedly for Nr rounds. For the last round it is different from the previous rounds where in the last round, the state does not undergo a MixColumns transformation. Meanwhile, the decryption process is the opposite of the encryption because AES is a symmetric key, the key used for the sender and receiver is the same.

Cipher Block Chaining (CBC)
CBC mode uses feedback operations, also known as chaining. The encryption result of the previous block is feedback for encryption and decryption of the next block. In other words, each ciphertext block is used to modify the encryption and decryption process in the next block. In CBC mode [6], random data is required as the first block for encryption. This random block of data is often called an initialization vector or IV. The IV can be given by the user or generated randomly by the program. To produce the first block cipher, IV is used to replace the previous block ciphertext. In contrast to the decryption, the first plaintext block is obtained by XOR-XORing the results of the decryption of the first ciphertext block [13].

Stream Cipher
Stream Cipher is a type of symmetric key cipher algorithm, where the key for encryption is the same as the key for decryption [14]. This algorithm encrypts the plaintext into ciphertext by substituting bits per bit [7]. Stream ciphers use the XOR function, where the plaintext is XOR as in (3).
Where C is Ciphertext, P is Plaintext and K is Key. The level of security of the stream cipher lies in the key stream generator. The more random the output generated by the key stream generator, the more difficult the cryptanalyst will solve the ciphertext [15].

Proposed Method
In this research, the original plaintext or message will be encrypted first using the Advance Encryption Standard algorithm -Cipher Block Chaining (AES-CBC) first to produce temporary ciphertext and then the temporary ciphertext will be re-encrypted using the Stream Cipher algorithm so as to get the final ciphertext result. Meanwhile, in the decryption process, the final ciphertext will be returned again like the original plaintext or message. The decryption process also uses the same algorithm as used in the previous encryption process. In the flowchart as shown in Figure 2, it can be explained how the encryption process is carried out, as follows: 1) For the first step, input a .xlsx file, key for AES-CBC and key for Stream Cipher. 2) After that, it will be XORed between the binary value of the file and the specified IV.
3) Then the XOR result will be XORed once again with the AES-CBC key binary. 4) Then the calculation results will enter the SubBytes process, which is to substitute each byte using the substitution table (SBox). 5) The next process is to do ShiftRows, which experiences a shift on each line, other than the first line. The 2nd row will be shifted to the left 1 time (1 byte), the 3rd row 2 times (2 bytes), and finally the 4th row 3 times (3bytes). 6) Next, the MixColumns process is to multiply each column of the state array by the predefined polynomial a (x). The multiplication process is the same as a matrix multiplication. 7) The result of MixColumns will then undergo the AddRoundKey process, which is to XOR with a round key. The round key is obtained from the calculation of the cipher key entered. 8) The process will be repeated Nr (N round), except for the last round (10th round) which did not undergo the MixColumns transformation 9) The final result of AES-CBC encryption will be re-encrypted using a stream cipher algorithm, namely XORing with a key stream. This final result will be the final ciphertext. While the flowchart of the encryption and decryption process can be seen in Figure 2, in this figure it will be explained that the decryption process is the reverse direction of the encryption process where the ciphertext file will be encrypted first with a stream cipher then the results of this encryption will be re-encrypted with AES-CBC to get plaintext end or original file.

RESULTS AND DISCUSSION
In this research, using files with the extension *.xls and *.xlsx as encrypted media. The application is made with the Visual Basic programming language. NET. The encryption algorithm used in this application is the AES-CBC algorithm and Stream Cipher. By entering the correct key or the same as the previous encryption process, Figure 17 shows the AES-CBC decryption process was successfully carried out. Here, we used Black-box testing as tool to evaluate our experiment. Black-box testing is a test that is carried out only from the outside (interface) and without knowing what is actually happening in the detailed process. Black Box Testing is intended to train the entire functional unit of the application so that the application can work properly without experiencing system failure. From the Black Box test in Table 2, it can be concluded that the implementation of the Advance Encryption Standard Algorithm -Cipher Block Chaining (AES-CBC) and Stream ciphers can run well. In order to evaluate further, in this study we used the Avallache Effect calculation as shown in Table 3. This test is conducted to analyze the performance and security of a cryptographic encryption algorithm. Here, the avalanche effect value is obtained through the value of the number of different bits from the comparison of plaintext and ciphertext, divided by the total number of bits overall in this study taking one hex value block from each sample data as shown in (5). An avalanche effect is said to be good if the resulting bit change is between 45-60% [16] [17]. The more bit changes that occur, the more difficult the cryptographic algorithm will be to solve.

Avalanche Effects = Different bits
Total bits x 100%  Table 4. The size difference test is carried out in order to know the size of the size change that occurs after the application performs the encryption and decryption process. From the data from the size change test results above, it can be concluded that the encryption process AES-CBC and Stream Cipher, the encryption size does not change the bit size or is still the same as the original size. So that the algorithm used is proven to secure data without any change in size. The last testing, has been done by running time. The process running time stage is carried out in order to know the processing time required by the application to perform the encryption and decryption process as shown in Table 5 and Figure 4. Based on the results of the tests carried out in Table 5, the difference in encryption and decryption time needed to process is not much different from the maximum value of the difference of 51 ms. And the file size affects the length of the encryption and decryption process, the larger the file size the longer the encryption and decryption process takes.

CONCLUSION
From the research conducted by researchers covering the design stages to the implementation of the Adnvance Encryption Standard-Cipher Block Chaining and Stream Cipher cryptographic applications, the following conclusions were obtained: 1. From the results of block box testing, the application can run well in encrypting and redecrypting excel files (.xlsx) using the Visual Basic programming language. 2. From the results of the avalanche effect calculation, the average value of the Adnvance Encryption Standard-Cipher Block Chaining and Stream Cipher algorithm is 49.34%. This shows that using the AES-CBC algorithm and the Stream Cipher file encryption proved difficult to crack so that it can secure files properly. 3. Data after going through the encryption and decryption process does not change and is not damaged (the same as the original file), in other words the Advance Encryption Standard-Cipher Block Chaining and Stream Cipher methods run smoothly and successfully. 4. The encryption process is AES-CBC and Stream Cipher, the encryption file size has not changed or is still the same as the original size. So that the algorithm used is proven to secure data without any change in size. 5. The time required for the encryption and decryption process is not much different and the file size affects the length of time the encryption and decryption process takes. From the research conducted, suggestions that are useful in the development of this study uses 128-bit AES-CBC, therefore for further research it can be tried with 192-bit or 256-bit AES-CBC. The key used for the Stream Cipher would be better if it could be longer. Future research is expected to have a variety of different combinations to choose from.