Collaborative Encryption Algorithm Between Vigenere Cipher, Rotation of Matrix (ROM), and One Time Pad (OTP) Algoritma

of cells in the matrix. The value of Si and L p is added to the plaintext to be a flag for the decryption process.


Introduction
In this increasingly sophisticated era almost all the good circles of government, industry, business to personal companies do the work using computer. The capabilities possessed by computer devices is no doubt, this is proved by the level of accuracy to a high speed in completing a job. Besides the bias advantage obtained from the use of computer, the most important thing to be considered is part of its security which if the information/data stored in the computer suffered damage or loss then it could lead to huge losses. The condition of a computer that is not secured properly, will be a great opportunity to the hackers to enter the computer access and steal all the data he wants. Some examples of hacking cases in 2016, among others "Ransomware emerges as a top cyber threat to business, UK second only to US in DDoS attacks, 412 million user accounts exposed in Friend Finder Networks hack, Financial Conduct Authority concerned about cyber security of banks, and other cases caused by the weakness of the security system. For that we need a computer security system. Security of data in a computer is very important to protect the data from other parties that do not have the authority to determine the content of the data [1]. Security concerns relate to risk areas such as external data storage, dependency on the public internet, lack of control, multi-tenancy and integration with internal security [2]. ASTESJ ISSN: 2415-6698

Literature Review
The NIST Computer Security Handbook [NIST95] defines the term computer security as follows: The protection afforded to an automated information system in order to attain the applicable objectives of preserving the integrity, availability, and confidentiality of information system resources (includes hardware, software, firmware, information/data, and telecommunications) [3]. Cryptography is one of the areas of science that studies about information security / data to avoid adverse effects due to misuse of information by irresponsible parties. Cryptography has an important role in maintaining the confidentiality of information both in the computer and at the time of transaction data.
So a more hardheaded goal of cryptography is to make it too work intensive for attacker [11]. The basic terms used in cryptography are discussed bellow:

Plaintext
In crytography, plaintext is a simple readable text before being encrypted into ciphertext [12]. The data can be read and understood without any special measure is called plaintext [13].

Ciphertext
In Cryptography, the transformation of original message into non-readable message before the transmission is known as cipher text [16]. It is amessage obtained by some kind of encryption operation on plain text.

Encryption
Encryption is a process of converting plain text into cipher text. Encryption process requires encryption algorithm and key to convert the plain text into cipher [17]. In cryptography encryption performed at sender end.

Decryption
Decryption is the reverse process of encryption. It converts the cipher text into plain text. In cryptography decryption performed at receiver end [11].

