A cryptocompression system with Multi-Factor RSA algorithm and Levenstein code algorithm

Exchanging digital messages by electronic means has a major security concern. The data being sent can be accessed and read by some unintended parties if there is no security system involved. Cryptography obscures the messages being sent and they can only be read by intended recipients by using the right key. Using asymetric cryptography algorithm such as Multi-Factor RSA may help to obscure a message with high security; however, the ciphertext is usually much larger than the message so it takes much more time to transmit. In order to solve this problem, this research combines the Multi-Factor RSA with the Levenstein Code algorithm in a cryptocompression system to compress the size of the message being sent. This research also compares encrypt-then-compress scheme with compress-then-encrypt scheme. The result shows that encrypt-then-compress scheme has a better compression ratio than the compress-then-encrypt scheme. On the contrary, in terms of actual time performance, the compress-then-encrypt scheme is faster than encrypt-then-compress scheme.


1.
Introduction Cryptography is a technique based on mathematics and it is related to data security such as confidentiality, data integrity, and authentication [1]. The purpose of cryptography is to build a secure system that has a difficulty level which is not easy to break by unintended parties [2]. There are two types of cryptographic algorithms, namely symmetrical algorithms and asymmetric algorithms. Multi-Factor RSA is an asymmetric cryptographic algorithm which is the result of the development of the ordinary RSA algorithm. It was found that the processing time results were 2.25 times faster than the ordinary RSA algorithm [3]. The security of ordinary Multi RSA is high level due to the hardness of factoring of large integers into prime numbers [3].
Data compression is a technique created to convert the source stream into another stream to reduce the size of the initial stream length [4]. Compression types are divided into two types namely lossy compression and lossless compression [5] [6]. Levenstein code is a type of lossless algorithm [5] in which this algorithm processes the overall coding of non-negative integers, and the process has certain stages for coding and decoding.
In this research, we compare compares encrypt-then-compress scheme with compress-then-encrypt scheme to determine which one is better in terms of compression ratio and time performance.

2.
Method Here we will explain how the Multi-Factor RSA algorithm works step-by-step as can be seen in [3]. Starting from generating some prime numbers using the Agrawal-Biswas algorithm, followed by the data encryption process and also the final process, namely decrypting the obscured data back into the original one.
Key Generation. This process is the initial process which is indispensable for the encryption process and also the decryption process. It begins with the generation of prime numbers of at least three numbers. Choosing larger prime numbers can increase the level of security. The key generation is done by the recipient of the message. The steps are as follows: 1. Generate a value of b where b is the number of prime numbers and b > 3.
2. Generate prime numbers as much as b using the Agrawal -Biswas algorithm, the steps are: a. Generate p value. b. Take the z value randomly, with 2 ≤ z <n-2.
c. If the result is (1 + z) p mod p = (1 + z p mod p) mod p, then p is probably a prime number. d. If not then, p is a composite number.

Calculate the value of
5. Determine the value of e according to the standard RSA public key, namely e = 65537.
6. Generate the value of d which is the inverse of e (mod (n)).

Encryption.
In this process, the text will be encrypted as follows: 1. Take the public key, namely N and e. 2. Encrypt the message with the formula c = m e (mod n) 3. Send c to the intended recipient.

Decryption.
After the message is received, what must be done is the decryption so that the message returns to the original message, the steps are as follows: 1. Take the previously encrypted message which is c, and prepare the private keys that have been generated (d, 1 , 2 , 3 ,…, ). (mod ).

Levenstein Code
The coding process of a number n with the Levenstein Code algorithm is as follows [5]: 1. Initialize the value C = 1 2. Take the number n and calculate its binary value, then delete the number 1 in the first index 3. Initialize M which is the number of bits in the second step.

Results and Discussions
The sample calculation of the cryptography system is as follows: A   Table 2. The comparison of encrypt-then-compress and compress-then-encryption schemes Table 2 shows that encrypt-then-compress scheme has a lower (or, better) compression ratio which results in better space savings than the compress-then-encrypt scheme. Conversely, in terms of time performance, the compress-then-encrypt scheme is quicker than encrypt-then-compress scheme.