Intern ati o n a Journ a l of  Re con f igur able  and Embe dded  Sys t ems  (I JRES)  V o l.  4, N o . 3 ,  N o v e m b er  2 015 , pp . 18 5 ~ 19 I S SN : 208 9-4 8 6 4           1 85     Jo urn a l  h o me pa ge : h ttp ://iaesjo u r na l.com/ o n lin e/ind e x.ph p / IJRES  NIOS II Based Secure Test  Wrapper Design for Testing  Cryptographic Algorithms       C h a k ra pa n i  K a nn an  Shanmugha Arts, Science, Techn o log y  &  Research Academ y  (SA S TRA University )    Thanjavur, Tamil Nadu 613401 I ndia      Article Info    A B STRAC T Article histo r y:  Received  May 6, 2015  Rev i sed  Ju l 19 20 15  Accepte d Aug 7, 2015      Cr y p togr aphic algorithms need infrast ructur e  for tes ting th em  agains t   security   attacks. Normally  man y  me thods ar proposed for testing these  cr y p tograph i c pr im itives. Norm al designs  cannot  be  appli e to  all t y p e s of   cr y p tograph i c h ips. Usuall y bu ild in self  test  is appli e d for the   intel l e c tua l   propert y ch ips for testing  them But it su ffers fr om many  prob lems such as  side channel attack, ba ckholes, high area overh ead, etc.., to overcome all  thes e dr awbacks  tes t  wrapper  is   des i gned  and  tes t ed using  NIOS II econo m y   soft core proc e ssor. NIOS II i s  utiliz ed as th e soft core pro cessor and  cr y p tograph i c a l gorithm s  are execut e d. RT L vi ew of thes e cr yptographi circu its is descr i bed. S y nth e sis  resu lt shows the chip  plann e view of th circu its  and the  area requ ired  for the logic  el em ents . NIOS  II s o ft-core   processors perform well for testing th e cr yptog r aphic algori t h m s .   Res u lts   with res p ects  to  area optim iz ati on, m e m o ry  an d s p eed are dis c us s e d. The   logic components required for design us ing NIOS II is optimized. Memor y   required  is also less compare to  other  processors. Area r e quir e d is optimized   using NIOS II pr ocessor and  it is  flex ible for  design of complex  circuits.  Keyword:  C r y p t o gra p hi c al go ri t h m s   NI OS II   Soft -co r e pr oc essor s   Copyright ©  201 5 Institut e  o f   Ad vanced  Engin eer ing and S c i e nce.  All rights re se rve d Co rresp ond i ng  Autho r C h ak rapa ni  Ka nna n   Sha n m ugha  A r t s , Sci e nce ,  Te chn o l o gy  &  R e search  Aca d em y  (SA S TR A  U n i v e r si t y Thirum alaisa mudram , Thanja vur,  Tam i l N a du   6 134 01 , Ind i Em a il: k c p @ co re.sastra.edu       1.   INTRODUCTION  Adva ncem ent in inte rnet tec h nol ogies  has  increased  th e n e ed   for p r o t ectio of d a ta  an d in fo rm atio n   no w a  day .  C r y p t o g r a phi c al go ri t h m s  pl ay s im port a nt   rol e  i n  p r ot ect i n g  t h ese  dat a  am ong t h e i n c r easi n g   attacks. Eval ua tion of Crypt o gra p hic al g o rith m  in  an y ch ip is v e ry im p o r tan t  to  en sure th e security for  wh ich   ap p lication  th ey are in ten d e d to  p e rform .  Th ese cry p tographic algorithm s  are al r eady p r ov en  w ith th eir   math e m atica l   m o d e l. Th ou gh th ey are secu re en ou gh  in  the co m p u t atio n a l tech n i q u e s it is i m p o r tan t  t o  p r ov th em  as secu re for im p l e m e n tin g   with  an   in tellectu a pr ope rt y  (IP ) c o re o r  a chi p Hi g h  spee d t e st i ng i s   requ ired  t o  ach i ev h i g h e st  testab ility reg a rd i n g th fa u lts in  ch ip s wh i c h  are  u n a ttend ed. Security is an  im port a nt   fact or  w h e n   desi g n i n g a n y  I P  c o re.  In  t h e  p r ese n t  w o rl d u e t o  m a ny  ad van c em ent  an d i n vent i o n s   in  th IP cores it is v e ry d i ffi c u lt to   find  th e app r op riate IP core for an y ap p lication  an testin g  th em  is also   b eco m e  a cru c ial facto r Wrapp ers are u s ed  fo r testin g   th is IP cores in  term s o f  th eir feasib ility, fau lts,  perform a nce evaluation, etc.  Wra ppers  a r piece of software coding which is  require d  for testing IP  cores .   Th ese wrapp e rs will wo rk  as  a test p a ttern  o r  test seq u e n c e fo r testin g  th e IP co res  o r  any ch ip . Here in th is  wo rk  NI OS I I  soft -co r e p r oce ssor is use d  f o r testing the IP  cores.  NI OS I I  wo r k s like a wra p per f o r te sting   the cry p togra p hic algorithm s   agai nst  al l   ki n d   of  at t acks.  N I OS  I I  ec o nom y  pr ocess o r  i s   use d   whi c us es o n l y   fewe r l o gi c an d chea pe r i n  c o st  am ong ot h e r p r oces so rs.  As i t  has fe wer  l ogi cs exec ut i on t i m e i s  redu ced an hi g h   per f o r m a nce i s  ac hi eve d   usi n these process o rs     Evaluation Warning : The document was created with Spire.PDF for Python.
                        I S SN 2 089 -48 64  I J RES Vo l. 4 ,  N o . 3 ,  No v e m b er  201  1 85   19 18 6 In t h i s  pa pe r  vari ou s cry p t o g r ap hi c al g o r i t h m s  are t e st ed am ong t h e NI OS  base d s o ft -c o r pr ocess o rs . T h ese pe rf orm a nces are  di scu s s e d a n d  t h e e ffe ct i v e res u l t  ana l y s i s  i s   m a de am ong t h e al go r i t h m s The  wo r k  fl ow s as sect i o n I I   descri bes t h e  p r evi ous  w o r k   do ne  o n  t h w r ap per  desi gn  ,  sect i on  II pre s ent s   the va rious cry p togra p hic algorithm s   and t h ere prim itives. In secti on  IV  synthesis re sul t s are disc usse d and  fin a lly th e co nclu sion  is  d r awn  in section   as th p a p e flows.      2.   PRIO R WO RK  Syste m  o n  ch ip  (SOC ) is no th ing   bu t th e ch ip   wh ich  i n tegrates th p r o cesso rs, me m o ries and  interfaces  devi ces in the form of core IC . Testing th is SOC are m a jor constrain  in the 1999 a n d then later  technologies are invente d  for testi ng IP c o res .  Test access  machine (T AM)  and test wra ppers are invente d  for  testing the  core proces sors. T e st wra p pers  are ve ry im p o r tan t  as t h ey m i n i mize th e id le time tak e n   for testin th e co res  with v ecto r s. Th is  in  tu rns also reduce the m e m o ry requirement  for vector  in the chip.  Wrappers  have  m a ny  ope rat i o n  m odes s u ch  as  n o rm al , core , i n t e r c o n n ect  and  by pass  t e st .   A wrapp e r n a med  Test co llar [4 ] was inv e n t ed   wh ich  is u s ed  fo r testing  core in  th p a st. Bu t the  i n t e rco n n ect  t e st  i s  not  per f o r m e d usi n g t h i s  wra ppe r. B a l a nced  wra p per  chai n i s  use d   whi c h co nsi s t  of c o res   in chai n and  has inte rnal sc an whic h re duces the tim taken for sca n ning [5]. T h ere are m a ny types   of  wra p pers are been desi gne d i n  the literature  such as  c o re t r anspa r ency [6],  m u ltiplexed access [7].  All these  wrapp e rs d e si gn s add r ess so m e  prob lem  b u t   still h a v e  so m e  con s trains alon g with th e m o d i ficatio n s In t h i s   pa per  we ha ve t e st ed  t h e wra p per  u s i ng  NI OS  II  econ o m y  soft core  pr ocess o r  fo r va rio u s   cryp tog r aph i alg o rith m s . Th e ti m e  ta ken for t h ese algori thm   to exec ute  are al so  bee n  di scus sed .   Wr appe r   perform a nce is analy z e d  in  th i s  wo rk     3.   FU NC TIONAL D E SC R I PTION        Fi gu re 5. 1.   F u nct i onal  bl ock  di ag ram   of  N I OS II   p r oc esso r       The  fi g u re  5 . 1  gi ves  t h f u n c t i onal  bl oc di ag ram  of N I OS  II  so ft  c o r e  pr ocess o ba sed  wra p per   d e sign NIOS II p r o cessor is giv e n  wit h  con t ro l an d   d a ta in pu ts. Th e RC 5  blo c k  an d   Hash   b l o c k  will g e nerate  certain  test ou tp u t   for th g i ven  inpu t d a ta set. Th ou tputs from  these blocks are  give n to these sca n   cha i out put   whe r i t  co m p ares and  gi ves  bac k  t h e out put  t o  t h e p r ocess o r f o r com p ar i ng wi t h  t h i n p u t .   Si m u ltan e ou sly o u t pu t for the g i v e n  inpu t seq u e n ce is g i ven  to  th e ou tput reg i ster for verificatio n. If t h e in pu t   gene rates the  expecte d  output then t h e hardware  pe rform ance is appropriate.  NIOS II  base d soft core   pr ocess o pe rf orm s  wel l  fo r t h i s  t y pe o f   wr appe base d t e st i ng  of t e st  se que nces . I n  t h i s  w o r k  cry p t o g r ap hi c   algorithm s  are tested on  N I OS  II  p r o cesso r.  NI OS  II  base d  so ft -co r pr oc essor s  are  ve ry  fl exi b l e  a n d s u i t a bl e f o r  t e st i ng ci rc ui t s   wi t h  di f f er en t   t e st  seque nce sim u l t a neousl y . If a n y  cha n g e  i n  t h e har d w a re m odel  of t h e p r o p o se d sy st em  can be easi l y   m odi fi es by  chan gi n g   few c o m m a nds. M o di fi cat i on  o f  t h e ha r d wa re c a n be ea si l y  refl ect ed wi t h   NI OS  I I   b a sed  soft-core p r o cesso r. Th ese pro c essors u tilize v e ry less lo g i c co mp on en ts wh en co m p ared  to   o t h e p r o cesso rs. Hen ce sp eed  in creases with  less area u tiliza tio n  in  NIOS  II so ft-core p r o cesso rs. Th is d e creases  t h e com p l e xi t y  i n  c o m put at i on  of  any  ci rc ui t s  i n cl u d i n g c o m p l e x cry p t o gr aphi desi gns       Evaluation Warning : The document was created with Spire.PDF for Python.