Key
The key is the numeric or alphanumeric text used for the encryption of plain text and decryption of cipher text [16] Currently the scientists in the field of cryptography has been a lot of research about the science of cryptography by creating a variety of new algorithms developed from previous algorithms. The level of security offered varies, there is a security priority by applying the stages of a very complex algorithm, and by offering the speed of the execution process of the algorithm they created.
Vigenere Cipher is one of the classic cryptographic algorithms that until now is still widely developed by researchers. In the cryptography, it contains different methods among them the cryptography with the Vigenère matrix. Cipher was proposed by BLAISEDE VIGENÈRE in 1583 and has reigned about 03centuries.
Another classic cryptographic algorithm is Vernam Cipher, known as the One Time Pad algorithm. In its development One Time Pad algorithm is still much in demand by researchers, because the key length generated randomly equal to the length of the message. But the length of the key to be distributed becomes an interesting thing to develop, because when sending a key must require a secure network where the secure network is expensive.
The key looping is also a weak point in the algorithm, which means that if the message is encrypted and decrypted then to encrypt the same message must use a new key, it means that network security is a top priority due to frequent distribution of keys.
The key looping is also a weak point in the algorithm, which means that if the message is encrypted and decrypted then to encrypt the same message must use a new key, it means that network security is a top priority due to frequent distribution of keys. This is the case with Vigenere ciphers though considered safe for centuries but then its weaknesses have been identified. Friedrich Kasiki invented a method to identify the period and therefore the key and plaintext [11] This research provides a solution to the length of keys to be distributed that have lengths to be equal to the message. Doubts over repetition of key biases that result in cryptanalysis can easily know the contents of the message can be overcome by the collaboration with the algorithm Vigenere Cipher and Rotation of Matrix (ROM). These three algorithms support each other to ensure the security level of the message and make it difficult for the irresponsible party to guess the contents of the original message.
The message will be sent encryption process four stages where each stage will produce 1 st ciphertext, 2 nd ciphertext, 3 rd ciphertext, and final ciphertext [10]. The first stage, the message is encrypted using the Vigenere Cipher algorithm by first determining the index of each message character and key. Both indexes are summed and modulated to the specified character length of the index table. The result of this stage is called 1 st ciphertext. . The next step is to determine the value of subrange and Length of plaintext. The subrange value is derived from the sum of each message index and the Length of Plaintext is determined by the number of characters of the message itself. After the subrange and length of plaintext values are obtained then the index value for each key character multiplied by the subrange value and modulated by length of plaintext, this result is called Encryption 1 st ciphertext (EnC1). 2 nd ciphertext is obtained from multiplication between 1 st ciphertext and EnC1 value. The third stage is using the Rotation of Matrix (ROM) algorithm where in this stage the message that has been converted into 2 nd ciphertext is inserted into a matrix table. This algorithm aims to scramble messages that have been entered into the matrix table using the rotation method and manipulate the number of characters from the message.
The workings of this algorithm is very easy but requires precision because the rotation value obtained from a key algorithm called E2mbs Key Algorithm and the length of the key characters will determine the number of matrix tables to rotate. After all the process at this stage is done then obtained 3 rd ciphertext, and the final stage is using One Time Pad algorithm, where as we know this algorithm is run by converting all characters of the message and key into binary numbers which then operated by exclusive or (XOR) method. The One Time Pad algorithm in this research has been modified in the key generation section. Previous research has always used a random machine to generate a key. The need for modifications to the key generation process aims to avoid making such long keys when restoring the original message from ciperthext. The key used to encrypt messages on the One Time Pad algorithm is the primary key that has been altered using the E2mbs Key algorithm, then to increase the length of the key so that it is the same as the message display, the increment key method is used. The encryption results in this final stage produce Final Ciphertext which will be sent to the recipient of the message along with the main key where the length of the character does not have to be the same length of the message. In this classic algorithm has been found a way to find out the contents of the original message without having to know the key, This research is explained that the decryption process will be faster if the recipient of the message to obtain the main key and follow the correct procedure. However, if decrypted by guessing the key then kriptanalis must go through a long route and the weight of the possibility to find out the original message content.

Materials and Methods
According to (William, 2010) Cryptography is a technique applied for encryption and decryption. In the field of cryptography there are several techniques available for encryption/decryption. These techniques can be generally classified into two major groups, i.e. Conventional and public key Cryptography [4].
To understand the workings of cryptographic algorithms in this research, the following will be presented a block diagram explaining the flow of the encryption process. From the picture above can be known in general the process of encryption of a plaintext into ciphertext and the decryption of ciphertext to plaintext.
In this cryptographic algorithm used two tables as parameter to determine character index among others, Plaintext Index Table  (0, 1, 2, …, 36) of 37 characters to identify characters (A, B, ..., Z, spaces, 0, 1 , ..., 9) and ASCII tables as character parameters changed into ASCII characters.   The Vigenere cipher is a method of encrypting alphabetic text by using a series of different Caesar ciphers based on the letters of a keyword. It is a simple form of polyalphabetic substitution in which each alphabet can replace with several cipher alphabets [5]. The encoding by the Vigenère matrix is the type by substitution. It consists to employ a key composed by a word or by an expression. It utilizes a square composed by the alphabet 25 times in such way it signifies a square matrix where each cell contains a letter of the alphabet (it exists several variants of the matrix) [6]. Message is divided in blocks. Length's block is equal length's key K. Maximal Length of key is 208 bits (26*8=208). Key length then could be 128,192,256... for one matrix. To perform the encryption using Vigenere Cipher algorithm development required the following functions: This function is then developed by multiplying each index to the value of 1st ciphertext (Ci1) with Encryption 1st ciphertext. Encryption 1st ciphertext (EnC1) is the sum of subrange with length of plaintext.

Cryptography
The word Cryptography is derived from the Greek, namely from word Cryptos meaning of the word hidden and graphein means writing. Cryptography can be interpreted as an art or a science which researched how the data is converted into a certain shape that is difficult to understand [1]. Cryptography aims to maintain the confidentiality of information or data that can not be known by unauthorized parties (unauthorized person)

