Text Encryption Algorithms Based On Pseudo Random Number Generator
Text Encryption Algorithms Based On Pseudo Random Number Generator
net/publication/272475087
CITATIONS READS
17 1,898
2 authors:
Some of the authors of this publication are also working on these related projects:
All content following this page was uploaded by Mina Mishra on 18 February 2015.
ABSTRACT plaintext and key sensitive test. Known plaintext attack is also
This paper presents algorithms for encryption and decryption performed by taking into consideration a small string of
developed using pseudo random number generator (PRNG) plaintext and the complete cipher text for small text. Simple
and non-Linear functions. PRNG used in the work are matlab pseudorandom number generator like matlab random number
random number generator (RNG) and Linear congruential generator (RNG) and linear congruential generator (LCG)
generator (LCG). The developed algorithms are named have been used here. The developed algorithms are named
according to PRNG used in it. State of PRNG is considered as according to PRNG used in it.
secret key of the cipher. The encryption schemes have been The analysis is performed on different keys selected randomly
cryptanalyzed for four different methods to test its strength from key space for various texts and files. Key sensitivity up
like key space analysis, plaintext and key sensitive test. to 50 % and plaintext sensitivity ranging from 3% to 50 %
Known plaintext attack is also performed by taking into have been obtained in the developed ciphers. It is concluded
consideration a small string of plaintext and the complete that proposed encryption algorithms have strength against
cipher text for small text. The analysis is performed on linear, differential and statistical attacks.
different keys selected randomly from key space for various
texts and files. The rest of the paper is organized as follow. Section II,
presents the brief introduction of PRNG‟s used in the
Key sensitivity up to 50 % and plaintext sensitivity ranging developed algorithm. Next section presents and discusses
from 3% to 50 % have been obtained in the developed about the algorithm. In section IV, analysis and results have
ciphers. It is concluded that proposed encryption algorithms been discussed. Section V gives conclusion of the work.
have strength against linear, differential and statistical attacks.
2. PSEUDORANDOM NUMBER
Keywords
Cryptography, Pseudo random number generator (PRNG),
GENERATOR
Random number generator, Linear Congruential Generator. PRBG plays an important role in cryptography. They have
been frequently used in the designing of the ciphering
1. INTRODUCTION methods. Two of the simple PRBG used in designing of
Cryptography has remained important over the centuries, used encryption algorithm have been discussed in brief here:
mainly for military and diplomatic communications. With the A. Random Number Generator (RNG)
advent of the internet and electronic commerce, cryptography Matlab Rand produces uniformly distributed pseudorandom
has become vital for the functioning of the global economy, numbers, scalar value drawn from a uniform distribution on
and is something that is used by millions of people on a daily the unit interval.
basis. Various schemes of encryption using different
techniques have been proposed in recent years. The Pseudo Rand („twister‟, k), r = rand, produces a pseudorandom
random number generators have been used for design of number corresponding to state k, which is the seed (also
ciphers and found to be fundamental tool in many known as initial condition) of generator, acting as key for
cryptographic applications like key generation, encryption, cryptosystem.
masking protocols and for internet gambling [1]- [4]. B. Linear Congruential Generator (LCG)
A pseudorandom number generator (PRNG), also known as a A Linear Congruential Generator (LCG) represents one of the
deterministic random bit generator (DRBG) is an algorithm oldest and best-known pseudorandom number generator
for generating a sequence of numbers that approximates the algorithms. The generator is defined by the recurrence
properties of random numbers. The sequence is not truly relation:
random in that it is completely determined by a relatively x(k+1) = (ax(k)+b) mod c
small set of initial values, called the PRNG's state, which
includes a truly random seed. Good statistical properties are a Where, x(k) is the sequence of pseudorandom values, and c,0
central requirement for the output of a PRNG, and common < c - the “modulus”, a, 0 < a < c - the “multiplier”, b, 0 < = b
classes of suitable algorithms include linear congruential < c - the "increment”, x0, 0 < = x0 < c - the “seed” or” start
generator, lagged fibonacci generator, and linear feedback value” are integer constants that specify the generator. The
shift register [5], [6]. period of a general LCG is at most c, and for some choices of
a much less than that. Provided that b is nonzero, the LCG
This paper aims to develop a number of algorithms for will have a full period for all seed values if and only if:
encryption/decryption using PRNG‟s and non-linear
functions. The encryption techniques are crypt analyzed for b and c are relatively prime,
linear and differential attacks to test their validity. Various
methods of cryptanalysis used in this work are key space, ( a -1) is divisible by all prime factors of c,
1
International Journal of Computer Applications (0975 – 8887)
Volume 111 – No 2, February 2015
r is the random numbers generated corresponding to the key; b ii. Calculate = p + mod (r, 128).
is state of LCG; c is any variable. iii. Convert each number of p into its binary form, which
Step-4. Plot „c‟ obtained from above step. forms matrix of dimension containing rows equal to
the length of text and number of columns is eight.
Step-5. The sequences of numbers in c are then converted into
character values. iv. Above matrix dimension is changed into dimension
where no. of rows is half the length of text and no. of
Step-6. Read the output text (cipher text). columns is sixteen.
Algorithm For Linear Congruential Generator: v. Matrix is partitioned into two equal halves, first and
Step-1. Read iteration as N, initial condition as x (1), values of second.
parameters a, b and c where b is considered as key for the
system. vi. Mix both matrix and obtain new matrix of same
dimension. Mixing is done in such a way that elements
Step-2. Calculate, for k=1: N of second column of new matrix becomes elements of
x(k+1) = mod (a x(1) + b, c) first column of second matrix, third columns elements
becomes elements third column of first matrix, fourth
Step-3. Read output states as x. columns elements becomes elements of second
column of second matrix and so on.
2
International Journal of Computer Applications (0975 – 8887)
Volume 111 – No 2, February 2015
vii. Dimension of new mixed matrix is changed into defined and key space has been properly characterized, the
dimension i.e., equal to the dimension of matrix as good key is chosen randomly from the large key ranges [7].
instep (6) (iii).
B. Plaintext sensitivity: This method corresponds to the
viii. Binary forms of numbers in matrix are changed into percentage of change in bits of cipher text obtained after
decimal form. encryption of plaintext, which is derived by changing single
bit from the original plaintext from the bits of cipher text
ix. Read output as p. obtained after encryption of original plaintext. With the
x. Again key is incremented by one, k = k + 1. change in single bit of plaintext, there, must be ideally 50%
change in bits of cipher text to resist differential cryptanalysis
xi. i = i + 1, go to step (6) (i). The process repeats until i = (chosen-plaintext attack) and statistical analysis, corresponds
16 is completed. to plaintext sensitivity test [8].
Step-5. Read output generated by completion of above steps C. Key sensitivity: This method corresponds to the
as c and plot it. percentage of change in bits of cipher text obtained after
Step-6. Convert integer values of c into character form. encryption of plaintext using key, which is flipped by single
bit from the original key, from bits of cipher text obtained
Step-7. Read c as cipher text. after encryption of plaintext using original key, which
requires ideally 50% change in cipher text bits to resist Linear
4. ANALYSIS AND RESULTS and statistical attacks [9].
The analysis part consists of testing the validity of methods
against the most basic attacks like linear, statistical and D. Known plaintext attack: It is assumed that the opponent
differential attacks. Cryptanalysis is the necessary for testing knows everything about the algorithm; he/she has the
the strength of the developed ciphers. The cryptanalytic corresponding cipher text of plaintext and some portion of
procedures used in this work include: plaintext. With this much information, the opponent tries to
find out the secret key [10].
A. Key Space Analysis: The size of the key space is the
number of encryption/decryption key pairs that are available For each of the methods the analysis result is cited in tabular
in the cipher system. In the proposed method, the key space form as follows:
(range of keys) is defined clearly. Once the key has been
Table 1: Analysis Table for RNG method
Key Robustness
Plaintext
Sl. sensitivity against known
Plaintext Key value Cipher text sensitivity
No. plaintext attack
(in %). (in %). for p = [p1 p2].
1. What is your 0 %[lf}"qs(yvvs'siogE 1.5038 22.3684 R
name?
2. I am going to 19 N cr)ormuo&vw"meythy2 0.6494 25.3247 R
market.
3. My college name 265 %Mz!eurneii)rbrf$lx(u/t3j0e0|4 0.9524 27.6190 R
is s.s.c.e.t.
4. Hello!how are 4765 !Qgrmx#lry%ezl#ryF 1.3158 28.2895 R
you?
5. Sita is singing very 39846 %Uryg)mw&ukqkqri(zjr•'jnu3 0.9259 28.7037 R
well.
6. Ram scored 98 874976 &Wdq"zlqvmd#?<"pfroy!or(Tfuo{3 0.4762 29.0476 R
marks in Maths.
3
International Journal of Computer Applications (0975 – 8887)
Volume 111 – No 2, February 2015
4
International Journal of Computer Applications (0975 – 8887)
Volume 111 – No 2, February 2015
5. CONCLUSION
This paper proposes an encryption algorithm based on pseudo Table 4: Comparison between the three methods
random number generator (PRNG). The performance of Robustness
developed encryption scheme is evaluated by performing key Range of Range of against
space analysis, plaintext and key sensitive test and known Name of
plaintext key known
plaintext attack on them. Known plaintext attack is performed cipher
sensitivity sensitivity plaintext
by taking into consideration a small string of plaintext and the tattack
complete cipher text for small text.
The analysis is performed on different keys selected randomly RNG 0.5 to 1.5 % 22 to 30 % Yes
from key space for various texts and files. Developed
algorithm showed key sensitivity up to 50 %. Plaintext
sensitivity in modified algorithm has been increased from 3% LCG 0.5 to 3 % 23 to 39 % Yes
to 50 %.Thus, proposed encryption algorithm have shown
strength against linear, differential and statistical attacks. A MODIFIED
comparative result analysis is briefed in table 4. Modified 34 to 50 % 43 to 54% Yes
RNG
RNG possess good plaintext and key sensitivity property.
5
International Journal of Computer Applications (0975 – 8887)
Volume 111 – No 2, February 2015
IJCATM : www.ijcaonline.org 6