I J RES I S SN 208 8-8 7 0 8     NIOS II  Base Secure Test  Wr apper  Desi gn for Te stin g Cryp tog r a p h i c Algo rithm s  (Cha kra pan i Kann an 18 7 4.   CR YPTO GR APHI C ALG O RITH MS   In th present an d literature m a n y  cryp tog r aph i c alg o rith m s  are in v e n t ed  for secret  d a t a   comm unication in case of  any critical a pplications. Cr yp tog r aph i c alg o rith m s  u s e d  to  au th en ticate th in fo rm atio n  an d to k e ep  i n fo rm atio n  as priv ate.  Al gorithm s   are used for  t r ans f orm a t i on o f   ori g i n al   in fo rm atio n  in to  so m e  o t h e r fo rm  fo r transmissio n  and  ag ain  ret r iev i ng  th e orig in al  h o s t m e ssag e  at th receiver  side.  It is im possible for ev e r yone to create their own c r yptographi c algorithm s   for their a pplic ations There a r e m a n y  algorithm s  already ex isting  p a ten t ed  an d   used  fo r a lo ng   ti m e . An y cryp to graph i c alg o rith wh ich  is secu re for a l o ng  ti me in  th e pub lic scru tin y can   b e   u s ed fo secu re  d a ta co mmu n i cation .  M o st o f  t h cry p t o gra p hi c al go ri t h m s  consi s t  o f  m a ny ro un ds  of e n cry p t i o n f unct i on t o  i n creas e t h e effi ci e n cy  an d   secu rity of th alg o rith m .   When  th ese al gori thm s  are integrated for i n te n d e d ap pl i cat i ons  al on g wi t h  t h e  dat a   in creases th e co m p u t atio n a l co m p lex ity.   In t h i s  w o r k  al go ri t h m  whi c h  are pro v e n  t o  be secu re i n  t h e pu bl i c  scrut i n y  fo r a l ong t i m e has bee n   t a ken.  T h ese al go ri t h m s  are t e st ed i n  t h wra ppe rs  base on  NI OS  I I   pr oce ssor .  T h per f o rm ance, t i m e  take n   for exec ution,  efficiency is to calcu l a t e d usi ng t e st  w r a ppe rs. Pe rf orm a nce anal y s i s  base d o n  t h e t e st  w r ap per s   are e v al uat e d  f o r  AE S e n cry p t i on, R C 5,  SH 5 a n d  A L U  i s  i m pl em ent e fo r i t s   per f o r m a nce a n al y s i s       5.   A E S EN CRYPTION  Ad va nced  Key  Encry p t i on  ( A ES) i s  a p r i v at e key  enc r y p t i on t e c hni que  u s ed f r om  a l o n g  t i m e . Thi s   alg o r ith m   u s es  d i ff er en t k e y w ith  d i f f e r e n t  b l o c k   size.  Each  b l o c k   i n   th is tech n i qu h a s a  b l o c leng th  o f   128  b it with   d i fferen t  k e y leng th. It is a symmetric k e y alg o r ith m  wh ich   u s es sam e  k e y for encryp tion  and  d ecr y p tio n. Fou r  stag es  o f  b l o c k ciph er ar u s ed   f o r   d e r i v i n g   k e y in th is  en cr y p tio n algo r ith m .  Ad d i ng   r ound  k e y at th first  stag e t h en  t h ree con s ecu tiv e roun ds ar e sub b y tes, sh i f trow, m i x c o l u m n s  will tak e   p l ace. Th is  ro u nd  key  pr oc ess i s  repeat ed  for m a ny  i t e rat i ons an d re ver s e of sam e  wi ll  be t h e decry p t i ng p r oces s. F i gu r e   1  sh ow s th e  sch e m a t i c  f o r  AE S  en c r yp tion .           Fi gu re  1.  Sc he m a t i c  for  desi g n   of  AE S al g o r i t h m       6.   RC 5 ALG O R I THM   R C 5  i s  a  bl oc k ci p h e r  sy m m e t r i c  key  en cry p t i o whi c h i s   very   si m p l e  t h a n   ot he r  cry p t o g r ap hi c   al go ri t h m s . Th i s  al go ri t h m  has va ri abl e  si z e  of  bl ocks  ac cor d i n g t o  t h e  ap pl i cat i on.  Num b er  of  r o un ds  f o encry p tion als o  varies  from   0 to  255  accordingly. Feistel like struct ur e with num ber of  excl usive OR  and  m odular additions a r e use d  in the  RC5 enc r yption techni que . In RC5  key  is very im p o rta n t, encry p tion and  d ecry p tio n are few co mm an d s Algorith m is d a ta  d e p e n d e n t  ro tations in  its en cry p tio n and   d e cryp tion   pr ocess .  6 4  bi t  key  i s  used  fo r enc r y p t i o n  i n  R C 5  al g o r i t h m .  The fi gu re 2 s h ows t h e schem a t i c  of R C 5   alg o rith m .     Evaluation Warning : The document was created with Spire.PDF for Python.
                        I S SN 2 089 -48 64  I J RES Vo l. 4 ,  N o . 3 ,  No v e m b er  201  1 85   19 18 8     Fi gu re  2.  sche m a t i c  vi ew o f   R C 5  al g o ri t h m       7.   HAS H  ALGO RITH Secure has h  al gorithm  (SHA) is a crypt o graphic  ha sh  fu nctio n  wh ich is m o stl y  u s ed  in case o f  t h i n t e gri t y  ch ec k.  Thes e c r y p t o g r a phi has h  f unct i o ns  are  di f f i c ul t  t o  re bui l d   or  co nst r uct  a g ai n  i n  r e verse   engi neeri ng  pr ocess t h us p r o v i d e hi gh sec u ri t y  for t h e da t a . These ha sh  fu nct i o ns ha ve  t h ei r appl i cat i ons i n   in fo rm atio n  secu rity, d i g ital sig n a t u res, m e ssag e  au t h ent i cat i on co des a nd  ot he r fo rm s of aut h ent i c at i ons.  Im port a nt   qual i t y  of has h   f u n c t i ons a r e t h pre a n d se c o nd im age resistance. Resistance  against t h e col lision  i s  an ot her  i m port a nt  fact or.  F i gu re  3 s h o w s  t h e R T L  vi e w   o f  S H A  al g o ri t h m .     Evaluation Warning : The document was created with Spire.PDF for Python.
I J RES I S SN 208 8-8 7 0 8     N I O S  I I   Base Secu re Test   Wr ap per  Desi gn  f o r Te st i n g  C r y p t o gr ap hi c Al g o ri t h ms ( C h a kr ap a n i  K a n n a n )   18 9   Fi gu re 3.   R TL vi ew o f  HAS H   Al g o r i t h m     8.   ALU   Arith m e tic lo gic un it is a  d i gital circu it wh ich   will p e rfo r m  th e arith m e t i c and  log i cal  o p e ration s . It   is th e b a sic b l o c k  for fun c tio n i n g   o f  cen t r al p r o cessi n g   u n it. The p e rfo rm an ce o f  ALU will d e termin e th e   sp eed   of  th e p r o cesso r o r   t h e d i g ital  d e sign . Th e ALU  will p e rform  all  th e lo g i cal op erati o n s   and   d e p e nd ing  o n  t h ALU perfo r m a n ce cryp to grap h i c al g o rith m s  will  b e  ex ecu ted  as th ey d e p e nd   on  ALU  fo numero u s   lo g i c O R   an d EX O R   op er atio n s Fi gu r e  4  dh ow t h RTL v i ew  of  A L U.  Evaluation Warning : The document was created with Spire.PDF for Python.
                        I S SN 2 089 -48 64  I J RES Vo l. 4 ,  N o . 3 ,  No v e m b er  201  1 85   19 19 0   Fi gu re 4.   R TL vi ew o f  ALU       9.   SYNHESIS RESULTS  C r y p t o gra p hi c al go ri t h m s  are  im pl em ent e d on t h e NI OS  II  econ o m y  based so ft  core p r o cesso r usi n them  as  the wrappe r for testing. T h e pe rform a nces of  these  algorithm s  on the wrappe r are  tested with res p ect   to area, s p ee and l ogics ele m ents involve d . Fi gure 5  s hows the c h ip  planne r vie w  for t h ese algorithm s  whic g i v e t h area in vo lv ed   fo r pro cessing . NIOS  II pro cessor resu lts b e tter  th an  o t h e r wrapp e rs fo testing  th ese  alg o rith m s .                Fi gu re  5.  C h i p   pl an ner  vi e w   o f  A E S,  R C 5 ,  S H A  al g o ri t h m s       Table 1  gives t h e com p arison betwee n the various cr y p t o g r ap hi c al go ri t h m s  expl ai ned i n  t h i s  w o r k   in term s of are a  and m e m o ry. The  num b er of re gister s a n d  t h e m e m o ry  det e rm i n es t h pr ocessi ng  spe e of   th e       Evaluation Warning : The document was created with Spire.PDF for Python.
I J RES I S SN 208 8-8 7 0 8     N I O S  I I   Base Secu re Test   Wr ap per  Desi gn  f o r Te st i n g  C r y p t o gr ap hi c Al g o ri t h ms ( C h a kr ap a n i  K a n n a n )   19 1 Tabl 1. C o m p ari s o n   bet w ee n  va ri o u s c r y p t o gra p hi c al g o ri t h m s   Para m e ters   AES  RC5  SHA   ALU  Logic ele m e n ts   4. 544  261  1. 395  114   Registers   3. 968  93   893   Mem o ry   704. 51 2  900   Pins   385   19  74  35         10 .   CO NCL USI O N   Thi s  pa pe r p r e s ent s  a desi g n  and t e st i n of  cry p t o gra p hi c al go ri t h m s  based o n   NI OS  I I  p r oce sso soft  c o re  pr oce ssor .  F r om  t h e abo v res u l t  t h e t e st  wra p per   usi n NI OS  I I   i s  per f o rm ance i s  bet t e r t h a n   ot he w r app e r s .  T h e c r yp tog r aph i c a l g o r ith m s  are tested over t h e s o ft core   proces sor for t h eir perform ance and  resul t s  a r obt ai ned.  C h i p   pl anne vi ew  sh ows  t h e  ar ea   consum ed by  logic elem ents for e x ec uting the   al go ri t h m s . NI OS  II  p r oc esso per f o r m a nce i s  eval uat e d a n resul t s  a r di scusse d.       REFERE NC ES   [1]   Jerem y  Lee, Mo hammad Tehran ipoor, Chin tan Patel, Jim Plusqu ellic, Secu ri ng  Designs against Scan-Based Sid e - Channel Attack s,  IEEE Transactions on  Dependable and  Secure Computing ,  Vol. 4 ,  No . 4,  October-D ecem ber   2007 [2]   Youhua Shi, No zomu Togawa,  Masao  Yanagisawa, Tatsuo Ohtsuki, Design fo r  Secure Test -   A Case Stud y  o n   Pipelined   Advan ced Encr y p tion Standard,  IEEE I n ternational Sy mposium on Circuits and  Systems ( I SCAS) , 2007.  [3]   B.  Yang, K.  W u ,  and R. Karri,   Sec u re  Sc an:  A De sign-for-Test Arc h ite c ture   for Cry p to Chips , P r oceed ings   ACM/IEEE Desi gn Autom a tion  Conferenc e  (DA C ), June  2005, p p . 135-140 [4]   P.  Va rma  a nd S.  Bha tia,  “ A Structured Test Re-Use Metho dol ogy for Core-Based System  Chips ”, in P r oc.   International  Tes t  Confer ence, 19 98, pp . 294–302 [5]   E. J.  Ma rinisse n,   R.  Are ndse n ,  G.  Bos,  H.   Dingemanse, M. Lous bera and C. Wouters, “ A Structu r ed and Scalable  Mechanism for  Test Access  to Embedded Reusable Cores ”, in P r oc. In ternation a l Test Conferen ce, 1998 , pp. 284 293.  [6]   I. Ghosh, S. Dey ,  and N. K.  Jha,  “ A Fast and Low Cost Testing Techni que for Core- B ased System-on - Chip ”, in P r oc .   Design Automation Confer ence,  1998, pp . 542–5 47.  [7]   V. Immaneni an d S. Raman, “ Direct Access  Test Scheme  Design   of Blo c k and Co re Cells  for Emb e dded  ASICs ”,  i n   Proc. Internation a Test  Conferen ce, 1990, pp. 48 8–492.  [8]   P .  Varm a and  S .   Bhatia , “ A structured test reuse  methodol ogy for  corebased system chips ”, in  Proc. of  ITC ,  pp . 29 4– 302, Octob e r 19 98.  [9]   A. Sehgal and  et.al, “ Test cost reduction for SoCs  using  virtual ta ms and lagrange multipli ers ”, in  Proc. of DAC, pp.  738–743, June 2 003.    [10]   T .  Wa ay e r s ,  E .  J .  Ma ri ni ssen, an d M. Lousberg, “ IEEE std 1500 compliant in frastruc ture for modular SOC testing ”,  in Proc. of A T S, p. 450, November 2005.  [11]   IAIK. SHA-3 hardware impl em entations . ht tp:/ /e hash.ia i k.tug r az . a t/wiki / SHA-3 Hardware Im ple m entations.   [12]   CERG at G e or ge Mason University .  Hardwa re in terfa ce  of  a Se cure H a sh Algorithm  ( S HA). Function a S p eci cation, O c tober  2009.            Evaluation Warning : The document was created with Spire.PDF for Python.