Cryptography components
Basically, the cryptographic component consists of several components, such as: 1. Encryption: is very important in cryptography, is a way of securing the transmitted data that are kept confidential. The original message is called plaintext, which is converted into code that is not understood. Encryption can be interpreted with a cypher or code. Similarly, do not understand a word then we will see it in a dictionary or glossary. Unlike the case with encryption, to convert plain text into text-code we use algorithms to encode the data that we want. 2. Decryption: is the opposite of encryption. The encrypted message is returned to the original form (original text), called the message encryption algorithm used for encryption is different from the algorithm used for encryption. 3. Keywords: that means here is the key used for encryption and description.
Security of cryptographic algorithms depending on how the algorithm works, therefore this kind of algorithm is called finite algorithm. Limited algorithm is an algorithm used a group of people to keep the messages they send.

Vigenere Chiper
The Vigenère cipher is a method of encrypting alphabetic text by using a series of different Caesar ciphers based on the letters of a keyword. It is a simple form of polyalphabetic substitution. [2]. The characters used in the Cipher Vigenere that is A, B, C, ..., Z and united with the numbers 0, 1, 2, ..., 25. The encryption process is done by writing the key repeatedly. Writing the key repeatedly performed until each character in messages have a couple of key characters. Furthermore, the characters in the message is encrypted using the Caesar Cipher key values that have been paired with numbers. The Confederacy's messages were far from secret and the Union regularly cracked their messages. Throughout the war, the Confederate leadership primarily relied upon three key phrases, "Manchester Bluff", "Complete Victory" and, as the war came to a close, "Come Retribution".  Examples of encryption in Figure 1, the message character "E" is encrypted with a key "M" and generate cipher text "R". The results obtained from the code encrypting the message "E" is worth 5 and a key character "M" which is worth 13. Each character value added 5 + 13 = 18. Because 18 is less than the 26 which is the number of characters used, then 18 divided by 26. The rest of the division is 18 which is a character "R". The encryption process can be calculated by the following equation where , and an encrypted character, the character of the message and the character key. While the decryption process can use the following equation: with is the result of the decryption code, is character cipher text or cipher, is a key character. While other methods to perform the encryption process with Vigenere Cipher method that uses tabula recta (also called Vigenere square; Figure 5).  , a = 0, b = 1, c = 2, ..., z = 25) , Vigenère square is used to obtain the ciphertext by using a key that has been determined. If the key length is shorter than the length of the plaintext, then the key are repeated it's use (the periodic system). When the key length is m, then the period is said to be m.

Vernam Chiper
Cryptography for most people is something that is very difficult and we as beginners tend to be lazy to learn it. However there is a cryptographic method that is rather easy to learn and the experts have stated that this method is a cryptographic method that is safe enough to use. The method is commonly known by the name of One Time Pad (OTP) or better known as the Vernam Cipher [4]. Vernam Cipher invented by Major J. Maugborne and G. Vernam in 1917. Algorithms One Time Pad (OTP) is a diversified symetric key algorithm, which means that the key used to encrypt and decrypt the same key. In the process of encryption, algorithm it uses the stream cipher derived from the XOR between bits of plaintext and key bits. In this method, the plain text is converted into ASCII code and then subjected to an XOR operation on the key that has been converted into ASCII code.

One Time Pad
One-time pad (OTP) is a stream cipher to encrypt and decrypt one character each time [5]. This algorithm was found in 1917 by Major Joseph Mauborgne as improvement of Vernam Cipher to produce a perfect security. Mauborgne proposes the use of One-Time Pad containing a row of characters randomly generated key. One pad is used only once (one-time) only to encrypt a message, after the pad has been used demolished so as not be reused for other encrypting messages. Encryption can be expressed as the sum modulo 26 of the plaintext character with one key character one-time pad [6]. This is the equation of one-time pad encryption 26 characters shown in Equation 2.2 below: Ci= (Pi+Ki) mod 26 (2.2) If the character that is used is a member of the set of 256 characters (such as characters with ASCII encoding), then the encryption equation shown in equation 2.3 below.

Pi= (Ci-Ki) mod 26 (2.3)
After the sender encrypts the message with the key, he destroyed the key. Recipient of the message using the same pad to decrypt the ciphertext characters into characters plaintext with equation 2.4 below.

Pi= (Ci-Ki) mod 256 (2.5)
The ways of working one time pad method:

C = P XOR K (2.6) P = C XOR K (2.7)
Note that the key length should be equal to the length of the plaintext, so there is no need to repeat the use of the key during the encryption process (as in vernam cipher).

