gets 1000011. She adds some redundant information,
by appending the binary with itself and gets
10000111000011. The new binary is converted to
decimal, and she get the value of m = 8643. She then
computes the ciphertext c = m
2
mod n = 74701449.
The c is sent to the recipient.
In the decryption stage, the recipient solves the
Linear Diophantine Equation yp × p + yq × q = 1 by
using Extended Euclidean algorithm, and he gets yp
= 97639 and yq = -97536. Then, he computes mp = c
((p + 1) / 4)
mod p = 8643, mq = c
((q + 1) / 4)
mod q = 8643,
and mr = c
((r + 1) / 4)
mod r = 1031024. Next, he
computes plus_mp = mp mod p =8643, minus_mp =
-mp mod p = 1025428, plus_mq = mq mod q = 8643,
minus_mq = -mq mod q = 1026520, plus_mr = mr
mod r = 1031024, and minus_mr = -mr mod r = 8643.
Next, he computes b1 ≡ (n / p)
-1
(mod p) ≡ 203988,
b2 ≡ (n / q)
-1
(mod q) ≡ 247091, and b3 ≡ (n / r)
-1
(mod
r) ≡ 586409. Next, he calculates x1 = (plus_mp × b1
× n / p + plus_mq × b2 × n / q + plus_mr × b3 × n / r)
mod n = 93423036598505791, x2 = (minus_mp × b1
× n / p + plus_mq × b2 × n / q + plus_mr × b3 × n / r)
mod n = 142436456928361573, x3 = (plus_mp × b1
× n / p + minus_mq × b2 × n / q + plus_mr × b3 × n /
r) mod n = 1063879435917210766, x4 = (plus_mp ×
b1 × n / p + plus_mq × b2 × n / q + minus_mr × b3
×n / r) mod n = 8643, x5 = n - x1 =
1019469839648569400, x6 = n - x2 =
970456409318713618, x7 = n - x3 =
49013430329864425, and x8 = n - x4 =
1112892866247066548. All of the x’s are then
converted to binary. In binary, x4 is
10000111000011. Its first half of the bits (1000011)
is exactly the same as the second half of the bits.
Thus, x4 contains the redundant information, so the
message is contained in x4. The message m is simply
the decimal of 1000011, so m = 67, and with the
ASCII table he gets the letter ‘C’ which is the original
message.
2.2 Elias Gamma Codes
Constructing an Elias gamma code of the nth symbol
is as follows (Salomon, 2008; Elias, 1975):
1. Let b(n) be the binary form of n.
2. Let M be the length of b(n).
3. Let u(M) be M – 1 zeros followed by 1.
4. Follow each bit of b(n) by each bit of u(M),
and let it be e(n).
5. Discharge the leftmost bit of e(n).
6. The representative of the nth symbol is e(n).
For example, let n = 9. Thus, b(n) = 1001 and
M = 4. Then, u(M) = 0001. So, e(n)
=10000011. Dropping its leftmost bit, e(n) =
0000011. Therefore, the representative of the
9th symbol is 0000011.
2.3 A New Cryptocompression System
Our cryptocompression system works as follows:
1. Input plaintext as a string.
2. Get the list of m (in decimal form) which is the
ist of the ASCII number of each character in
the plaintext.
3. Encrypt each m with H-Rabin encryption
algorithm as the list of c (in decimal form).
4. Convert the list of c into a string s, separating
each value of c with a “ ” (space).
5. Count the frequency of each symbol “0”, “1”,
“2”, “3”, “4”, “5”, “6”, “7”, “8”, and “9” in the
string s.
6. Sort the symbols by the frequencies in
descending order.
7. Construct the Elias gamma code for each
symbol.
8. Construct sb, the string-bit representation of
the string s by using the Elias gamma code.
9. Convert each 8-bit of sb with the
corresponding ASCII symbol and put it into a
string cc.
10. We now have the compressed ciphertext cc
whose length is shorter than the length of s, the
uncompressed ciphertext.
3 RESULTS AND DISCUSSIONS
Let us compare the ciphertext created by H-Rabin
public key encryption algorithm and the compressed
ciphertext created by our cryptocompression system.
Suppose we have plaintext = “CRYPTO
COMPRESSION SYSTEM”. Using the same
parameters as in Section 2.1 (p = 1034071, q =
1035163, r = 1039667, and n =
1112892866247075191), we encrypt the plaintext
with H-Rabin public key encryption, and we get the
computer generated result as follows.
'C' => 67 => 74701449
'R' => 82 => 111894084
'Y' => 89 => 131813361
'P' => 80 => 106502400
'T' => 84 => 117418896
'O' => 79 => 103856481
' ' => 32 => 4326400
'C' => 67 => 74701449