Research Article

An Improved Genetic Algorithm for Developing Deterministic OTP Key Generator

Algorithm 1

Pseudocode of the IGRKG method.
(1) Data: .
(2) Result: one-time pad of size , where is the size of the plaintext.
Remark : Generate an initial population Popu of size , where th chromosome is represented as binary string equivalent to .
Here the initial vector is computed via LCG equation, where . That is:
(3) for from 0 to do
(4) Set mod ()
(5) end for
Remark : Initialize two positive integers: Number of selection of chromosome pairs for crossover ( ) and Number of
selection of chromosomes for mutation ( ) by “1”. Sometime, we refer and as crossover and mutation rates,
respectively.
(6) Set 1, 1
Remark : Update crossover and mutation rate, if the size of population is more than or equal to 10. That is:
(7) if 10 then
(8) Compute
(9) if   then
(10) Compute . To maintain low probability mutation in case of large sized population.
(11) else
(12) Compute
(13) end if
(14) end if
(15) Initialize mod ()
(16)
(17) repeat
Remark : Select a pair of chromosome and determine a point of crossover. Repeat the process till counter reached .
(18) for from 1 to do
(19) Set (mod)
(20) Compute mod ()
(21) Set (mod)
(22) Compute mod ()
(23) Set mod (), where denotes the starting bit position of the chosen
chromosomes to be reproduced. Here , since a maximum integer value equivalent to its binary representation could
be 255 (i.e., ).
(24) Perform single point crossover between pairs of selected chromosomes. That is between and
with probability , where the starting point for mating is denoted by .
(25) end for
(26) Set
Remark : Select an individual from the mated population and perform a single bit complement mutation for each of the
following iteration, where the new population was generated in the previous steps (18)–(25).
(27) for from 1 to do
(28) Compute mod ()
(29) Set (mod)
(30) Set (mod) , where denotes the position of a bit of the selected chromosome,
.
(31) Change a bit of located at position .
(32) end for
(33) Update
(34) Set
(35) Update mod ()
(36) until counter reached