Rotation Matrix
Rotation matrix is shifting ciphertext character that has been incorporated into the matrix column clockwise, along the defined distance of the key. How to determine the length of shifts and the number of shifts can be seen in the following Table 1 below: Forms of research conducted by the authors in this paper is a review of literature. The literature review is a framework, concepts, or orientation to perform the analysis and classification of facts collected in a study. Referral sources from books and journals, which are referred to in this paper are directly related to the object under researched, that is the plaintext encryption. The method of research that used in this paper is a flowchart. This method includes determining a model of encryption, the completion of the encryption algorithm, encryption simulation manufacture and analysis of simulation results encryption. Flowchart design simulations on complete this research can be seen in Figure 6.

Rotation Key Algorithm
Rotation key generation algorithm aims to improve the security of the plaintext by changing the keys into a new character. Furthermore, the new character is converted to decimal and then look for the value of the modulation to determine the length of a shift towards the characters in the matrix table. Consider the following Figure 7.

Rotation algorithm
In this process, all the characters ciphertext that has been generated on Vigenere Cipher algorithm written into the matrix table where condition matrix which must consist of a matrix of squares, where the number of rows equals the number of columns (Figure 8). To run this algorithm, first consider the following steps.
1. Write down all of the ciphertext into the matrix 2. The matrix will be formed must consist of the same number of rows and columns.
3. To define a matrix of rows and columns calculate the amount of n ciphertext; n = length of ciphertext.
If 9 < n <= 16, it will form a matrix of 4 x 4 If 16 < n <= 25, it will form a matrix of 5 x 5, etc.
5. If the matrix column empty, fill it with the alphabet from A until the empty column full of character.
6. Copy the first column then make a new ending column 7. After that copy the first line and then make a new ending line.
8. Make the first shift in which the shift length is determined by the rotation of key algorithms. Rotation matrix will end after reaching n MAX of keys. Encryption can be expressed as the result of the Exclusive OR (XOR) of the plaintext character with an OTP key characters. This algorithm acts to encrypt the plaintext where the key is generated randomly. This key is valid only disposable where if you want to decrypt the same message then the generated key will be changed.

One Time Pad
In this method, there are two things that need to be encrypted is the key and the ciphertext obtained from vigenere chipper. This method works in advance is change the main key with One Time Pad methode to produce the Ciphertext of the key then this key will be the second key or a new key (Figure 9).

Ei
:   The next new key that has been generated is used to encrypt the ciphertext that has been obtained from vigenere cipher.
From the results of the main key encryption in the previous process we obtain a new key and then the key is repeated until the key length equal to the length of the plaintext. The result of the encryption of the plaintext and the key will be the end of the process to produce a strong ciphertext.

Ciphertext
: The encryption process is represented in binary form :

Results and Discussions
The results of encryption on this method obtain ciphertext to be sent to the recipient where there are two keys that are sent, among others, the key to decrypt the plaintext and the key to decrypt the key.

One Time Pad
To know the plaintext from the ciphertext received by the rightful recipient of the message, that is by first using the one-time pad method. The message recipients require a new key as a reference to recover the plaintext.

Di : Ci XOR Ki
The process of the message recipient to get a new message that is still in the form of Ciphertext are:

BRFXKMPDCFRRPEFBQBSFHSHPRAAPSPFXKMRS.
After successful decryption of the message recipient to decrypt back to find out the main key is still the one-time pad method.

Rotation algorithm
The next decryption algorithm is an algorithm in which the rotation that has been encrypted ciphertext of the previous methods to be put into a matrix table. See the Figure 10 below. In the previous encryption process, ciphertext character that is in the column of the matrix are moved forward along key value, but on the decryption algorithm ciphertext character that is in the matrix table is sliding backwards or revers along key value and repeated as much as the key length. The key value is obtained from the following process in the Figure 11 and Figure 12. After a successful key value is determined next process is to do a rotation matrix algorithm. The results of the first rotation indicated at number one in the previous figure 10 wherein R is on the line five-column one. If we look at previous matrix characters that are in row one column one is B, then calculated spin clockwise as key values obtained from the previous process. The key value is taken values that are at the end of the index is 17, the next process is the value at the previous index up until the beginning of the index, this is certainly the opposite of encryption algorithms. Having calculated the characters are on the order of 17 is R then R is placed on row one column one on the following matrix and is followed by the next character, then repeated continuously until the last process ( Figure  13). In the process of this algorithm obtained the final matrix below:  The next stage removes the last row and the last column of the matrix.

Algoritma Vigenere
Last decryption algorithm using the algorithm vigenere cipher by using the key with formula:

Conclusions
The encryption mechanism used in the present research is still modest or simple, but is expected to be useful as a first step to enter into the world of cryptography, particularly in the implementation of message security algorithms using other combinations. To the future, this research is expected to be developed, used and applied in the areas of life that is more complex.