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 2 ,  Ju ly 20 15 , pp . 71 ~81  I S SN : 208 9-4 8 6 4           71     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  Design of Secure Transmission  of Multimedia Data Using SRTP  on Linux Pl atf o rm         Shas h idh a r H . G.,  S a nke De ssai,  Shilpa Chau dh ari     Department o f  C o mputer Engin e eri ng, M.S. Ramaiah  School of A dvanced  Studies , Bangalore-5600 58, India        Article Info    A B STRAC T Article histo r y:  Received Dec 2, 2014  Rev i sed   Mar  18 , 20 15  Accepted Apr 15, 2015      This paper  aims for providing  a viab le  solutio n  for security   in streaming  media techno log y . Serv ice providers do not want the end users to  captur e  and   duplicate str eaming media data.  Once cap tured d a ta can be r e -dis tributed  to   m illions without  an y  contro l from  the sour ce.   Licensing issues also dictat the number of  times end user may   ut ili ze t h e dat a En cr yption is not  s u fficien t as  it le aves  the s y s t em  vulnerab l e to duplic ation and re c o rding after   decr y p tion. In this paper  an  attemp t has b een  m a de to  tr ansm it digit a l   m u ltim edia da ta  to m u ltiple user s. The tr ansm ission of the vid e o / audio d a t a   has been attemp ted from one PC to a nother PC . While doing  this, security   considerations have to be  tak e n care  b y  us ing s u itabl e en cr yption / decr yp tio n   techn i ques .   A  res earch  carr i e d  out  on the  differen t  data transmission   protocols  reve al s  that the S ecur e  Real  Time Tr ansport Protocol (SRTP) is  one of the best  available protocols.  Hence  the  S R TP  has  been deplo y ed i n   this project on Linux OS usi ng socket progr amming. The code for the  transm itter  and  the r ece iver  is  designed  and d e velop e d aroun d the  SRTP   librar y  fo r tr ansm ission of m u ltim edia d a ta .   T h e solution  is il lustrat e b y   choosing an  ex ample of a vid e o  clip  for  transmission and r e cep tion. This  m odel incre a s i n g  the s ecur i t y  o f  s t ream ing m e dia and  adds  a  m eas ure of  integri t y  pro t e c ti on, but  it  is p r im aril y  intended   to aid in  r e play  preventions.  Keyword:  Aut h entication   Security      MPEG    RTP/RTCP  SRTP   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 Sanket De ssai,    Depa rt em ent  of C o m put er  En gi nee r i n g, M . S .  R a m a i a h Sch ool   o f   Ad va nc ed St udi es ,   # 470 - P , Peen y a  In du str i al  A r ea, Bang alor e,  K a rn atak a, India. 56 005 8.  Em a il: san k e tdessai@m s rsas.o rg       1.   INTRODUCTION  Due to  recent  adva nces in  tech nology, stream ing  m e dia including  re al time audio and vi de co nf er en cing has b e co m e  a po pu lar and imp o r t an t asp ect  of   t e l ecom m u n i cat i on.  Oft e n, st ream i ng  c ont e n t   pr o v i d er do  n o t  wa nt  t h e e n user s t o  capt u re  an d uplic ate the stream ed m e dia, sinc e once s u c h   data is  cap tured  it can b e  freely re-d istrib u t ed  withou t an y con t rol  from  the sourc e . Pri v acy and  integrity are crucial   for  s u ccess f ul vide o or  audi confe r encing. Note  t h at data encry p tio n [1]  doe not  ge nerally suffice, si nce it   l eaves t h e sy st em  vul ne rabl e  t o  d upl i cat i o n  and  rec o rd ing af ter  decr yp ti o n . Po ssi ble s o urces  of st re a m ed   m e di a i n cl ude   st ore d   dat a , l i v e br oa dcast s  a n d  i n t e r active  confere n cing. We  foc u ses  on liv e br o a d cast  m e d i a   as ou r case st ud y bu t th e r e sults  are easily extended to  stored m e d i a o r  in t e ractiv e c o nferencing.  Secu re real -t i m e com m uni cat i on  ove r i n s ecure  net w o r k s  ge neral l y  i n vol ves t w o m a jo r sec u ri t y   conce r n aut h e n t i cat i on an d p r i v acy  [2] .  T h e  real -t im e t r anspo r t  pr ot ocol   (R TP) i s  use d   t o  t r ans p o r t  a m e di stream  b e tween  two  m u lti m e d i a term inals. Secure RTP em ploys encryp t i on t ech ni q u e s  on t h e R T st ream   [3] .           Evaluation Warning : The document was created with Spire.PDF for Python.
                        I S SN 2 089 -48 64  IJR E S V o l .  4, No . 2,  J u l y  20 1 5   :    7 1  – 81   72 2.   SRTP (SE C URE  RE AL-TIM E TRANSP ORT P R OT O C OL)  The Sec u re  Real-tim e Tr ans p ort Protocol (S R T P )  defi nes a fra m e wor k  w h i c h p r o v i d e s   co nfid en tiality,  m e ssag e  au th en ticatio n ,  and  rep l ay p r o t ection  for bo th un icast an d m u ltica s t RTP and  RTPCP  stream s. SRTP is v e ry su itable fo r Vo IP app licatio n s especially th o s e in vo lv i n g low-b it rate vo ice  co d e cs  (i.e. G . 7 29, iLB C , MELP, etc.)  since it  can be used with  hea d er com p ressi on  an d has n o  si gni fi cant  im pact  on   Qu ality o f  Serv ice. It can  al so  b e   u s ed  to   with  JPEG, M P EG2 ,  an d  M P EG4  to  secu rely strea m  v i d e o  in   m u ltim edia applications.  SRTP can ac hi ev e hi g h  t h ro u g h put  a nd l o pa cket  ex pan s i o n  even i n  en vi r o nm ent s   t h at  are a  m i xture  o f   wi re d a n wi rel e ss  net w o r k s [8]   SRTP is th e secu rity layer which  resid e s b e t w een  th e RTP/ RTCP ap p licatio n  layer an d  t h e tran spo r layer, ge nerating SRTP pac k ets from  the RTP/RTCP stre a m  and forwarding t h ese t o   the receive r. Similarly,  it also transform s  inco m i ng SRTP pac k ets t o  RT P/RTCP  pa ckets a n d pas s e s these  up the   stack.    The cry p togra phic state informati on associa t ed with eac SRTP str eam  is term ed the cryptogra phic   co n t ex t.  It m u st b e  m a in tain ed   b y  bo t h  th send er an rec e iver  of SRT P  stream s. If t h ere are se veral  SRTP  stream s present within a give n RTP session, separate cr y p togra phic conte x ts m u st  be  maintained for each.  cr yp tog r aph i c co n t ex t in cludes an y session   k e y ( a  k e d i rectly in  en cryp tio n / m e ssag e  auth en ticatio n) an d  t h m a st er key  as  wel l  as ot he w o r k i n g sessi on   param e t e rs.  Whi l e  SR TP  doe s n o t  de fi ne a  preci se m echani s m  t o   im pl em ent  key  excha nge , i t  does  pr o v i d e  for se ve ral  f eat ures  whi c h   m a ke key   m a nagem e nt  easi e r and   hei g ht en  o v era l l  key  secu ri t y . The  si n g l e  m a st er key  i s  use d  t o  p r ovi de  k e y i ng m a t e ri al   fo r a  key   deri v a t i o n   fun c tion .  Th is  can  g e n e rate the in itial sessio n  k e ys, as well  as p r ov id n e w session   k e ys p e ri o d i cally to  en su re  that there  will  be a lim ited am ount of  ciphe r  text  produce d  by a n y gi ven  e n cry p tion key.  Salting  keys are use d   t o  p r ovi de  pr ot ect i on a g ai nst   vari ous  assa ul t s  suc h  as  p r e - c o m put at i on a n d t i m e- m e m o r y  at t acks. [ 8 ]       3.   REQUIRE M ENT ANALYSIS    The networ k protoc ol used  to  tr ansmit the multimedi a  data:  Sec u r e  R eal  Tim e  p r ot ocol  ( S R T P )  i s   u s ed  to tran smit  m u lti med i a o v e r t h n e twork.    T h e  desi gn ers  of  SR TP  f o cuse on  de vel opi ng  a  pr ot oc ol   that can provide adequate  p r o t ect i on f o r m e di a st ream s but  al so  m a i n t a i n  key  pr o p ert i e s  t o  su pp ort   wi r e d   an wi reless network s   in  wh ich  b a ndwid th o r   und erlyin g tran spo r t lim i t at io n s  m a y ex ist.     Securing the multimedia data:   Pr i v ate Key cr yp tog r ap hy is ch o s en . T h e algorithm  for e n cry p tion  a nd  decry p tion c hosen is AE S.  Here selective e n cry p tion/ decr y p t i on m e t hod  has be en c h os en as o p p o s ed  t o   conve n tional  heavy wei ght e n cryption as  t h com putation ti me is reduced.      MPEG 1   has  been c h osen as t h e type  of  m u lt i m ed ia d a ta in   th is proj ect.        4.   DESIG N :  CL IENT SE RVE DESIG N   Ap pl i cat i ons a r e us ual l y  desi gne d s o  t h at  o n e com put er a c t s  as a server ,  pr ovi di n g  a se rvi ce t o   ot her   com puters  on  a network. T o  access a  server, a  program   is  run  on a  us er’s  com puter  this is called a  client  pr o g ram .  The pro g r am  est a bl i s hes a con n ect i on t h r o u g h  t h e net w or k  al l o wi ng co m m uni cat i on wi t h  t h e   serve r . T h e sec u rity m odel includes a licens e   m a nager t o   manage access  to requeste d data.  The ope r a tion of  th is feature  will b e   d e scri b e d i n  m o re  d e tail belo w.          Fig u re  1 .  Clien t/Serv e r In teracti on ac ros s  a  Packet  Data Network      Evaluation Warning : The document was created with Spire.PDF for Python.
