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 n  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 f  C om pute r  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 d  J ul   19 , 2 0 2 0       In  the   fi el d  of  cr y ptogr aph y ,   the r e  has  bee n   a  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 e  wa y .   Th e  Blowf ish  al go ri thm  is  a  bloc k  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 e  struct ure   of  enc r y pt ion  al gori thm  as  wel l  as  F  fu nct ion   with   d y nami c  subs ti t uti on,   thi s  ca n  i m prove   the   p erf orm anc e  b y   g e n era t ing  P - box  and  S - box  ent ri e s  of  blowfish  algorithm.  In   thi s  pape r,  th e  propo sed  m et hod   sim pli fie s  the  str uct ure   to   produ c e  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 s  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 n  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 g  Aut h or :   Re kh a  C ,   Dep a rtm ent o f C om pu te r  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 s  a n  im portant  ro le   in   ne twork   sec ur it y  [ 1 ] ,  that   tra nsfers   se ns it ive  inf or m at ion   acro s s  i ns ecu re   net wor ks   us i ng  e nc ryptio n  a nd  dec ryptio n  pr ocess.  In  cry pto gra ph y   the   Ke y  are   co nf i de ntial ity,  integrity ,  an d  a uth e ntica ti on   [ 2 ] ,  [ 3 ] .  Crypt ogra phic   al gorithm   is  cat ego rised  int o  tw o  di fferent  ty pes  sy m m e tric   and  asy m m et ri c  key  cry ptogra ph y.   I n  sym m e tric   key  cry ptogra phy,  only   one  key  is  us e d  t o  e ncr ypt  a nd  de crypt   the  i nfor m at ion .   T he  key   pl ay s  a  m ajor  r ole  i n  sym m e t ric  key  c rypto gr a phy.  De pendin g  on   the   ba sis  of   op e rati on  sym m et ric  key  cry ptogra phy  is  div ide d  i nto   t wo  ty pes  stream   ci ph e r  a nd  blo c k  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 d  i nto   ci pherte xt  blo c k  of  sam e  le ng t h  [ 4 ] .   O ne  e xam ple  of   sy m m e tric   bloc k  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 h  64  bit  bl ocks  c onve rted   to   ci pherte xt  of  64   bi t  blo c ks ,   us in g  a   key  wh ic h  is  ra ng i ng  f r om   32   bits  to   448  bits   us e d  in   the   e nc ryptio n  a n d  decr y ption  of   plainte xt.   Bl owfis h  al gorith m   includes  tw o  proce dures:  a  key - exp a ns i on  pr oc edure  a nd  a   dat a - enc ryptio n  procedu re.  Data  encr y ption  f un ct ion   ta ke  plac e  via  16  rou nd  Fiest el  netw ork  as   sho wn  in  Fig ur e  1,  each   r ound  ha ving  per m utati on   a nd  s ubst it ution,  us in g  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 d  ad di ti on s  on  32 - bit  words  a nd  a dd i ti on al   op e rati ons   are   four  in de xe d  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 y  into  f ew  sub key ar r ay s o f  41 68 b y te s  [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 a  C )   17   The  key  ex pansi on   proce dure   us es  a  key  to  gen e rati ng  P - box  a nd  S - box.  In it ia li zat ion   of  18 - P  ar ray  us in g  key  ta ke n  as   P 0  from   P - ar ray  is  XO R ed  with  first  32  bits  of  the  ke y.  P1  XO Re d  with  sec ond  32  bits  of   the  key.  Re peat   this  cy cl e  un ti l   al l  P - ar ray  X O Re d  with   key  bi ts.   Af te r   init ia li zat ion ,  pass  tw o  va lues  of  P  va lue   (P 0  an d  P1  as  L0  a nd  R0 )  to   the  f unct ion  Encr y pt  as  m e ntion e d  i n  Fi gure  1,  w hich   ge ner at e  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 d  P1 .  Repeat  t his step un ti l al l 1 8 - P  v al ue  e ntri es are  ge ner at e d  c on ti nu ously  in or der by  re placi ng the  outpu t.   In  the  sam e  way  S - bo x  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 o  va lues  of    S - bo x  (S0   a nd  S 1  as   L0   a nd   R0 )   to   the   e nc ryptio n  f un ct i on  as   s how n  in  Fig ur e   1,  ge ner at es   tw o  di ff e ren t  encr y pted  valu es  li ke  L1 7  a nd  R17   w hich  is  cop ie d  to  S 0  a nd   S1.  T his  ste p  Co ntin ues  ti ll ,  rep la ci ng  the   ou t put   by  c hangin g  c on ti nu ously   in   or der  al l  e ntri es  of  f our   S - boxe s  of  Bl owfi sh  al gorithm .   The   f un ct i on  F   w orks   ta kes  32  bit  val ue  a s  a n  in put,  and  it   div i ds  in to  four  8  bit  dat a.  Eac h  f our   8  bit  da ta   is   us e d  for  substi tuti on .  first  8  bit  is   us e d  to   get  32   bit  valu e  f r om   S - box  0,  sec ond  8  bit   data  is  us ed   t o  get  32  bit  valu e  from   S - bo x  1,  t hir d  8  bit  data  is  use d  to  get  32   bit  value  from   S - box  2  a nd  final ly   la st  8  bit  for   S - box  3.   T he n  first  32   bit  val ue  i s   add e d   with  sec ond  32   bit  val ue  ,  the  outp ut  is  XO Re d  wit h  thir d  32  b it   value,   t he  outp ut  is  then  a dde d   with   four t h  val ue  wi ll   get  final  32   bi t  value  as  sho wn   i n  Fig ur e  2.   To  pe rfor m   this  init ia li zation   and   ge ner at io n  of   P - box  a nd S - box t akes m or e ti m e b eca us e  of 16 - rou nd of e nc ryptio n  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 h  al gorithm   is  fa st  and   us e fu l  bl ock   ci phe r.   m any  i m ple m entat ion   ha s  bee n  cond ucted   ei ther  th rou gh   so ft war e  or  ha rdwar e .  But  ve ry  few  im ple mentat ion   has  be en  pr opos e d  to   generate   e ntries  of     P - bo x  a nd  S - box  f or  blowfis h  al gorithm .   A   ne w  sec ret  k ey   a s  bee n  pro pose d  for  blo c k  ci pher ,   blowfis h,   wh ic h  is  a  Feist el   net work  with   bl oc k  siz e  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  a  com plica te d  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   a  nove l  VLSI   arch it ect ure  for  blowfis h  al go rithm   wh ic h  is   base d  on  pa rtia l  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 d  Feist el   functi on,  fir st  is  it erati ve m et ho d  a nd,  sec ond  is  pa rtia lly   pip el ine d  te c hniqu e.   A   f our  sta ge  pip el ine d  a r chite ct ur e  is  use d  al on g  with  t wo  it erati on s   that  inc reases  t he   area   occupied   with  increasin g  t hro ughput  of  the  al gorithm   wh en  c om par ed  with  the  tw o  sta ge   pip el ini ng  w it h  8  it erati on s  t hat  will   reduce   the  area  occupie d  wit h  reduce d  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 e  ge ner al   optim iz e d  pr i nciples   [ 7 ] .   P resen te d ,   a  on e  rou nd  VLSI  arch it ect ure  of the  BLO WFIS H,   w hich  is ba sed  on  the  l oop - f old in g  te c hn i qu e   com bin ed  w it h  sec ur e   dif fer e nt   m od es  (ECB,   CB C2,  CFB 2  a nd  OF B2 )  of  operati on   [ 8 ] .  T he  a rch it ect ure   us e s  a   prot otype  c hip  to   im pl e m ent  by  us i ng   $0. 35$  /spl  m u/  CMO S  te ch nolo gy.   Pr ese nted   D RIL  arc hitec tu re,  wh ic h  is  a  four - ti er   arc hitec tur e   involvin g  both   software   an d  hard war e   des ign s ,  f or  im pl e m enting  blowfis h  al gorit hm   us ing   arc hi te ct ur al   featur e s  li ke  in ner   lo op  pi pelinin g  an d  lo op   fo l ding  with  dy nam ic   reco nfi gurati on   [ 9 ] .   The  m ai n  ob j ect ive  of   the  resea rc h  w hich  is  present ed  in   this  pap e r   is  to  dev el op  a n  al gorit hm   wit h  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 d  th rou gh  hardw a re  i m ple m entat ion s   [ 10 ] .   Im ple m ent   a  new   se cret - key  ' Bl ow - C AS T - F ish'   blo ck  ci pher  that  us e s  go od   featu res  of   bo t h  CA ST - 12 8  an d  Bl ow fis h  al gorithm s  us ing  VHDL  im plem entat ion   [ 11 ] .   Pro posed   a  m od ifie d  the  Bl ow fis h  al gorithm   by  enh a ncin g  it s  perform ance  in  te rm s  of  s pe ed,  Th r oughpu t,  P ow e r  c ons um ption   a nd  Av al a nch e   e ffec t   [ 12 ] .  Au t hor  has  pro po s ed   a  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 g  par al le l  pr oces sing   te c hniq ue  and  m aking   m od i ficat ion s  t o  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  F  functi on   of Bl owfish has  been   m od ifie d  with  diff e re nt   form ulae  and  the  ou tc om e  of   a  series  of  RK - Bl ow fis h   al gor it h m s  wer e  co m par ed  with   th e  Bl owfish   al gorithm .   The  blowfis h  a lgorit hm   has  been   wi dely   us e d  in  netw ork  s ecur it y  m e tho d  to  en han ce  t he   secur it y  by   i m ple m enting  thr ough  s oft wa re  or  hard war e   bas ed   on  var i et y  of  as pects  li ke  s peed,  sec ur it y,  portabil it y  et c.   The  sc ope  of  th is  work  inclu de s  ge ner at io n  of   P - b ox  a nd   S - box  e ntries  us in g  a  m od ifie d  fiest el   networ k,   wh i c h  is  si m ple  struct ur e ,  in  orde r  to  reduce  th e  com pu ta ti onal   co st  of   ge ner at in g  P - bo x  an d  S - box  entries  in   bl owfis h  al gorithm .  The   m ai n  m otivatio n  of  pro po se d  w ork   is   to   des ign  a nd  im ple m entat ion   of   ge ner at in g  P - bo x  a nd     S - bo x  entries   by  reducin g  th e  num ber   of  rounds   instea d  of  16 -   r ounds   of  e ncr y ptio n  al gorithm   to  ov e rco m e     the  lim it a ti on   of  bl owfish  al gorithm .  In   this  pa per,  a  sim ple  P - bo x  a nd   S - box  ge ner at in g  a lgorit hm   to  ov e rco m e  the co m pu ta ti ona l co st i s d e sign e d  a nd im ple m ented  usi ng  m od ifie d  fiest e l netw ork.       2.   THE  PROPO SED  APP ROAC H   In   t his  sect ion,   an  ap proac h  f or   ge ner at in g  P - bo x  a nd   S - box  f or   blowfis h  al gorithm   is  pr ese nted .    The  blowfis h  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 o  val ue,  will   be   ge ne rated  t hro ugh  m od ifie d  e ncr y ption  al go rithm   pr oce dure.   T he   encr y ption  pro cedure   m od ifie d  by   reducin g  num ber   of  rou nds,  9  it erati on s  with  9 - rou nd s ,  in ste ad  of   9  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 n  proce dure   we   ca n r ed uce  t he t im e  as   well   r ed uctio n  in  t he  com pu ta ti on al   cost  of  bl owfis h  al gorithm .   The  al gorithm   tak es  16 - byte   Ke y  K  (K0  K 1  K 2  K 3  K 4  K5   K 6  K 7  K8   K 9  K 10   K 11   K 12   K13  K 14   K 15   K16 ) ,  as  a n  in pu t  to  gen e rate  al l  18  P - val ues.   First   4  w ord  K0K 1K2 K 3  from   key  is  stored   i n  P 0  an d  s econde  4  w ord   K4K 5K6 K 7   from   key  is  ta ken   in  P 1  sim il ar ly   al l  key  values  are   store d  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 2    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 0  an d  P1  each   of  32 - bit,  (as  le ft  hal f  L 0  a nd  ri gh t   half   R0 )  t o  m od ifie d  al gor it h m . I n t he  al gorithm ,     L1  =  L0 is  XOR ed  with P 0  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 1  a nd S - bo x      T he n  swa p  L 1  and   R 1  an d  c onside red   as  i nput  for  ne xt  it er at ion .  Re pe at   these  ste ps   t o  ge t  the  ou t pu t  with  tw o  val ue s  P0   a nd   P1,  f or  this  the  m od if ie d  enc ryptio n  al gorit hm   ta ke s  9  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 d  e ncr y ption  al go rithm   is  giv e n  in   F ig ure  3  a nd  the   al go rithm   fo r   pro po se d  e ncr y ption  al gorith m   1  is  giv en   in  sect ion   4.1 .   Th e  F  f unct ion  ta kes  32  bit  valu e  as  an   in pu t  a n d  div i ds   into  f our  8  bit   value.  Eac h  f our   8  bit  value   is  use d  for  s ubs ti tuti on   from   each  f our  S - box  an d  fir st  4  bit  from   each  8  bit  val ue  is  co ns ide r ed  f ro m   wh ic h  S - bo x  we  s ho uld   get  the  val ue.   T he  fl ow c har t  of  the  pro po s ed   m od ifie d  F -   f unct ion i s  giv e n i n   Fig ure  4  a nd the alg ori thm   2  is  giv e n  i n  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 a  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 n  go al   of   t his  w ork  i s  to  pro vid e   m or e  sec uri ty ,  m ini m iz es  the  tim e  ta ken   for  ge ner at i ng    P - bo x  a nd S - box  ent ries an d com pu ta ti on al   cost. T he pr op os e d  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 n  the   enc rypti on  al gorithm   with  9  r ounds   and  9  it erati ons,  w he re  or i gin al   al go rithm   us es  16  r ound  a nd  9  it er at ion s  i n  orde r   to  gen e rate  P - bo x  a nd  S - bo x  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 t  of the m odifie d  encr y ption al gorithm     Figure  4 .   Flo w char t  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 d  bl owfis h  al gorithm   are  app li ed   on   the  im age  A rm s.b m p  wit h  t he   sam e  key.  T he   com par iso n  ar e  m ade  on  both  or i gin al   an d  m od ifie d  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 y  sensiti vity   and   sta ti sti cal   a naly sis.   The  or iginal   i m age  of   Ar m s.b m p  in  Fig ur e   5,   is  e ncr y pted  and   dec rypted  by  ap plyi ng   or i gin al   blowfis h  al gorithm   are  sh ow n  in.  Sam e  or igi nal  im age  is  e ncr y pted   an d  decr y pted   us i ng  m od ifie d  blowfis h  al gor it hm .  The  Fig ure   6  a nd     Figure  7  s how s  the  res ult  of  encr ypte d  an d  dec rypte d  im age  us in g  or iginal  al gorith m   and   Fig ur e   8  a nd     Figure  9  s hows  the  resu lt   of e ncr y ption an d decry ption i m a ges by a pp ly in g  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 d  im age  of  arm s   bm p  us in g  or i gin al  alg ori thm       Figure  7 .   Dec r ypte d  im age  of  ar m s  bm p  us in g  or i gin al  alg ori thm           Figure  8. Enc r ypte d  im age  of  arm s   bm p  us in g  m od ifie d  al gor it h m       Figure  9. Dec r ypte d  im age  of  ar ms   bm p  us in g  m od ifie d  al gor it h m       3.1.   Encr yption  Q ua li t y  te st   The  e ncr y ptio n  qu al it y  (EQ)   te st  in  \ ci te {13 sw f},  \ ci te {1 5s w f}  m easur e s  the  qu al it y  of  enc ryptio n  wh ic h  is  base d  on  t he  dev ia ti on  bet wee n  th e  plainte xt  im age  a nd  ci phe r te xt  im age.  Th e  m or e  de viati on  of  ci ph e rtext  c ompare d  to   plaint ext, b et te r   is  th e  enc ryptio n  al gorithm .  EQ   te st  is  the   a ver a ge   num ber  o f   c ha nge s   to  eac h  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 d  t he  ste ps   t o  pe rfor m   EQ  te st i s  giv e n  as:      =   ∑ [   ( ′ ) −   [ ( ) ] ] 255 256     Let   F  an d  F'   is  represe nted  as   or i gin al   im ag e  and   e nc rypte d  im age  of   siz e  M*N  pix el s  with  L  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  $ 0  to  255$.   The  ste ps  a re:     Com pu te   HL ( F)   t he  num ber   of  occ urren ce s  of  eac h  gray   le vel  L   in   the   ori gin al   im ag e  an d  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 g  a bove  g ive n  m at hem at ic al  f or m ula.   Encr y ption   Q ualit y  te st  is  cal culat ed  us i ng   both  or i gin al   an d  m od ifie d  blowfis h  al gorithm   is     sh ow n  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 a  C )   21   Table  1.  C om par iso n  of enc ryption q ualit ie s o f  original a nd  m od ifie d  bl owfish  al gorithm     for diffe re nt   r ounds   Nu m b e r  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 y  Te s t   A  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 s  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 o  E ncr y pt a n  im age A rm s.b m p  by origi na l al gorithm .     Chan ge  a ny  r a ndom ly   sel ect e d  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 8  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 d  cha nged   to  B   a s  A DF378   465E 262A B1 F 5DEC9 4A0 A25 B 27  wh ic h  is  key2.     Apply t hese  tw o keys t o m od ifie d blo wf is h  a lgorit hm  u sing   the sam e i m ag e an d  the n  c om par e d.     The  res ult  is  show n  i n  belo w  Table  2,   c om par iso n  of   both  ci ph e red  im age s  w hich  a re  e nc rypted   by  or i gin a l   as w el l as m odifie d  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 h  key1  a nd  wh e n  we  e nc rypt  the   sam e  i m age  usi ng   sam e  or igi nal  al gorithm   with  key2,  in   te rm s  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 n  we  e ncr y pt  the   im age  us in g  m od ifie d  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 h  ke y2 .       Table  2 . C om par iso n  of k ey   s ensiti vity  o f  or iginal an d  m odifie d blo wf is h al gorithm     for diffe re nt ro unds   Nu m b e r  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 n  [ 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 s  in   the   ci ph e r   te xt.   To   c om pu te   a valanc he  e ffec t  we   need  t o  change   on e   bit  from   the  plai n  te xt  ( i m age  Ar m s.bm p) ,  nam ed  as  an  im age  BArm s.b m p,   an d  then  e ncr y pt  this  im age  us in g  both   or i gin al   blowfi sh   a nd  m od ifie d  blowfis h  al gorithm s.  He re  the  pr opos e d  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  3  pr ovides  w hich   al gorithm   giv es   bette r   avalanc he  e ff e ct .     Ca se  1:   Com par in g  A valanc he  e ff e ct   f or  e ncr y pted   im ag e  of   A rm s.b m p  a nd  B 1Arm s.b m p  with   sam e  key 1  us in g or i gin al   and m od ifie d  a lgorit hm .   Ca se  2:   Com par in g  A valanc he  e ff e ct   f or  e ncr y pted   im ag e  of   A rm s.b m p  a nd  B 1Arm s.b m p  with   sam e  key 2  us in g or i gin al   and m od ifie d  a lgorit hm .   Ca se  3:  C om par in g  Av al a nch e   eff e ct   f or  enc r ypte d  im age  of   A rm s.b m p  wit h  key1   an d  key 2  us in g  ori gin a l  an d  m od ifie d  al gor it h m .   Ca se  4:  Com par in g  A valanc he  ef fect  f or   e ncr y pted  im age  B1MA ND.bm p  with  key1a nd   key2  us i ng   or i gin al   and m od ifie d  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 n  of avala nch e  ef fect  of   or i gin al  a nd m od i fied blo wf is h  al go rithm  f or d if fer e nt ro unds   with  four cases   Nu m b e r  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 s  determ ined  r el at ion sh i p  bet ween   horiz on t al ly   adj acent  pix el s  in  a n  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 p  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 s  r andom ly   and   pi xels  ad j acent  to  them   fr om   t he  both   or i gina l  i m age  (A rm s.b m p)   an d  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 d  al gor it h m .     Using  $r _{x y} $  f or m ulae  to  fin d  co rr el at io n  coe ff ic ie nt,  wh e re  x  a nd  y  represent  gr e y  scal e  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 e  of  x  a nd  y  val ues  a nd  C OV( X,Y)   is  c ov a ria nce  of  x  a nd   y and i s  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 d  E( Y )  represe nts  the  m ean  valu es  of  x  a nd  y   va lues.   T his  te st   is  ca rr ie d  out  for  a bout   ra nd om l y  sel ect ed  horizo ntall y  ad j acent   pix el s   f ro m   th e  or igi nal  im a ge   A rm s.BM P   a nd  e ncr y pted  im ages.   The n  us i ng  a bove   e qu at io ns  c orrelat i on   c oeffici ent  will   be   c om pu te d  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 3  a nd  for   ci pher   i m age  wh ic h  is   e ncr ypte d  by   blowfis h  al gor it h m   is   0.005 616  a nd  for  m od ifie d  a lgorit hm   is  - 0. 429036.  I n  bot h  ori gi nal  an d  m od ifie d  al gor it h m   the  correla ti on  coeffic ie nts  for  p la intext  im ag e w it h  t hat  of  c iph e rtext im ages ar e  far apa rt .             Figure  10 .   C orrelat ion   distrib ution o f  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 f  t wo  horizo ntall y ad j acent  pi xels fo r  e ncr ypte d  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 a  C )   23       Figure  12 .   C orrelat ion   distrib ution o f  t wo ho rizo ntall y adj a cent p i xels fo r e ncr y pted  im a ge usin g  m od if ie d   al g ori thm       3.5.   Entropy   The  e ntr op y  [1 5 ]   of  an  i nfor m at ion   data  is  m easur e d  i n  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 d  by   a  truly  rand om   so ur ce  of  da ta .  To   cal culat e  this  m ean,  the   in di vidual  in f or m a ti on   a re  wei ghte d  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   a  c har act er  and   e ntr op y  is   pr ese nted  i n  bi ts.  Af te r   evaluati ng t h e  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 g  to  a tr uly ra ndom   so urce.  Give n  an  in form at ion   so urce  that  ge ne rates  ra ndom   m essages,  in  ge ner al   it s  entr opy  value  is  le ss er  tha n  the  ideal   one .  Howe ver,  whe n  t he  m essages   are   e ncr ypte d,  their   e ntropy  s hould  be  8.  If  the  outp ut  of  a   blo c k  ci ph e r e m i ts  with  entr op y  le ss   than  8,   t her e  e xists  certai n  de gr ee  of  predict abili ty , which  end a nger  it s  se cur it y .   Let   us  c onside r  t he  ci ph e rtex t  of  a n  im age,  encr y pted   usi ng  t he   ori gin al   as  wel l  as   m od ifie d  al go rith m ,  the   nu m ber   of  occ urren ce   of  eac h  ci phe rtext  blo ck   an d  t he  prob a bili ty   of   oc currence   is  c om pu te d.   T he  obta ine d  inf or m at ion   e nt ropy  is  ve ry  m uch  cl ose   t o  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 n  proces s  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 g  e quat ion.  4  a nd is  li ste d  in  belo w  Tab le   4.       Table  4 . C om par iso n  of entr opy f or d i ff e ren t  roun ds   of   ori gi nal a nd m od ifi ed  blowfis h  al gorithm   Nu m b e r  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 t  c har act e rs  are  to b e fou nd  in  any g ive n  64 - c har act e r  long  se gm ent  in  ci phe rtext.  F reque ncy  anal ysi s  is  base d  on  ce rtai n  le tt er s  an d  c om bin at ion s  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 n  t he  64  c har act e rs  l ong  segm ent  and   c ounts  ho w  m any  diff e ren t  c harac te rs  are  to  be   found  in  t his  64 - c har act e r  lo ng  segm ent.  The n  the   segm ent  is  sh if te d  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  a  s um m ary   of  the   ci ph e rte xt  w hich   ide n ti fy  the   places   w it h  high  a nd   lo w  i nfo rm ation   densi ty .  De pe ndin g  on   the   str uctu re   and  c on te nt  of  the  data  in   the   segm ent,  enc rypted   im ages  (bm p  file s)  val ue s  obta ine d  usua ll y  li e  between  5  a nd   20,  as  s how n  i n  Fi gure  13   an d  the  floati ng  fr e qu e ncy  f or  t he  e n crypte d  i m ages  us i ng   ori gin al   a nd  m od ifie d  al gorithm  is aa shown i n  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 e  secu rity   feat ur es   of  blow fish  al gorithm ,  the  pro pose d  m e thod  has  bee n  desig ne d  a nd   i m ple m ented   to  cre at e  S - box  and  P - box  val ue s  of  blowfis h  al gorithm   us ing   m od ifie d  e nc ryptio n  al gorit hm   and   m od ifie d  F  f un ct ion   with  dyna m ic   su bs ti tuti on.  T he  m ai n  m otivati on  be hind  f or  pr opos e d  al gorithm   is  to  reduce  the  ti m e  fo r   ge ner at in g  s - box  and  P - box  val ue s  by  re duci ng   the   num ber   of   r ounds,   9  it era ti on s   with   9  rounds,  instea d  of  9  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 d  m od i fied  e ncr y ptio n  al go rithm   per f or m s  bette r  i n  al l  the  aspec ts  when   com pa red  with   the  or i gin al   blowfis h  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 a  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 a  Mc Gr aw - Hill ,   2nd  edition ,   200 8.   [3]   Anand  Kum ar  M  and  Dr.  S.  K art hik e y an .   “ Inve stiga t ing  th e  Ef fic i ency   of  B lo wfish  and  Rejin dae l  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 e  ha ll,  2013 .   [5]   B.   Schneier.  “ Descri pti on  o   f  a  n e w  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  E ncry pti on ,   Sprin ger ,   B erlin,   Heid el ber g ,   vo l  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 e  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 s  for  opt imal   software   spee d   o n  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 s  in  Compute r   Sci en ce ,   Springe r,   Be r li n ,   He ide l ber g ,  vo l  1267 ,   2 42 - 259,   1997 .   [8]   Yeong - Kang  Lai   and  Yu - Chuan  Shu.  “ A  novel   VLSI  arc hitec tur e  for  a   var i able - l engt h  ke y ,   64 - bi t  Blowfish  bloc k   ci pher . ”   1999  I EE E   Workshop  on  Signa l  Pr oce ss ing  Syst e ms .   SiP S  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 i  S.   “ DRIL –   A  Flex ibl e   Archi t ectur e  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 p  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 s  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 o  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 a  G.H  and  As halatha   M. E .   “ Blow - CAS T - Fis h:  A  New  64 - bit   B loc k   Ciphe r .”   IJCSNS   Inte rnationa l  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 e  en hanc ement   of  Bl owfish  al gorit h m   b y   m odif y ing   i ts  f unct ion .”   Innov ati v e  Al gorithm s  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]   V  Ramasw am y   Krishnam urth y   G  N.   “ Enc r y pt io n  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 d  t o  Inte rnat ional   J ournal  of  Comp utat ional Sc ie nc e ,   20 08 .   [14]   Shail aja   S1,   Dr  Krishnam urth y   G  N2 .   “ Com par i son  of  B lowfish  and  C ast - 128  Al gorit hm s  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 f  Enginee ring   Re s earc h  ( AJ ER ) ,   vol .   3 ,   no.   7 ,   pp - 161 - 16 6,   2014 .   [15]   Yue  W ua,   Jos ep h  P.  Noonan a,   S os  Agaia nb .   “ Shannon  En trop y   b ase d  Randomnes s  Mea surem ent   a nd  Te st   for  Im ag e  Enc r y pt ion . ”   Inf orm ati on  Scienc es ,   2011 .    [16]   Sonal  Kulshresht ha,   Vikr am  Verm a,   Ric h a  Kalr a .   “ Anal y t ical  Vie w  of  Cr y ptogr ap hic   T ec hniqu es  t hrough  Cr y p tool .”   Jo urna l  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.