You are on page 1of 7

Cryptography

 
A  fixed-­‐length  MAC  
Intui/on?  
•  We  need  a  keyed  func/on  Mac  such  that  
–  Given  Mack(m1),  Mack(m2),  …,  
–  …it  is  infeasible  to  predict  the  value  Mack(m)  for  
any  m∉{m1,  …,  }    

•  Let  Mac  be  a  pseudorandom  func/on!  


Construc/on  
•  Let  F  be  a  length-­‐preserving  pseudorandom  
func/on  

•  Construct  the  following  MAC  Π:  


–  Gen  –  choose  a  uniform  key  k  for  F  
–  Mack(m)  –  output  Fk(m)  
–  Vrfyk(m,  t)  –  output  1  iff  Fk(m)=t  

•  Theorem:  Π  is  a  secure  MAC  


Proof  by  reduc/on  

m1 m1
t1 t1


mi mi
PRF/random ti ti

m m, t
if
(t=t*)
t* output 1 D
Analysis  
•  When  D  interacts  with  Fk  for  uniform  k,  the  
view  of  the  adversary  is  iden/cal  to  its  view  in  
the  real  MAC  experiment  
–  Pr[DFk  outputs  1]  =  Pr[ForgeAdv,  Π(n)  =  1]  

•  When  D  interacts  with  uniform  f,  then  seeing  


f(m1),  …,  f(mi)  does  not  help  predict  f(m)  for  
any  m  ∉{m1,  …,  mi}    
–  Pr[Df  outputs  1]  =  2-­‐n  
Analysis  
•  Since  F  is  a  pseudorandom  func/on,  
|  Pr[DF  outputs  1]  -­‐  Pr[Df  outputs  1]  |  <  negl(n)  
k

⇒  Pr[ForgeAdv,  Π(n)  =  1]  =  Pr[DF  outputs  1]  ≤  2-­‐n  +  negl(n)  


k
Drawbacks?  
•  In  prac/ce,  block  ciphers  (aka  PRFs)  have  
short,  fixed-­‐length  block  size  
–  E.g.,  AES  has  a  128-­‐bit  block  size  
–  So  the  previous  construc/on  is  limited  to  
authen/ca/ng  short,  fixed-­‐length  messages  

•  Next  few  lectures:  authen/ca/ng  long,  


variable  length  messages  

You might also like