I J ECE   I S SN 208 8-8 7 0 8     Design  o f  S ecure  Tra n s mission  o f   Mu ltimed i a  Da t a  Using  SRTP o n   Linu x Pla tfo rm  (Sa n k et  Dessa i 73 An ot he r sec u ri t y  feat ure i n v o l ves a sc ram b l i ng al go ri t h m ,  w h i c h i s  em pl oy ed  by  t h e s e rve r  a n d  a   cor r es po n d i n de-sc r am bl i ng  al go ri t h m ,  whi c h i s  em pl oy ed  by  t h e  cl i e nt .  A  scram b l i ng  al go ri t h m  sho u l d be   un k n o w n t o  a pot e n t i a l  at t a cker a nd a n  at t acker m u st  be r e qui red t o   brea k t h e scram b l i ng al go ri t h m  in o r de r   to rec o ver a n y  of the  data. In a ddition, t h e server  m u st  ha ve access to a  signif icant  num b er of  distinct   scram b lin g  algo rith m s .     Scram b l i ng se rves t w o p u r p oses. Fi r s t ,  t h e  scram b l i ng algo ri t h m  creat es a l a y e r of obf uscat i o n,   m a ki ng  reve rs e engi neeri n g   of t h e cl i e nt  s o ft ware m o re  diffic u lt. Sec o nd , scram b ling  pr o v ides  fo a hig h   deg r ee o f  i ndi v i dual i zat i on o f   t h e cl i e nt  soft ware . C onse q u e nt l y , scram b l i ng al g o ri t h m s   that  are un k n o w n t o  a   pote n tial attacker are  prefe r re d.      Perh ap s th e i d eal scram b lin g  alg o rith m   is a cryp to system , si n ce it co u l d   b e  ap p lied  to  all o f  th d a ta.     Howev e r, no  cryp tog r aph i c alg o rith m  is co n s id ered se cu re un til it h a un d e rg on e ex ten s iv e p e er  rev i ew an with stood  th e test o f  ti m e .  B u t th e scram b l i n g  algo rith m   i s  not  essent i a l  for cry p t o g r a phi c st re ngt h,  si nce   standa rd strong encryption  algorith m s  are em ployed for crypt o gra phi c st ren g t h . Gi ven  suc h  a s e t  o f   scram b ling algorithm s , each client will be equi ppe with  a subset of the available scra m b ling algori thm s .     Th e list o f  scram b l i n g  algo rit h m s  k n o wn  t o   th e clien t  w ill b e  en cryp ted   with  a k e k nown   on ly to  th serv er an d  st o r ed  on  th e clien t .  After au th en ticating  th e serv er , this en cryp ted  list will b e  p a ssed  fro m  th e cli e n t  to   the server.   When t h e serv er  receives the lis t, the serve r  decryp ts it and  random l y chooses from  am ong the   clien t ’s scram b lin g  alg o rith m s . Th e ID nu m b er o f  th select ed  scram b lin g  alg o rith m   is th en  p a ssed  from th serv er t o  t h clien t . No te t h at th is  p r o cess eli m in at es  t h nee d  f o r a dat a base co nt a i ni ng t h e m a ppi n g s   bet w ee n cl i e nt s an d sc ram b l i ng  al g o ri t h m s .    B y  havi n g   di ff erent  sc ram b l i ng al g o ri t h m s  em bedde wi t h i n   di f f ere n t  c l i e nt s, an by  sel ect i ng at   random  from  a  client’s algorit h m s , each client is uniq ue, a nd e ach c o mmunication  be tween client and  serve r   depe n d not   o n l y  on  di f f e r e n t  key s b u t  al so  on  di f f ere n t  al go ri t h m s  em bedded i n  t h e cl i e nt  soft wa re.  An   attacker,  who is able to break one  particula r  piece of  c o ntent, will likely  still have  a challenging task  whe n   trying to brea k anothe r piece  of c onte n t dest ined for t h e sa me client.  And eve n  if an attacker c o m p lete ly does  rev e rse eng i n e ering  o n   o n e  cl ien t , it is  lik ely  th at h e  will st i ll n eed  to  ex p e n d  rou g h l y th e sam e  effo rt to   attack   any  ot her  cl i e n t .     On th e serv er sid e , t h d a ta is scram b led ,  and  th en  en cry p ted .   On   th e clien t  sid e , th d a ta is  decry p t e d a nd  t h e res u l t i ng s c ram b l e d dat a  i s  passed t o  t h m e di a appl i c at i on. T h e m e di a appl i cat i on  passe s   th e scram b led   d a ta to  t h e secu re d e v i ce  d r iver (d iscu sse d  i n  m o re  d e tail belo w),  wh ich   de-scram b l es the d a ta.    In th is  way, the d a ta is  ob fu scated  un til th last p o s sib l po in t in th pro c ess.     Give n t h e sec u rity features, t h e sec u re  st rea m i ng m e di a pr ocess  p r ocee ds  as f o l l o ws:      The  secu re  we b se rve r   of fer s   streaming m e dia services     A clien t   requ ests a m e d i a file fro m  th e serv er     The sec u re a u thenticates the   user and  t h us er a u the n ticates the se rver      The license m a nage ve rifies  that th e  user on  that pa rticular  m achin e is  allowed access  to t h request e med i a file.      If the user is allowed access, the  License Manger gene rates two random keys.  The first key will be for  secu re RTP  p a ck et en cryp tion  using  AES an d  t h e secon d   k e y will b e  t h e scram b lin g  k e y u s ed   on  m e ssag e   bl oc ks  of  m e dia dat a     The  ser v er  ge n e rat e s a  ra nd o m  num ber t o  s e l ect  fr om  am ong  t h e  scram b l i n g  al g o ri t h m s  sup p o rt e d   by  t h e   cl i e nt .  It  generat e s anot her r a nd om  num ber t o  be used as t h e key  for t h e  scram b l i ng algo ri t h m .    B o t h  o f   these are encry p ted (but not scram b led) and  passe d to  the client. The client  m u st acknowledge recei pt  of  th is in form at io n .       Th e serv er u s e cip h e b l o c k   ch ain i ng   (CBC) to  scram b le th e d a ta  p e p a ck et, with  a  ran d o m ly selec t e d   in itializat io n   vecto r   (IV) in cl u d e d   with  each p a ck et fo r cry p tog r aph i c termin o l o g y  and  i n fo rm atio n .       Th e secu re RTP alg o rith m  wi th  th e Ad v a n c ed  En cryp tio n   Algo rith m  (AES) with   12 8-b i t  k e y is ap p lied   to  th e scram b led   d a ta in  each p a ck et.   Th e p a ckets are CBC encryp ted with a  rando m  IV in cl u d e d  i n  each .       The sc ram b led and e n cry p ted  secure  RTP  pa ck ets are tran smit ted  ov er th e n e twork.    The client  ope n s t h e sec u re   media application from  the  fi l e . B l oc di ag ra m  of t h i s  i s  s h o w n  i n   fi g u re  1 .     The m e dia application reques ts the  secure RTP decrypti on key. The  us e r   m u st authent i cate in order  for  th e clien t  to obtain  th d ecry p tio n   k e y.       The m e dia application strips  the sec u re   RTP  heade r  a n d se quence s the  pac k ets.      Th e m e d i a ap plicatio n  is o b liv iou s  to  th e scram b lin g .  It therefo r writes th e scram b led  d a ta to  th e d e vice  th at p l ays th e file. Th e i n teractio n   b e tween   cl i e nt  an d se rve r   i s  sh ow n i n   fi g u re  2 .   Evaluation Warning : The document was created with Spire.PDF for Python.
                        I S SN 2 089 -48 64  IJR E S V o l .  4, No . 2,  J u l y  20 1 5   :    7 1  – 81   74     Fi gu re  2.  B l oc Di ag ram  of t h Desi g n   of  t h e Secu re  Sy st em  wi t h  C l i e nt /Ser ver  I n t e ract i o n           Figu re  3.  Flo w  Diag ram  for  th e Sec u re SRT P  Tra n sm ission      5.   IMPLEME N TATION : CL IENT  SE RVE R DESIG N   Th e im p l e m en tatio n  sectio n   d e scri b e s in   detail th e v a riou s co m p on en t s  o f  the secure streamin m e di a sy st em .  Fo r a  com p l e t e  so urce  c ode   l i s t i ng ki ndl y  s ee t h e a p pen d i x Som e  of  t h e  f unct i o ns  use d  a r e   listed  b e low.    Evaluation Warning : The document was created with Spire.PDF for Python.
I J ECE   I S SN 208 8-8 7 0 8     Design  o f  S ecure  Tra n s mission  o f   Mu ltimed i a  Da t a  Using  SRTP o n   Linu x Pla tfo rm  (Sa n k et  Dessa i 75   err _ st at us _t  srt p_i ni t  ( voi d)   srtp_ i n it () in iti alizes th e srt p  l i b r ary.    err _ st at us _t  srt p _ p r ot ect  ( s rt p _ t  ct x,  v o i d  * r t p _ h d r ,  i n t   *l en _pt r)   srt p _p r o t ect  ()   i s  t h e Sec u re  R T P se nde r- si de  pac k et  p r ocess i ng  f unct i o n.     err _ st at us _t  srt p _ u n p r ot ect  (sr t p_t  ct x ,   voi * s rt p _ h d r , i n t  *l en_ p t r )   srtp_unprotect  () is  the  Secure  RTP  r eceiver-side packet pr ocessing function.    err _ st at us _t  srt p_c reat e ( s rt p _ t  *sessi on , c o n s t  srt p _ pol i c y _ t  *p ol i c y )   srtp_create  () a llocates and ini tializes an SRT P  session.    err _ st at us _t  srt p_a d d _ s t r eam   (srt p_t  se ssi o n ,  co nst  s r t p _p ol i c y _ t  *p ol i c y )   srtp_ a dd_ stream  () allo cates an d in itializes an  SRTP stream  with in a  g i v e n SRTP session   err _ st at us _t  srt p _ r em ove_st r e a m  (srt p _ t  sess i on,  ui nt 3 2_t   ss rc)   srtp_rem ove _s tream  () deallocates an  SRTP  stream .   •  v o i d  cr yp to_p olicy_ set_ r t p_def a u lt ( c r y p t o _ p o licy_ * p cr yp to_p o licy_set_ r tp_d ef au lt ( )  sets a cr yp t o   p o licy stru ct u r e to  t h e SRTP d e fau lt po licy    fo r R T P  p r ot ect i on.   •  v o i d  cr yp to_p olicy_ set_ r t cp_d ef au lt ( c r y p t o_ po licy_ t *p)  cryp to_p o licy_set_ r tcp_d efault () sets a cry p to   po licy structu r e to  t h e SRTP d e fau lt po licy   fo r R T C P  p r ot ect i on.     voi d c r y p t o _ p o l i c y _ set _ aes_c m _128 _hm ac_sha 1 _ 3 2  (c ry pt o_ p o l i c y _ t * p )   cr yp to_p o licy_set_ aes_ c m _ 128 _h m ac_ sh a1 _3 2 ()  sets a cr y p to   po licy str u ctu r e t o  a sho r t -   au th en ticatio n  tag   po licy    voi d c r y p t o _ p o l i c y _ set _ aes_c m _128 _n ul l _ a u t h   (cry pt o _ p o l i c y _ t  *p )   cr yp to_p o licy_set_ aes_ c m _ 128 _nu ll_ au t h  ( )  se ts a cry p to   po licy  struct ure to  an   en cry p tio n-on l y  p o licy    voi c r y p t o _ p o l i c y _ set _ n u l l _ c i phe r_ hm ac_sh a1_ 8 0  (cry pt o_ pol i c y _ t  *p )   cr yp to_p o licy_set_ n u ll_ ciph er _h m ac_ sh a1_8 0 ()  sets a cr y p to   po licy str u ctu r e t o  an     au th en ticatio n - o n l y p o licy  •  err_status _t srt p _dealloc  (s rtp_t s)  srtp_ d eallo c ()  d eallo cat es st orage  for an SR TP sessi on context.  •  er r_ statu s _ t  cryp to _g et_r an do m  ( u n s i g n e d   ch ar *bu ff er , un sign ed  in t leng th)  writes a  ran dom  o c tet strin g .     LibSRTP:  To   in stall lib SRTP, down l o a d  t h e latest release o f  the d i stri b u t io n  fro m   srtp.source for g e.ne t . T h form at  o f  th e n a m e s o f  th d i stribu tio ns is srtp -A.B.C.t gz, wh ere A is th e v e rsi o n  num b e r, B  is th e   m a j o release  num ber, C  is the  m i nor  release  num ber, and t g is th file ex ten s ion .  Unp ack th d i stribu tion  and  ex tract th e source files th d i recto r y in t o   wh ich  th so u r ce files will g o  is n a m e d   srtp .Imp lem e n t atio n  detail s   i n   Li n u x  usi n g ker n el  2. 4. 16   a r e gi ve n bel o w   i n  det a i l .   Server c o m p onents lib SR TP was in stalled on  th e serv er  an d us es th e GNU au t o conf an d m a k e  u tiliti es. In  t h e srt p   di rect o r y ,  r u n t h e  co n f i g ure  scri pt  a n d t h e n  m a ke:   . /co n fi gu re  [o ption s ]   mak e   The c o nfigure  script acce pt t h e following options:    Hel p -p ro vi de a usa g e s u m m ary .     Di sabl e- de bu com p i l e s l i b SR TP wi t h o u t  t h e  r unt i m e dy nam i c debu g g i n g  sy st em   En ab le-g en eric-aesicm  co m p il e in  ch ang e s for ism acryp     En ab le- s yslog   u s e syslog fo er ro r r e p o r ting .     Di sabl e- st d out   di sabl es  st d out  f o r e r r o r re p o r t i ng.     En ab le-con so l e  u s e /d ev /con so le fo r error  rep o rting    Gd oi -  use  G D O key  m a nage m e nt  (di s a b l e d  at  p r esent ) .   License Manager:      The  receive r se nds  a st ring  of  support e d  algorithm s  in encry p ted  form .   The server ra ndomly elects one  of  th e supp orted alg o rith m s map s  th e clien t  alg o rith m  t o  its serv er alg o rith m  an d  send s th e selected  algorithm  number to t h e recei ver.  T h serve r  the n  sta r ts se ndi ng the  strea m ing data i n   prede f ine d   pac k et  size.    The l i cense m a nage r m a i n t a i n s a l i s t of  m u l t i m e di a dat a  fi l e s and co rre sp o ndi ng  user nam e  and n u m b er o f   ti m e s th e u s er  is p e rm i tted  to inv o k e  t h at fi le.   On each  i n vo cation ,  th licen se m a n a ger  d ecrem en ts  b y   one  the allowe num ber for t h at pa rtic ular  user.   If t h us er is allowed i n fi nite num b er of accesses ,  the n   the license m a nage will not dec r em ent the num b er of t i m e s allowed  on each exec ution.   Acce ss  is  Evaluation Warning : The document was created with Spire.PDF for Python.
                        I S SN 2 089 -48 64  IJR E S V o l .  4, No . 2,  J u l y  20 1 5   :    7 1  – 81   76 allo wed on  a  particu l ar file  on ly if th e tim es  allo wed   are  greater than zero.  In  practice this logic coul be  easi l y  im pl em ent e usi n g  a se cure  dat a base s y st em   Th e licen se m a n a g e r also  m a i n tain s a list of  b r ok en  scram b lin g  algo rith m s .  If th e licen se  m a n a g e r d e tects  that all the supported algor ithm s  at the receiver e n d are  broken, it  will ask the  serve r  to term inate its  connection  with the  recei ver  without giving any  explan ati o n to the  receive r.    Receiver Side Com p onents     libSRTP wa s installed on t h e  receive r side  and  uses the  GNU a u toc o nf and m a ke util ities as we did i n   serv er si d e  , same as to   b e  carried   ou t  in receiv er si d e  .    The usa g e for client_server.c is    client_server [[-d <de b ug>]* [-k <key [-a][-e]] [-r] de st_ip  dest_port][-l]    5. 1. SRTP   Cr ytographic Conte x t      Each  SRTP  stream  require the se nde r a nd receive t o  m a intain cry p togra p hic state inform ation.  Th is info rm ati o n is called  t h e "cryp t o g raph i c  con t ex t".  SR TP uses  t w o   t y pes of key s :    1.   Session  k e ys  an 2.   Master  k e ys.    By a "session key",  we m ean a  key,  which is  us ed   d i rectly in  a cry p tog r aph i c tran sfo r m  (e.g .,  encry p tion or message  aut h e n tication),  and  by a "m aster key", we m ean a ra ndo m  b it st ring  (g iv en   b y  th e k e m a nagem e nt  prot ocol fr om   whi c h sessi on  key s  are  deri ved in a c r yptogra p hically secure  way. T h master  key ( s )  an d ot h e r pa ram e t e rs  i n  t h e cry p t o g r ap hi c co nt ext  are pr o v i d e d   by  key  m a nagem e nt   m echani s m s   external  to SR TP. [15]     5. 2. M a ppi n g  SRT P  Pac k ets   t o   C r yp t ogr a phi C o n t e x ts   RTP session   fo r each   p a rticip an t is  d e fin e d [RFC35 50]   b y  a pai r   o f  de s t i n at i on t r a n s p ort  a d d r esses  (o ne net w o r add r ess  pl us a  po rt  pai r   fo R T P an d R T C P ), a nd t h at  a m u lt im edi a  sessi on i s   defi n e d as a  col l ect i on  of   R T P sessi ons .   F o r  exam pl e, a  part i c ul ar  m u l t i m e di a sessi on  co ul d i n cl u d e a n  a u d i o R T session, a  vi de o RTP  sessi on, and a te xt RT P session.  A cryp tog r aph i c con t ex t SHALL b e  un iqu e l y  id en tified b y   th e trip let co n t ex t id en tifier:   con t ext id =  < SSRC,  des t ination  netw ork  addres s,  desti n ati o tr ansp ort p o rt  numb er>   Whe r e,  t h des t i n at i on  net w o r k a d dres s a n d  t h des tin ation  tran sp ort port are th on es i n  th e SRTP  p ack et.   It is assu m e d  th at, when  presen ted   with  th is in fo rmatio n ,  th k e man a g e m e n t  retu rn s a con t ext with  th e inform atio n .   A s   n o t ed  above, SRTP and  SRTCP b y  d e f a u lt sh ar e th bu lk   o f  t h p a r a meter s  in  th e cr yp tog r aph i cont e x t .  Th us,  ret r i e vi n g  t h e c r y p t o  co nt ext  p a ram e t e rs for an SR TC P st rea m  i n  pract i ce  m a y   im pl y a bindi ng   to  th e correspon d e n t  SR TP cryp to  con t ex t.    It is  u p  to th i m p l e m en tatio n  to assu re su ch   b i nd ing ,  sin c e th R T C P  po rt  m a y  not  be  di rect l y  deduci b l e  fr om  t h e R T P port   onl y .  Al t e r n at i v el y ,  t h e k e y   m a nagem e nt   m a y   ch oo se to  pro v id e sep a rate SRTP- an d SR T C P- co nt ext s du pl i cat i ng t h e  com m on param e t e rs (such a s   m a st er  k e y(s)).   Th latter ap pro a ch  th en   also  enables SRTP a nd  SRTCP to  use,  e.g.,  d i stin ct transfo r m s , if  so  desi re d.  Si m i lar co nsi d e r at i o ns ari s w h en  m u lt i p l e  SR TP st ream s, form ing  pa rt  o f  o n si ngl e R T ses s i o n ,   share  key s  an ot he param e t e rs.   If  no  valid context can  be found for a  pa cket corre spo n d i ng  to  a cert a in  con t ex t iden tifier, th at   packet   M U ST  be di scar ded .  [ 15]     5. 3.  Al g o ri t h m o f  S R T P   Packet Pr ocessing     Th e fo llowing   ap p lies to SRTP.Assu m in g  initializa ti o n  of th e cry p tog r aphic co n t ex t h a s t a k e n p l ace  v i a k e y m a n a ge m e n t; th e send er SHALL  d o  th fo llowing  t o  co nstru c t an   SRTP  p ack et:   Step -1 Determin e wh ich  cryp to grap h i c con t ex t to use.  Step -2 Determin e th e ind e x of th e SRTP  pack et  u s ing  t h rollove r c o unt er, t h highest  sequence  number in  t h e cry p t o gra p hi c co nt ext ,  a n d t h e  se que nce  num ber i n  t h e   R T P pac k et   Step -3 Det e r m i n e t h m a ster key  an d m a st er sal t .   Thi s  i s  do ne usi ng t h e i nde det e r m i n ed i n  t h e p r evi ous   step  or t h e c u rrent MKI in  the   crypt o graphic conte x t.   Step -4 Determin e th e session   k e ys and  sessio n   salt k e y (i f th ey a r used  by the tra n s f orm ) , using m a ster key,  m a st er sal t ,  ke y _de ri vat i o n_ r a t e , an d ses s i o key - l e n g th s in  th e cry p tog r ap h i c con t ex with  th e ind e x .     Step -5 E n cry p t the RTP payload to  produce t h e Encrypte d  Po rtion o f  th p a ck et, Th is step   uses th encry p tion algorithm  indicated  in th e cryp t o grap h i c con t ex t, th e sessi on  encry p tion key  and the  sessi on salt   ( i f   u s ed )   fo und in  Step   4  tog e t h er w ith th e i n d e x fou n d  i n  St ep   2 .   Step -6 If t h MKI i n d i cator  is set to   o n e , ap p e nd  th e MKI to  th e p a ck et.  Evaluation Warning : The document was created with Spire.PDF for Python.
I J ECE   I S SN 208 8-8 7 0 8     Design  o f  S ecure  Tra n s mission  o f   Mu ltimed i a  Da t a  Using  SRTP o n   Linu x Pla tfo rm  (Sa n k et  Dessa i 77 Step -7 For message aut h ent i cation, com p ute th e au th en ti catio n  tag  fo th e Au t h en ticated  Po rti o n   o f  th e   packet, this ste p   uses t h e current rollover c o unte r , t h aut h entication al gorithm  indi cated in the  crypt o graphi c   co n t ex t, an d the session  au th en ticatio n   k e y fo und  in Step 4.  App e nd  t h e au th en ticatio n  t a g  to th p a ck et.    5.4. Algorithm  of Authenticate   a nd Decr ypt  an  SRTP Packe t       Step -1 Determin e wh ich  cryp to grap h i c con t ex t to us.  Step -2 R u n  t h e al go ri t h m  t o  get  t h e i nde o f  t h e  SR TP  pa cket . T h e al go r i t h m  uses t h e  r o l l ove r c o unt e r  an d   highest se que nce num b er in t h e c r yptogra phic conte x t wit h  the se quence  num b er in t h e SRTP pac k et.  Step -3:  Dete rmine the  m a ster key and m a ster salt.  If the  MKI ind i cato r  in  the con t ex t is set to  o n e , u s e th M K I i n  t h e  SR TP  packet ,  ot h e rwi s use  t h i nde fr om  t h e pre v i o us  st ep.   Step -4:  Det e r m i n e t h e sessi on  key s , a nd s e ssi on sal t  (i use d  by  t h e t r a n sf orm )  usi n m a st er key ,  m a st er sal t ,   k e y_d eri v atio n_ rate and  sessi o n   k e y-leng th s in  th e cryp t ograph i c con t ex t with  th e ind e x, d e term in ed  in  Step 2  an d 3.  Step -5:   Fo r m e ssage a u t h ent i cat i on a n d  re p l ay  pr ot ect i on,  fi rst  c h ec k i f  t h pac k et  has   been  re pl ay ed,  usi n g   the Replay List and the index as determ ined in Step 2.  If t h e pac k et is judge d to  be re played, the n  the packe t   M U ST be di sc arde d,  a n t h e  event  SH O U L D  be  l o g g ed . Next ,   pe rf orm   veri fi cat i o n of  t h aut h ent i cat i on  t a g,  u s ing  th e ro llov e r co un ter from Step  2 ,  th e au th en ticatio n   alg o rith m   in d i cated  in  th e cryp to grap h i c con t ex t,  and t h e sessi on  aut h e n t i cat i o n  key  f r om  St ep 4.  If t h e res u lt  is "AUT HE N T ICAT I ON  F A IL URE”, t h packet   M U ST  be  di sc arde fr om  furt her  p r oce ssi n g   and  t h e e v e n t  S H O U L D   be l o gge d.   Step -6:  Dec r ypt the Encry p ted Porti on  of the packet,  using the decryption algo rit h m   indicated in the   cr yp tog r aph i c co n t ex t, th e sessio n  en cr y p tion  k e y an d  salt  ( i f  u s ed)  fo und in  Step  4   w ith th e in d e x  fr om Step   2.   Step -7:   Up dat e  t h e r o l l o ver  c o u n t e an hi g h est  se que nce  num ber,  s_l ,  i n  t h e cry p t o gra p hi c co nt ext ,  u s i n g  t h e   p ack et i n dex esti m a ted  in  Step   2 .   If rep l ay pro t ection  is  p r ov id ed , also   up date th e Rep l ay  List.  Step -8:  When prese n t, rem o ve  the  M K a n d auth e n t i cat i on  t a g fi el ds  f r om  t h e pac k et .       6.   RESULTS  The bel o gi v e n Fi g u re  4, s h o w i n g t h re sul t  of se n d er  si de (Se r ve r) whe r e st ream ing  of  w o r d s   taking  place t o wa rds client  side ta king  place. T h is  s n ap s hot  incl ude  the  SSR C valve  cipher  key,  aut h e n t i cat i on  key ,  est i m a t e d packet  i n dex  SR TP aut h e n t i cat i on t a g i n cl udi n g  m a st er key / sal t  key   gi ve d u ring  in itial setu p .  Th e b e l o w g i v e n  Figure 5 ,  showing  th e resu lt at cli e n t  sid e , wh ere th e word s sen t  fro m   serv er sid e  is  in  en cryp ted   fo rm  fro m  th is we can tell  t h at no   o n e  can  und er stan d an yth i ng  if  th at  d a ta is  accessed in m i ddle during tra n sm ission. The  below  give n Fi gure 6, showing the res u lt at client side,  whe r e   the w o rds  se nt  fr om  server  sid e  is in  ori g inal  fo rm , th i s  i s  p o ssi bl e aft e r  de c r y p t i n g t h e  dat a  sent   by  se nde r.           Fi gu re  4.  M P E G   Vi de o C l i p   Dat a  Se ndi ng   From  Ser v er  t o  C l i e nt       Evaluation Warning : The document was created with Spire.PDF for Python.
                        I S SN 2 089 -48 64  IJR E S V o l .  4, No . 2,  J u l y  20 1 5   :    7 1  – 81   78 The a b o v gi v e n Fi gu re  7, s h owi n g  t h res u l t  of se n d er si d e , w h ere  st rea m i ng o f  M P E G  cl i p  t a ki n g   place towa rds  client side taking  place.  T h below gi ven  Figure 8, showing th e fram e of playing  ori g ina l  clip  whi c has t o   b e  sent  f r o m  server  si de t o  cl i e nt  si de.  Th e be l o gi ve n Fi gu re 9 ,  s h o w i n g t h e f r am e of  pl ay i n g   en cry p ted  clip   wh ich  h a s sen t  fro m  serv er si d e  to  clie nt  si d e .The  bel o w gi ven Fi gu re 1 0 ,  sho w i n g t h e f r am o f  p l aying  clip   after  d ecry p ting  th e en cryp ted  clip   sen t   from  serv er sid e  to  clien t  si d e         Fi gu re  5.  The   R e sul t s  o f  C l i e nt  Si de Whe r e  St ream  of  Wo rds  sent  f r om  Serve r  i n  E n cry p t e Fo rm            Figure  6. The   Results of Client Side Whe r e  Stream  of  Words  sent  from   Serve r  in bee n  R eceived  at Client  Si de i n  a Sec u r e d M a nne r   Evaluation Warning : The document was created with Spire.PDF for Python.
I J ECE   I S SN 208 8-8 7 0 8     Design  o f  S ecure  Tra n s mission  o f   Mu ltimed i a  Da t a  Using  SRTP o n   Linu x Pla tfo rm  (Sa n k et  Dessa i 79     Fi gu re  7.  M P E G   Vi de o C l i p   Dat a  Se ndi ng   From  Ser v er  t o  C l i e nt           Figure 8.  MPE G  Vide Clip Data  Recei ving From  Server  by Client              Fi gu re 9.   Fram o f  Ori g i onal  Vi de C l i p      Evaluation Warning : The document was created with Spire.PDF for Python.
                        I S SN 2 089 -48 64  IJR E S V o l .  4, No . 2,  J u l y  20 1 5   :    7 1  – 81   80     Fi gu re 1 0 . Fra m of  E n c r y p t e d Vi de C l i p               Fi gu re  1 1 Fra m e of  Vi de o C l i p  aft e Dec r y p t i o n           7.   TESTING      Tabl 1. T e st   Dri v e a n d  i t s  F unct i o ns         Test Driver   Function  Tested   ker n el_dr iver   cr y p to ker n el  ( c ipher s ,  auth funcs,  r ng)   sr tp_dr iver   Sr tp in-m e m ory  tests ( does not use the networ k)  r dbx_dr iver   r dbx ( e xtended r e play  database)  r o c_dr iver  extended  seque nce  nu m b er  functions   r e play _dr iver r e play   database  cipher _dr iver  cipher s   auth_dr iver  Hash  functions       Sev e ral test d r iv ers and  a si mp le and  po rtab le srtp  app licatio n  is in cl u d e d   in  th e test/ su bd irectory. So me of  th e test driv er  an d its Fu n c tion  tested u s i n th is lib srtp  are l i sted  abov e in tab l e 1.  The ap pl i cat i o n f o r m e di a cl ient _se r ve r.c i s   a sim p l e  rt p appl i cat i on w h i c h rea d s dat a  f r o m  part i c ul ar   fi l e  and t h en  s e nd s t h em  out  one at  a t i m e usi ng  [s] r t p . M a nual  s r t p   key i n g  u s es t h -k  o p t i on a u t o m a t e d key   man a g e m e n t  usin g gdo i will  b e  ad d e d  later.  The usa g e for client_server.c is  clien t _ s erv e r [[- d <d ebu g > ]* [- k <k ey>  [ - a ][-e]] [ - s  | -r ] d e st_ i p   d e st_ p o r t][- l]  Either the -s (s ende r)  or - r  (re ceiver)  optio m u st be c hose n . The  val u es  dest _i p, dest _p ort  are t h e IP a d d r es s   an d UDP po rt  to   wh ich  th e d i ctio n a ry  will b e   sen t resp ectively. Th op tio ns are:   - s   (S )RTP se n d er  - ca us es  ap p t o  se nd  dat a   - r   (S)RTP  rec e ive - cause s a p p to  receive  data  - k  < k ey>  use  SRTP m a ster key <key>,  whe r e the  key  i s  a   hexa deci m a l  val u e ( w i t h out  t h e l eadi n g  "0 x " - e  en cry p t/d ecryp t  (fo d a ta co nfid en tiality) (req u i res  u s of -k   op tio n as  well)  - a  m e ssage au t h ent i cat i o n  ( r e qui res  use  of  - k   opt i o n a s   wel l )   - l  l i s t  t h e a v ai l a bl e de b u g  m odul es   Evaluation Warning : The document was created with Spire.PDF for Python.