Co m pu ter Sci ence a nd Inf or mat i on  Tec h no lo gies   Vo l.   2 , No 1 Ma rch   2021 ,  pp.  1 6 ~ 25   IS S N:  27 22 - 3221 ,   DOI: 10 .11 591 / csi t.v 2i1 .p 1 6 - 25          16       Journ al h om e page http: // ia esprime .com/i ndex. php/csit   An opti mized  encryption  algorith m and F  fun ctio with   Dynami c sub stitution f or cr eating  S - box an d P - box  entries   for Bl owfish Alg orithm       Rekha  C, Kri s hna m urt hy G  N   Depa rtment  o C om pute Scie n ce a nd  Engi n ee rin g BNM   Instit u te of  T ec hno log y Benga luru ,   Karn at ak a, I ndia       Art ic le  In f o     ABSTR A CT   Art ic le  history:   Re cei ved   A pr   26 , 20 2 0   Re vised  Jun   17 , 20 2 0   Accepte J ul   19 , 2 0 2 0       In  the   fi el of  cr y ptogr aph y ,   the r has  bee n   m assive  amount  of  e nhanc emen t   in  m ani pu la t ing   the  plainte x t   whi ch  is  unr ea dab le,  le ss   pron e   to   cr ac ker s   and   hac ker s,   aga in   m ani pul at ing   th is  unre ada b le  form   to  ge t   bac k   pl ai n t ext   in   som wa y .   Th Blowf ish  al go ri thm  is  bloc ci ph er,   has  complex  in  struct ure   in   gene ra ti ng  P - b ox  and  S - box  ent ri es  using  enc r y pt ion  a l gorit hm .   B y   sim pli f y ing   th struct ure   of  enc r y pt ion  al gori thm  as  wel as  fu nct ion   with   d y nami subs ti t uti on,   thi ca i m prove   the   p erf orm anc b y   g e n era t ing  P - box  and  S - box  ent ri e of  blowfish  algorithm.  In   thi pape r,  th propo sed  m et hod   sim pli fie the  str uct ure   to   produ c P - box   and   S - b ox  en tri es   in   ord er  to   red u ce  computat ion al  cost  and   dem onstrat es  the  per form anc e   of   blowfish.     The   appr oa ch  c onside rs  diffe r e nt  sec ur ity   aspe ct namel y   EQ  ana l y sis,   KS   ana l y sis,   AV   an aly s is,   Ent rop y ,   Float ing   Freque nc y   ana l y sis   and   cor r el a ti on   of  horiz on ta l l y   a dja c ent   p ixels i an  en cr y pt ed  im age .   Ke yw or d s :   Bl ow fis h   Correl at ion  c oe ff ic ie nt   Entr op y   Floati ng freq ue ncy   P - box   S - box   This   is an  open   acc ess arti cl e   un der  the  CC  B Y - SA   l ic ense .     Corres pond in Aut h or :   Re kh a  C ,   Dep a rtm ent o f C om pu te Scie nce a nd E ng i ne erin g,     BNM I ns ti tute  of Tech nolo gy,     Be ng al uru,   Ka rn at a ka,   India .   Em a il rek hac 1976 @g m ai l.com       1.   INTROD U CTION   Crypto gr a phy  play a im portant  ro le   in   ne twork   sec ur it [ 1 ] that   tra nsfers   se ns it ive  inf or m at ion   acro s i ns ecu re   net wor ks   us i ng  e nc ryptio a nd  dec ryptio pr ocess.  In  cry pto gra ph y   the   Ke are   co nf i de ntial ity,  integrity an a uth e ntica ti on   [ 2 ] [ 3 ] Crypt ogra phic   al gorithm   is  cat ego rised  int tw di fferent  ty pes  sy m m e tric   and  asy m m et ri key  cry ptogra ph y.   I sym m e tric   key  cry ptogra phy,  only   one  key  is  us e t e ncr ypt  a nd  de crypt   the  i nfor m at ion .   T he  key   pl ay m ajor  r ole  i sym m e t ric  key  c rypto gr a phy.  De pendin on   the   ba sis  of   op e rati on  sym m et ric  key  cry ptogra phy  is  div ide i nto   t wo  ty pes  stream   ci ph e a nd  blo c ci ph e r A   bl ock  ci phe r   is  the  one  w he re  a   bl ock  of  pl ai ntext  is  c on ver te i nto   ci pherte xt  blo c of  sam le ng t [ 4 ] .   O ne  e xam ple  of   sy m m e tric   bloc ci pher   is  blowfis h.  A   blow Fish   is  a   16  rou nd  Feist el   netw ork   w hich   op e r at es  on   plai ntext  wit 64  bit  bl ocks  c onve rted   to   ci pherte xt  of  64   bi blo c ks ,   us in a   key  wh ic is  ra ng i ng  f r om   32   bits  to   448  bits   us e in   the   e nc ryptio a n decr y ption  of   plainte xt.   Bl owfis al gorith m   includes  tw proce dures:  key - exp a ns i on  pr oc edure  a nd  a   dat a - enc ryptio procedu re.  Data  encr y ption  f un ct ion   ta ke  plac via  16  rou nd  Fiest el  netw ork  as   sho wn  in  Fig ur 1,  each   r ound  ha ving  per m utati on   a nd  s ubst it ution,  us in F - functi on  as  s ho wn  in  Figure  2,  with  key  dep e ndent.   All  op e rati on  pe rfor m ed  are   X ORed   an ad di ti on on  32 - bit  words  a nd  a dd i ti on al   op e rati ons   are   four  in de xe a r ray  data  l ooku ps  pe r   r ound.   Key  e xp a ns i on  pr ocedure   c on ver ts   44 8 - bit  ke into  f ew  sub key ar r ay s o f  41 68 b y te [4 ] ,  [ 5 ] .   Evaluation Warning : The document was created with Spire.PDF for Python.
Com pu t. Sci.  I nf. Tec hnol.         An o ptimized e ncry ption al gorit hm   and  F fu nction w it h   Dy namic s ubsti tuti on  f or  cre atin g   ( Rekh C )   17   The  key  ex pansi on   proce dure   us es  key  to  gen e rati ng  P - box  a nd  S - box.  In it ia li zat ion   of  18 - ar ray  us in key  ta ke as   P from   P - ar ray  is  XO R ed  with  first  32  bits  of  the  ke y.  P1  XO Re with  sec ond  32  bits  of   the  key.  Re peat   this  cy cl un ti l   al P - ar ray  X O Re with   key  bi ts.   Af te r   init ia li zat ion pass  tw va lues  of  va lue   (P an P1  as  L0  a nd  R0 to   the  f unct ion  Encr y pt  as  m e ntion e i Fi gure  1,  w hich   ge ner at t wo   di ff e ren t   encr y pted   key   values   L 17  a nd  R 17.  The   ou t pu t   L 17  a nd  R 17  of  en crypti on  f unct io n,  is  then   co pied   to   P0  an P1 .  Repeat  t his step un ti l al l 1 8 - P  v al ue  e ntri es are  ge ner at e c on ti nu ously  in or der by  re placi ng the  outpu t.   In  the  sam way  S - bo e ntries  are  init ia li zed  with  fi xed  stri ng   li ke  pi ’  va lue  or  ze r o,  th en  pa ss  tw va lues  of    S - bo (S0   a nd  S as   L0   a nd   R0 )   to   the   e nc ryptio f un ct i on  as   s how in  Fig ur e   1,  ge ner at es   tw di ff e ren encr y pted  valu es  li ke  L1 a nd  R17   w hich  is  cop ie to  S a nd   S1.  T his  ste Co ntin ues  ti ll rep la ci ng  the   ou t put   by  c hangin c on ti nu ously   in   or der  al e ntri es  of  f our   S - boxe of  Bl owfi sh  al gorithm .   The   f un ct i on  F   w orks   ta kes  32  bit  val ue  a a in put,  and  it   div i ds  in to  four  bit  dat a.  Eac f our   bit  da ta   is   us e for  substi tuti on first  bit  is   us e to   get  32   bit  valu f r om   S - box  0,  sec ond  bit   data  is  us ed   t get  32  bit  valu from   S - bo 1,  t hir bit  data  is  use to  get  32   bit  value  from   S - box  a nd  final ly   la st  bit  for   S - box  3.   T he first  32   bit  val ue  i s   add e d   with  sec ond  32   bit  val ue  the  outp ut  is  XO Re wit thir 32  b it   value,   t he  outp ut  is  then  a dde d   with   four t val ue  wi ll   get  final  32   bi value  as  sho wn   i Fig ur 2.   To  pe rfor m   this  init ia li zation   and   ge ner at io of   P - box  a nd S - box t akes m or e ti m e b eca us of 16 - rou nd of e nc ryptio al gorit hm .             Figure  1.  Enc r ypti on  al gorith m  f or  b l owfish     Figure  2 I nter nal ope rati ons  of F fu nctio n       The  blowfis al gorithm   is  fa st  and   us e fu bl ock   ci phe r.   m any  i m ple m entat ion   ha bee cond ucted   ei ther  th rou gh   so ft war or  ha rdwar e But  ve ry  few  im ple mentat ion   has  be en  pr opos e to   generate   e ntries  of     P - bo a nd  S - box  f or  blowfis al gorithm .   A   ne sec ret  k ey   a bee pro pose for  blo c ci pher ,   blowfis h,   wh ic is  Feist el   net work  with   bl oc siz 64  bit  a nd  32 - bit  to   448 - bit  a   var ia ble  key   [ 5 ] .   T he  al gorithm   i m ple m ented   with  com plica te init ia li zat i on   a nd  la rge  da ta   caches  of  32 - bit  m ic ro pro cesso r.   Im plem en te d   nove VLSI   arch it ect ure  for  blowfis al go rithm   wh ic is   base on  pa rtia pipe li ned  str uc ture   [ 6 ] The   auth or  in   this   pa per  has  us ed  t wo   di ff ere nt  te ch niques  of   m od ifie Feist el   functi on,  fir st  is  it erati ve m et ho a nd,  sec ond  is  pa rtia lly   pip el ine te c hniqu e.   A   f our  sta ge  pip el ine a r chite ct ur is  use al on with  t wo  it erati on s   that  inc reases  t he   area   occupied   with  increasin t hro ughput  of  the  al gorithm   wh en  c om par ed  with  the  tw sta ge   pip el ini ng  w it it erati on t hat  will   reduce   the  area  occupie wit reduce t hro ughp ut.   Disc us ses   ge neral   optim iz at ion   pri nciples   of  de sig ning  t he   al gorithm s,  a nd  perform ance  analy zes   of  RC 4,   SEAL,   RC 5,   Bl owfish and  Khufu/ Khafr e   on   the  I ntel  Pe ntium   with  res pe ct   to  th os ge ner al   optim iz e pr i nciples   [ 7 ] .   P resen te d ,   on rou nd  VLSI  arch it ect ure  of the  BLO WFIS H,   w hich  is ba sed  on  the  l oop - f old in te c hn i qu e   com bin ed  w it sec ur e   dif fer e nt   m od es  (ECB,   CB C2,  CFB a nd  OF B2 of  operati on   [ 8 ] T he  a rch it ect ure   us e a   prot otype  c hip  to   im pl e m ent  by  us i ng   $0. 35$  /spl  m u/  CMO te ch nolo gy.   Pr ese nted   D RIL  arc hitec tu re,  wh ic is  four - ti er   arc hitec tur e   involvin both   software   an hard war e   des ign s f or  im pl e m enting  blowfis al gorit hm   us ing   arc hi te ct ur al   featur e li ke  in ner   lo op  pi pelinin an lo op   fo l ding  with  dy nam ic   reco nfi gurati on   [ 9 ] .   The  m ai ob j ect ive  of   the  resea rc w hich  is  present ed  in   this  pap e r   is  to  dev el op  a al gorit hm   wit lo w - powe r,  hi gh   t hro ughput real - tim e,  reli able  and  secu re  c r ypto  syst em t hat  can  be  ac hieve th rou gh  hardw a re  i m ple m entat ion s   [ 10 ] .   Im ple m ent   new   se cret - key  ' Bl ow - C AS T - F ish'   blo ck  ci pher  that  us e go od   featu res  of   bo t CA ST - 12 an Bl ow fis al gorithm us ing  VHDL  im plem entat ion   [ 11 ] .   Pro posed   m od ifie the  Bl ow fis al gorithm   by  enh a ncin it perform ance  in  te rm of  s pe ed,  Th r oughpu t,  P ow e c ons um ption   a nd  Av al a nch e   e ffec t   [ 12 ] Au t hor  has  pro po s ed   way  to  enh a nce  t he  pe rfor m ance  of  t he   Bl owfish   cry ptogra phy  al go rithm   by  introd ucin par al le pr oces sing   te c hniq ue  and  m aking   m od i ficat ion t the  Fiest el   (F)  functi on  of   Bl owfish   by  c ombini ng   Evaluation Warning : The document was created with Spire.PDF for Python.
                          IS S N :   2722 - 3221   Com pu t. Sci.  I nf. Tec hnol. V ol. 2, N o.   1, M arch 2 021 1 6     25   18   the Bl owfish  a nd  t he  Ru nge - ku tt a (R K)  Me thod.  T he  functi on   of Bl owfish has  been   m od ifie with  diff e re nt   form ulae  and  the  ou tc om of   series  of  RK - Bl ow fis h   al gor it h m wer co m par ed  with   th Bl owfish   al gorithm .   The  blowfis a lgorit hm   has  been   wi dely   us e in  netw ork  s ecur it m e tho to  en han ce  t he   secur it by   i m ple m enting  thr ough  s oft wa re  or  hard war e   bas ed   on  var i et of  as pects  li ke  s peed,  sec ur it y,  portabil it et c.   The  sc ope  of  th is  work  inclu de ge ner at io of   P - b ox  a nd   S - box  e ntries  us in m od ifie fiest el   networ k,   wh i c is  si m ple  struct ur e in  orde to  reduce  th com pu ta ti onal   co st  of   ge ner at in P - bo an S - box  entries  in   bl owfis al gorithm The   m ai m otivatio of  pro po se w ork   is   to   des ign  a nd  im ple m entat ion   of   ge ner at in P - bo a nd     S - bo entries   by  reducin th num ber   of  rounds   instea of  16 -   r ounds   of  e ncr y ptio al gorithm   to  ov e rco m e     the  lim it a ti on   of  bl owfish  al gorithm In   this  pa per,  sim ple  P - bo a nd   S - box  ge ner at in a lgorit hm   to  ov e rco m the co m pu ta ti ona l co st i s d e sign e a nd im ple m ented  usi ng  m od ifie fiest e l netw ork.       2.   THE  PROPO SED  APP ROAC H   In   t his  sect ion,   an  ap proac f or   ge ner at in P - bo a nd   S - box  f or   blowfis al gorithm   is  pr ese nted   The  blowfis a lgorit hm   ta kes  P - ar ray  val ues,  init ia li zed  by  m ast er  key  K,   S - bo x,   i niti al ized   by  Pi  or   ze r val ue,  will   be   ge ne rated  t hro ugh  m od ifie e ncr y ption  al go rithm   pr oce dure.   T he   encr y ption  pro cedure   m od ifie by   reducin num ber   of  rou nds,  it erati on with  9 - rou nd s in ste ad  of   it erati on  with  16 - r ounds  in   the  proce dure .   By   reducin g t he   num ber   of   r ounds   in  t he e nc ryptio proce dure   we   ca n r ed uce  t he t im as   well   r ed uctio in  t he  com pu ta ti on al   cost  of  bl owfis al gorithm .   The  al gorithm   tak es  16 - byte   Ke (K0  K K K K K5   K K K8   K K 10   K 11   K 12   K13  K 14   K 15   K16 ) as  a in pu to  gen e rate  al 18  P - val ues.   First   w ord  K0K 1K2 K from   key  is  stored   i P an s econde  w ord   K4K 5K6 K 7   from   key  is  ta ken   in  P sim il ar ly   al key  values  are   store in  P - val ues  li ke       [K0  K 1  K 2   K3 ]  =  P(0)       [K4  K 5  K 6   K7 ]  =  P(1)       [K8  K 9  K 10   K11 ]  =  P(2)     [K1   K 13  K 14  K1 5] = P ( 3)      [K0  K 1  K 2   K3 ]  =  P(4) ....... . P ( 18)     Af te r   init ia li zat ion ,   pa ss  t wo  values   P an P1  each   of  32 - bit,  (as  le ft  hal L a nd  ri gh t   half   R0 t m od ifie al gor it h m . I n t he  al gorithm ,     L1  =  L0 is  XOR ed  with P a nd    R1 =  (R0 i s XORed  w it h P 1) XORe d wit h F - f un ct io n wit h i nput L a nd S - bo     T he swa L and   R an c onside red   as  i nput  for  ne xt  it er at ion Re pe at   these  ste ps   t ge the  ou t pu with  tw val ue P0   a nd   P1,  f or  this  the  m od if ie enc ryptio al gorit hm   ta ke it erati ons  in ste ad  of  16  it er at ion s.   The   flo wc har t   of  t he   pro pos ed  m od ifie e ncr y ption  al go rithm   is  giv e in   F ig ure  a nd  the   al go rithm   fo r   pro po se e ncr y ption  al gorith m   is  giv en   in  sect ion   4.1 .   Th f unct ion  ta kes  32  bit  valu as  an   in pu a n div i ds   into  f our  bit   value.  Eac f our   bit  value   is  use for  s ubs ti tuti on   from   each  f our  S - box  an fir st  bit  from   each  bit  val ue  is  co ns ide r ed  f ro m   wh ic S - bo we  s ho uld   get  the  val ue.   T he  fl ow c har of  the  pro po s ed   m od ifie F -   f unct ion i giv e n i n   Fig ure  a nd the alg ori thm   is  giv e i se ct ion   2 . 1.         Evaluation Warning : The document was created with Spire.PDF for Python.
Com pu t. Sci.  I nf. Tec hnol.         An o ptimized e ncry ption al gorit hm   and  F fu nction w it h   Dy namic s ubsti tuti on  f or  cre atin g   ( Rekh C )   19         2.1.   Prop os ed  m odi fied encr yp ti on   algorit hm  an d  d ynamic   subst i tu ti on  i n F - fu nc tio n   The  m ai go al   of   t his  w ork  i to  pro vid e   m or sec uri ty m ini m iz es  the  tim ta ken   for  ge ner at i ng    P - bo a nd S - box  ent ries an d com pu ta ti on al   cost. T he pr op os e al gorithm  inclu des red uc ti on   of  c om pu t at ion al   cost  by  re du ci ng  the  num ber   of  it erati ons  i the   enc rypti on  al gorithm   with  r ounds   and  it erati ons,  w he re  or i gin al   al go rithm   us es  16  r ound  a nd  it er at ion i orde r   to  gen e rate  P - bo a nd  S - bo e ntries.  A nd  al so  pro vid es  bette r  secu rity  b y u sing dy nam ic  su bs ti tuti on in  m od i fied F f unct ion .             Figure  3 .   Flo w char of the m odifie encr y ption al gorithm     Figure  4 .   Flo w char of the m odifie d F un ct io n F       3.   RESU LT S  AND  DI SCUS S ION   In  this  sect ion,   The   or i gin al   bl owfish   al gorit hm   [ 5 ]   a nd  m od ifie bl owfis al gorithm   are  app li ed   on   the  im age  A rm s.b m wit t he   sam key.  T he   com par iso ar m ade  on  both  or i gin al   an m od ifie al go r it h m s   by  m aking   us e   of   a valanc he  eff ect e ncr y pt ion   qu al it y,  ke sensiti vity   and   sta ti sti cal   a naly sis.   The  or iginal   i m age  of   Ar m s.b m in  Fig ur e   5,   is  e ncr y pted  and   dec rypted  by  ap plyi ng   or i gin al   blowfis al gorithm   are  sh ow in.  Sam or igi nal  im age  is  e ncr y pted   an decr y pted   us i ng  m od ifie blowfis al gor it hm The  Fig ure   a nd     Figure  s how the  res ult  of  encr ypte an dec rypte im age  us in or iginal  al gorith m   and   Fig ur e   a nd     Figure  s hows  the  resu lt   of e ncr y ption an d decry ption i m a ges by a pp ly in m od ifie d al gorithm .     Evaluation Warning : The document was created with Spire.PDF for Python.
                          IS S N :   2722 - 3221   Com pu t. Sci.  I nf. Tec hnol. V ol. 2, N o.   1, M arch 2 021 1 6     25   20       Fi gure   5 .   O rigi nal  im age ar m s bm p           Figure  6 .   Enc r ypte im age  of  arm s   bm us in or i gin al  alg ori thm       Figure  7 .   Dec r ypte im age  of  ar m bm us in or i gin al  alg ori thm           Figure  8. Enc r ypte im age  of  arm s   bm us in m od ifie al gor it h m       Figure  9. Dec r ypte im age  of  ar ms   bm us in m od ifie al gor it h m       3.1.   Encr yption  Q ua li t te st   The  e ncr y ptio qu al it (EQ)   te st  in  \ ci te {13 sw f},  \ ci te {1 5s w f}  m easur e the  qu al it of  enc ryptio wh ic is  base on  t he  dev ia ti on  bet wee th plainte xt  im age  a nd  ci phe r te xt  im age.  Th m or de viati on  of  ci ph e rtext  c ompare to   plaint ext, b et te r   is  th enc ryptio al gorithm EQ   te st  is  the   a ver a ge   num ber  o f   c ha nge s   to  eac gr ey   le vel  L   bet ween  or i gin al   a nd  e nc rypted   im ages.  T he  m at he m atical   form ula  an t he  ste ps   t pe rfor m   EQ  te st i giv e as:      =   [   ( )   [ ( ) ] ] 255 256     Let   an F'   is  represe nted  as   or i gin al   im ag and   e nc rypte im age  of   siz M*N  pix el with  gr ey   le vels.  At  posit ion ( x, y) ,  the  grey  levels   of th e F  a nd F' ,(0  ≤  x ≤  M - 1,  0 ≤  y  ≤ N - 1) is   repre sented  as  F (x,y)  a nd   \ (F ' \ )$ ( x, y)  \ in   L$ ran gi ng  fro m  $ to  255$.   The  ste ps  a re:     Com pu te   HL ( F)   t he  num ber   of  occ urren ce of  eac gray   le vel  L   in   the   ori gin al   im ag an HL ( \ (F ' \ ))  denotes t he num ber  o f occ urr ences  of each  grey  level i n t he  en c rypted  im a ge.     Com pu te  the a ver a ge n um ber  of c hanges t o ea ch  gr ey  le vel L  us in a bove  g ive m at hem at ic al  f or m ula.   Encr y ption   Q ualit te st  is  cal culat ed  us i ng   both  or i gin al   an m od ifie blowfis al gorithm   is     sh ow in  Ta ble1.           Evaluation Warning : The document was created with Spire.PDF for Python.
Com pu t. Sci.  I nf. Tec hnol.         An o ptimized e ncry ption al gorit hm   and  F fu nction w it h   Dy namic s ubsti tuti on  f or  cre atin g   ( Rekh C )   21   Table  1.  C om par iso of enc ryption q ualit ie s o f  original a nd  m od ifie bl owfish  al gorithm     for diffe re nt   r ounds   Nu m b e o f   Ro u n d s   Origin al  Blo wf ish   Mod if ied   Blo wf ish   2   1 9 0 .351   1 6 7 .570   4   2 0 1 .898   2 0 2 .28   6   8   10   12   14   16   2 0 0 .132   2 0 3 .484   2 0 2 .796   2 0 3 .273   2 0 2 .046   1 9 2 .414   1 9 6 .507   1 8 0 .179   2 0 3 .601   1 9 9 .390   2 0 2 .859   2 0 2 .781       3.2.   Key Sensi ti vit Te s t   Key  of  16 - c har act er   with  128  bits  is  us ed   for  e ncr ypti on  and  dec ryptio n.  The   Key  se nsi ti ve  te st  [ 5 ],  [1 4 ]  h a been c arr ie d o ut as  fo ll ow s     Applyi ng the  16 - c har act e r 128 - bit key,  K ey 1,  t E ncr y pt a im age A rm s.b m by origi na l al gorithm .     Chan ge  a ny  r a ndom ly   sel ect e on e   bit  from   Key1.  T hen  f r om   this  m od ifi ed  key,  Key2,  encr y pt  the  s ame   i m age  by  a pply ing  to  ori gin al   al gorithm Ex  ADF37 465E 262AB1F 5DE C94A0AF 25 F 27,  from   this  ke y1   we  ha ve  ra ndom ly   sel e ct ed  F   as   sho wn  in   bold   an cha nged   to  B   a A DF378   465E 262A B1 F 5DEC9 4A0 A25 B 27  wh ic is  key2.     Apply t hese  tw o keys t o m od ifie d blo wf is a lgorit hm  u sing   the sam e i m ag e an the c om par e d.     The  res ult  is  show i belo Table  2,   c om par iso of   both  ci ph e red  im age w hich  a re  e nc rypted   by  or i gin a l   as w el l as m odifie al gori t hm usi ng these t w o diff e re nt k ey s     The   res ult  is   99. 384781   of   di ff e ren ce w hen  we   e ncr y pt  t he   im age  us i ng  or i gin al   blow fish  al gorithm   w it key1  a nd  wh e we  e nc rypt  the   sam i m age  usi ng   sam or igi nal  al gorithm   with  key2,  in   te rm of   gr ey   sc al e   values  where   there  is only  on e b it  d i ff e ren ce  in  the se tw o k ey 2.     The  res ult  is  99. 539299   of  di ff e ren ce   w he we  e ncr y pt  the   im age  us in m od ifie bl ow fish  al gorithm   with   key1  a nd  wh e n we e nc rypt the  sam e i m age u s ing   sam e algo r it h m  w it ke y2 .       Table  2 . C om par iso of k ey   s ensiti vity  o f  or iginal an m odifie d blo wf is h al gorithm     for diffe re nt ro unds   Nu m b e o f   Ro u n d s   Origin al  Blo wf ish   Mod if ied   Blo wf ish   2   9 5 .86   9 6 .04 9   4   9 9 .56 7   9 9 .57 8   6   8   10   12   14   16   9 9 .45 9   9 9 .61 2   9 9 .59 0   9 9 .59 9   9 5 .58 8   9 9 .41 0   9 9 .58 3   9 9 .65 2   9 9 .60 2   9 9 .58 8   9 9 .58 0   9 9 .62 8       3.3.   Avalanche E ffec t   The  a valanc he  eff ect   i [ 5 ] [ 13 - 1 4 ]   m eans  if  the re  is  a   cha ng e   in  one  bit  in  the  plain   te xt   then  t here   will   be   nu m ber  of   bits   cha nge in   the   ci ph e r   te xt.   To   c om pu te   a valanc he  e ffec we   need  t change   on e   bit  from   the  plai te xt  ( i m age  Ar m s.bm p) nam ed  as  an  im age  BArm s.b m p,   an then  e ncr y pt  this  im age  us in both   or i gin al   blowfi sh   a nd  m od ifie blowfis al gorithm s.  He re  the  pr opos e a lgorit hm   is  com par ed  with   ori gin a l   al gorithm   at   diff ere nt  r ounds   al ong  with  f our  cases T he   Table  pr ovides  w hich   al gorithm   giv es   bette r   avalanc he  e ff e ct .     Ca se  1:   Com par in A valanc he  e ff e ct   f or  e ncr y pted   im ag of   A rm s.b m a nd  B 1Arm s.b m with   sam key us in g or i gin al   and m od ifie a lgorit hm .   Ca se  2:   Com par in A valanc he  e ff e ct   f or  e ncr y pted   im ag of   A rm s.b m a nd  B 1Arm s.b m with   sam key us in g or i gin al   and m od ifie a lgorit hm .   Ca se  3:  C om par in Av al a nch e   eff e ct   f or  enc r ypte im age  of   A rm s.b m wit key1   an key us in ori gin a an m od ifie al gor it h m .   Ca se  4:  Com par in A valanc he  ef fect  f or   e ncr y pted  im age  B1MA ND.bm with  key1a nd   key2  us i ng   or i gin al   and m od ifie a lgorit hm .       Evaluation Warning : The document was created with Spire.PDF for Python.
                          IS S N :   2722 - 3221   Com pu t. Sci.  I nf. Tec hnol. V ol. 2, N o.   1, M arch 2 021 1 6     25   22   Table  3 . C om par iso of avala nch e  ef fect  of   or i gin al  a nd m od i fied blo wf is al go rithm  f or d if fer e nt ro unds   with  four cases   Nu m b e o f   Ro u n d s   Cas e 1   Cas e 2   Cas e 3   Cas e 4   Org   Mod   Org   Mod   Org   Mod   Org   Mod   2   1123   2527   770   1588   2015   1612   1630   2013   4   1149   2390   761   1547   2049   1620   389   3328   6   1137   2416   772   810   1131   1652   2473   1155   8   992   2552   716   1570   1131   1652   1162   2440   10   2340   1186   1513   778   2437   1151   1976   1623   12   2335   1192   882   1428   1168   2851   1069   2471   14   2379   1182   825   1474   1953   1646   2425   1152   16   1206   2333   800   804   1999   1141   2439   1135       3.4.   Co rrel at i on  c oeffici ent   The  c orrelat ion   coe ff ic ie nt  i determ ined  r el at ion sh i bet ween   horiz on t al ly   adj acent  pix el in  a i m age [ 9], [1 1]. Th e ste ps  for   determ ining  th e correlat ion   of h ori zo ntal ad ja cent p ixels i n an im age A rm s .b m is as f ollo ws     Fr om  the  or igi nal im age an d t heir  e ncr y pted   i m age,  sel ect  N   pairs o f horiz on ta ll y ad j ace nt p i xels.     Sele ct   pix el r andom ly   and   pi xels  ad j acent  to  them   fr om   t he  both   or i gina i m age  (A rm s.b m p)   an the ir   encr y pted  im a ges usin g b oth   or i gin al  alg ori thm  as w el l as  m od ifie al gor it h m .     Using  $r _{x y} f or m ulae  to  fin co rr el at io coe ff ic ie nt,  wh e re  a nd  represent  gr e scal values   of   horizo ntall y ad j acent  pi xels in  an  im ag e.      =    ( , ) ( ) ( )     wh e re  D (X)  a nd  D(Y)  re prese nts  the   var ia nc of  a nd  val ues  a nd  C OV( X,Y)   is  c ov a ria nce  of  a nd   y and i giv e n by      ( , ) =   1   ( ( ) ) ( ( ) ) = 0     Wh e re   N   repre sents  num ber   of  horizo ntal  a dj acent  pix el s   sel ect ed  rand om l y,   E (X)   an E( Y represe nts  the  m ean  valu es  of  a nd  y   va lues.   T his  te st   is  ca rr ie out  for  a bout   ra nd om l sel ect ed  horizo ntall ad j acent   pix el s   f ro m   th or igi nal  im a ge   A rm s.BM P   a nd  e ncr y pted  im ages.   The us i ng  a bove   e qu at io ns  c orrelat i on   c oeffici ent  will   be   c om pu te a nd  is   as  sho wn  in   bel ow  Fig ure.   10,   Fi gure.   11,  a nd  Fig ur e .   12.   T he   co rr el at ion   coeffic ie nt  of  or i gin al   im age  is  0.0 7205 a nd  for   ci pher   i m age  wh ic is   e ncr ypte by   blowfis al gor it h m   is   0.005 616  a nd  for  m od ifie a lgorit hm   is  - 0. 429036.  I bot ori gi nal  an m od ifie al gor it h m   the  correla ti on  coeffic ie nts  for  p la intext  im ag e w it t hat  of  c iph e rtext im ages ar far apa rt .             Figure  10 .   C orrelat ion   distrib ution o t wo  horizo ntall y ad j acent  pi xels fo r or igi nal im age ar m s   BMP     Figure  11 .   C orrelat ion   distrib ution o t wo  horizo ntall y ad j acent  pi xels fo e ncr ypte im age  us in g or i gin al   al gorithm     Evaluation Warning : The document was created with Spire.PDF for Python.
Com pu t. Sci.  I nf. Tec hnol.         An o ptimized e ncry ption al gorit hm   and  F fu nction w it h   Dy namic s ubsti tuti on  f or  cre atin g   ( Rekh C )   23       Figure  12 .   C orrelat ion   distrib ution o t wo ho rizo ntall y adj a cent p i xels fo r e ncr y pted  im a ge usin m od if ie d   al g ori thm       3.5.   Entropy   The  e ntr op [1 5 ]   of  an  i nfor m at ion   data  is  m easur e i bits  per   c ha racter.T he  e ntropy  is  c al culat ed  as   the  av era ge  am ount  at   w hich  i nfor m at ion   data  is  pr oduce by   truly  rand om   so ur ce  of  da ta To   cal culat this  m ean,  the   in di vidual  in f or m a ti on   a re  wei ghte wi th  t he  prob a bili ti es  of  t heir  occ urre nc e.  T he  m at hem at ic al  form ula f or cal culat ing   entr op y i s     ( ) =   ( )   log 2 1   ( )      2 1 = 0   =     wh e re  p( be  t he  pro ba bili ty   of   occurre nce  of   c har act er  and   e ntr op is   pr ese nted  i bi ts.  Af te r   evaluati ng t h above e quat io n 4, we  obtai n i ts entr opy as  H(m = 8  , w hich i s co r res pondin to  a tr uly ra ndom   so urce.  Give an  in form at ion   so urce  that  ge ne rates  ra ndom   m essages,  in  ge ner al   it entr opy  value  is  le ss er  tha the  ideal   one Howe ver,  whe t he  m essages   are   e ncr ypte d,  their   e ntropy  s hould  be  8.  If  the  outp ut  of  a   blo c ci ph e r e m i ts  with  entr op le ss   than  8,   t her e xists  certai de gr ee  of  predict abili ty , which  end a nger  it se cur it y .   Let   us  c onside t he  ci ph e rtex of  a im age,  encr y pted   usi ng  t he   ori gin al   as  wel as   m od ifie al go rith m the   nu m ber   of  occ urren ce   of  eac ci phe rtext  blo ck   an t he  prob a bili ty   of   oc currence   is  c om pu te d.   T he  obta ine inf or m at ion   e nt ropy  is  ve ry  m uch  cl ose   t t he   the or et ic al   value  of  8.  T his  m eans   that  le a ka ge  of  t he  i nform at ion   data  in   the   e nc ryptio proces is  ne gligible  and  the   e ncr y pt ion   syst e m   is  secur e   a gainst   entr op y   at ta ck.  T he  entr op y i s calc ulate d usin e quat ion.  a nd is  li ste in  belo w  Tab le   4.       Table  4 . C om par iso of entr opy f or d i ff e ren t  roun ds   of   ori gi nal a nd m od ifi ed  blowfis al gorithm   Nu m b e o f   Ro u n d s   Origin al  Blo wf ish   Mod if ied   Blo wf ish   2   6 .74   6 .86   4   7 .03   7 .03   6   8   10   12   14   16   6 .96   7 .06   7 .07   7 .06   7 .05   7 .07   7 .07   7 .05   7 .07   7 .06   7 .06   7 .07       3.6.   Floating  Freq uency   The  floati ng  f r equ e ncy  [ 1 6 ]   how  m any  dif fe ren c har act e rs  are  to b e fou nd  in  any g ive 64 - c har act e long  se gm ent  in  ci phe rtext.  F reque ncy  anal ysi is  base on  ce rtai le tt er an c om bin at ion of  le tt ers  occ ur   with  var yi ng   f r equ e ncies.   T he   f reque ncy  f un ct ion   c onside rs   seq ue nces  of  char act e rs  i t he  64  c har act e rs  l ong  segm ent  and   c ounts  ho m any  diff e ren c harac te rs  are  to  be   found  in  t his  64 - c har act e lo ng  segm ent.  The the   segm ent  is  sh if te one  c har a ct er  to  t he  ri ght  and  the  cal c ulati on  is  re peated This  proce dure   res ults  in  s um m ary   of  the   ci ph e rte xt  w hich   ide n ti fy  the   places   w it high  a nd   lo i nfo rm ation   densi ty De pe ndin on   the   str uctu re   and  c on te nt  of  the  data  in   the   segm ent,  enc rypted   im ages  (bm file s)  val ue obta ine usua ll li between  a nd   20,  as  s how i Fi gure  13   an the  floati ng  fr e qu e ncy  f or  t he  e n crypte i m ages  us i ng   ori gin al   a nd  m od ifie al gorithm  is aa shown i Fi gu re s   14 and  15.     Evaluation Warning : The document was created with Spire.PDF for Python.
                          IS S N :   2722 - 3221   Com pu t. Sci.  I nf. Tec hnol. V ol. 2, N o.   1, M arch 2 021 1 6     25   24       Figure  13. Fl oa ti ng   fr e qu e ncy  for ori gin al  im age a rm s   b m p           Figure   14 .   Floa ti ng   fr e qu e ncy  for  e ncr y pted   i m age u si ng original al go rithm           Figure  15 .   Floa ti ng   fr e qu e ncy  for  e ncr y pted   i m age u si ng m od ifie d al gorith m       4.   CONCL US I O N   To  e nhance   th secu rity   feat ur es   of  blow fish  al gorithm the  pro pose m e thod  has  bee desig ne a nd   i m ple m ented   to  cre at S - box  and  P - box  val ue of  blowfis al gorithm   us ing   m od ifie e nc ryptio al gorit hm   and   m od ifie f un ct ion   with  dyna m ic   su bs ti tuti on.  T he  m ai m otivati on  be hind  f or  pr opos e al gorithm   is  to  reduce  the  ti m fo r   ge ner at in s - box  and  P - box  val ue by  re duci ng   the   num ber   of   r ounds,   it era ti on s   with   rounds,  instea of  it erati on s   with  16   r ounds   in   the   e ncr y ption  al go r it h m   for  blow fish  al gorithm . F ro m   the  res ults,  the   pro po se m od i fied  e ncr y ptio al go rithm   per f or m bette i al the  aspec ts  when   com pa red  with   the  or i gin al   blowfis al go rithm .           Evaluation Warning : The document was created with Spire.PDF for Python.
Com pu t. Sci.  I nf. Tec hnol.         An o ptimized e ncry ption al gorit hm   and  F fu nction w it h   Dy namic s ubsti tuti on  f or  cre atin g   ( Rekh C )   25   REFERE NCE S   [1]   Kum ar,   M.   Ana nd  and   S.   K art hi ke y an.  Inve st ig at ing   th e   Eff ic i e nc y   of   B lowfish  and  R ej ind ael   ( AES)  Algorit hm s.”   Inte rnational   Jo urnal  of  Comput er  Net work   and  I nformation  Se cu rity ,   vol .   4 ,   pp .   2 2 - 28,   2 012 .     [2]   Behrouz   A .   Foro uza n .   Cr y p togr aph y   and   Netwo rk  Secur i t y ,   Tat Mc Gr aw - Hill ,   2nd  edition ,   200 8.   [3]   Anand  Kum ar  and  Dr.  S.  K art hik e y an .   Inve stiga t ing  th Ef fic i ency   of  B lo wfish  and  Rejin dae Algor it hm s .”   Inte rnational   Jo urnal  of  Comput er  Net work   and  I n formation  Se cu rity ,   pp.   22 - 28,   2 012.   [4]   W il li am Sta ll ing s . “ Cr y ptogr aph y   and  N et work S ec uri t y .   F if th   E dit ion, Pears on  Publ ic a ti on ,   Pre nti c ha ll,  2013 .   [5]   B.   Schneier.  Descri pti on  o   n e var ia bl e - l ength  ke y ,   64 - b it   b lo ck  ci ph er  (blowf ish ).   Inte rnational   Workshop  on   Fast  Soft war E ncry pti on ,   Sprin ger ,   B erlin,   Heid el ber g ,   vo 809 ,   pp  191 - 204,   199 4.   [6]   Kart higaikum ar,  P.   and   K.   Baska ran .   Parti a lly   P i pel in ed  VLSI   Im ple m ent a ti on   of   Blowfish  En cr y p ti on/De cr y pti on   Algorit hm . ”  Int.  J.   Imag Gr aph .   vol.   10 ,   pp .   327 - 341,   2010 .   [7]   Schnei er   B . ,   W h it ing   D.   Fast   software   en cr y pt io n:  Design ing   en c r y pt ion   al go rit h m for  opt imal   software   spee d   o the   Int el   Pent iu m   proc essor.”   In Bi ham  E .   ( Eds)  Fast  Soft ware  E ncry pti on .   FSE  1997.   Lect ure  N ote in  Compute r   Sci en ce ,   Springe r,   Be r li n ,   He ide l ber g vo 1267 ,   2 42 - 259,   1997 .   [8]   Yeong - Kang  Lai   and  Yu - Chuan  Shu.  novel   VLSI  arc hitec tur for  a   var i able - l engt ke y ,   64 - bi Blowfish  bloc k   ci pher .   1999  I EE E   Workshop  on  Signa Pr oce ss ing  Syst e ms .   SiP 99 .   Design  and  Im ple menta ti on  ( Cat.  No. 99 TH 8461) ,   Ta ip ei ,   T ai wan ,   pp.   568 - 577 ,   19 99 .   [9]   Sudarshan  T . S. B. ,   Mir  R . A.,  Vijay a la kshm S.   DRIL   Flex ibl e   Archi t ectur for   Blowfish  Enc r y pt ion  Us in g   D y namic  R ec onf igura ti on ,   Rep lic at ion ,   Inne r - Loo Pipel ini ng ,   Lo op  Folding  Tech nique s.”   In Srik ant han  T.,  Xue  J. ,   Chang  CH.  ( Eds Advanc es  in  C omputer  Syste ms   Archi t ec ture .   A CSAC  2005.   Le c ture  Note in   Computer  Sci en ce Springer,   B erlin,   Heidelbe rg vo l 3740,  pp .   625 - 6 39,   2005 .   [10]   P.Kart higaiKum ara ,   K.B aska ran .   An  AS IC  implementation   of  l ow  power  and  high  throug hpu t   blowfish  cr y pt al gorit hm .”   M ic r oel e ct ronics  Jou rnal vol .   41 ,   no .   6,   pp.   347 - 355,   June  2010.   [11]   Krishnam urth y   G.N,  Dr.  V.  R a m aswam y ,   Leel G.H  and  As halatha   M. E .   Blow - CAS T - Fis h:  New  64 - bit   B loc k   Ciphe r .”   IJCSNS   Inte rnationa Jo urnal  of  Comput er  Scien ce  and  Net work  Se curity vo l .   8 ,   no . 4,   p p.   282 - 290,   Apri l   2008.   [12]   K rishnamurth y   G.N,  Dr.  V.   Ra m aswam y   and   Mrs .   Le e la   G . H.   Perform anc en hanc ement   of  Bl owfish  al gorit h m   b y   m odif y ing   i ts  f unct ion .”   Innov ati v Al gorithm and  Te chni q ues  in   Au tomat ion,  Industrial   El e ct ronics   and   Tele communic a t ions pp.   241 - 24 4 2007 .   [13]   Ramasw am y   Krishnam urth y   N.   Enc r y pt io qua li t y   a na l y s is  and   se cur ity   e val ua ti on   of   blo w - ca stfish   using  digi tal  images.   Comm unic ate t Inte rnat ional   J ournal  of  Comp utat ional Sc ie nc e ,   20 08 .   [14]   Shail aja   S1,   Dr  Krishnam urth y   N2 .   Com par i son  of  B lowfish  and  C ast - 128  Al gorit hm Us ing  Enc r y pt ion  Qua l ity ,   Ke y   Sensit ivi t y   and  C orr elati on   Coeff icient  Ana l y sis.   Ame rican   Journal  o Enginee ring   Re s earc ( AJ ER ) ,   vol .   3 ,   no.   7 ,   pp - 161 - 16 6,   2014 .   [15]   Yue  W ua,   Jos ep P.  Noonan a,   S os  Agaia nb .   Shannon  En trop y   b ase Randomnes Mea surem ent   a nd  Te st   for  Im ag Enc r y pt ion .   Inf orm ati on  Scienc es ,   2011   [16]   Sonal  Kulshresht ha,   Vikr am  Verm a,   Ric h Kalr a .   Anal y t ical  Vie of  Cr y ptogr ap hic   T ec hniqu es  t hrough  Cr y p tool .”   Jo urna of Te le c om m unic at ions vol.   10 ,   no .   2 ,   pp .   22 - 26 ,   2011 .         Evaluation Warning : The document was created with Spire.PDF for Python.