Académique Documents
Professionnel Documents
Culture Documents
A. Fster Sabater
INFOSEC-EMACOT
Abril 2009
Contenido
Introduccin a la criptografa Procedimiento de cifrado en flujo Algoritmos de cifrado en flujo (Ejemplos) The eSTREAM Project
INFOSEC-EMACOT Abril 2009
A. Fster Sabater
Criptologa
Criptologa = Criptografa + Criptoanlisis Criptografa: desarrolla mtodos de cifrado
A. Fster Sabater
Abril 2009
Texto claro
cifrado
Texto cifrado
descifrado
Texto claro
A Criptoanlisis descriptado
A. Fster Sabater INFOSEC-EMACOT
Abril 2009
Criptografa Actual
Criptosistemas actuales
Clave secreta
Clave pblica
Cifrado en flujo
Cifrado en bloque
A. Fster Sabater
INFOSEC-EMACOT
Abril 2009
A. Fster Sabater
INFOSEC-EMACOT
Abril 2009
Mensaje Criptograma
ESTO NREF
ES NR
UN ST
EJEMPLO NBNYCIF
A. Fster Sabater
INFOSEC-EMACOT
Abril 2009
Mensaje Criptograma
SISTEMAS TSISSAME
CLASICOS SALCSOCI
A. Fster Sabater
INFOSEC-EMACOT
Abril 2009
One-time Pad (Cifrado con cinta aleatoria) Clave: Secuencia binaria aleatoria de uso nico Cifrado: Descifrado:
Yi = X i Z i X i = Yi Z i mod 2 mod 2
10011 01111 01111 01110 10110 10101 01100 10010 00101 11010 00011 11100
00011 01111 01101 00101 11011 00101 01011 00110 11000 01010 00110 00011
Condiciones de aplicacin: La clave se utiliza slo una vez El criptoanalista tiene acceso slo al criptograma Secreto perfecto: El texto claro X es estadsticamente independiente del criptograma Y para todos los posibles textos claros y todos los posibles criptogramas P(X = x | Y = y) = P(X = x) C.E. Shannon, Communication Theory of Secrecy Systems, Bell. Syst. Tech. J., 28 (1949), 656-715.
A. Fster Sabater
INFOSEC-EMACOT
Abril 2009
Criptograma 11000
A. Fster Sabater
INFOSEC-EMACOT
Abril 2009
zi
yi
zi
EMISOR
RECEPTOR
xi
A. Fster Sabater
xi zi = yi
INFOSEC-EMACOT
yi zi = xi
xi
Abril 2009
Cifrado en flujo
Sec. cifrante = Algoritmo + clave Sec. peridica Pseudoaleatoriedad No estamos propiamente en condiciones de secreto perfecto
c1
c2
c3
A. Fster Sabater
INFOSEC-EMACOT
Abril 2009
Secuencia Cifrante:
1.
Qu caractersticas generales presentan estas secuencias? Cmo son los generadores que las producen?
INFOSEC-EMACOT Abril 2009
2.
A. Fster Sabater
Secuencias Cifrantes:
Caractersticas Generales (I)
Perodo ( 1038 bits) T = 2128 - 1 3,40 x 1038 bits Vc = 120 x 106 bits/seg 9,452 x 1022 aos 221x109 veces la edad del universo
A. Fster Sabater
INFOSEC-EMACOT
Abril 2009
Secuencias Cifrantes:
Caractersticas Generales (II)
A. Fster Sabater
INFOSEC-EMACOT
Abril 2009
Secuencias Cifrantes:
Caractersticas Generales (III)
Autocorrelacin
AC (k ) = ( A D) / T
1 0
0 0
1 1
1 0
0 1
0 0
1 0
0 0
1 0
0 1
0 1
0 1
0 1
1 0
1 1
1 1
A. Fster Sabater
Autocorrelacin en fase:
AC (k ) = 1
G1: En cada perodo de la secuencia considerada el nmero de 1s tiene que ser aproximadamente igual al nmero de 0s. G2: En cada perodo de la secuencia considerada la mitad de las rachas, del nmero total de rachas observadas, tiene longitud 1, la cuarta parte longitud 2, la octava parte longitud 3 etc. Para cada longitud habr el mismo nmero de blocks que de gaps. G3: La autocorrelacin AC(k) fuera de fase tiene que ser constante para todo valor de k.
INFOSEC-EMACOT Abril 2009
A. Fster Sabater
x4 + x + 1
1 0 0 0 0 0 0 1 0 0 1 1 0 1 1 1 1 1 1 1 1 1 1 0 1 1 0 1 1 0 1 0
Longitud L
(T = 2L 1)
PN-secuencia
Funcionamiento
Secuencia generada: 1 0 0 0 1 1 1 1
INFOSEC-EMACOT
KKK
Abril 2009
A. Fster Sabater
x4 + x + 1
1 0 0 0 0 0 0 1 0 0 1 1 0 1 1 1 1 1 1 1 1 1 1 0 1 1 0 1 1 0 1 0
a4 = a3 a0 a5 = a4 a1
KKK
Abril 2009
A. Fster Sabater
Generadores de secuencia binaria Basados en Registros (LFSR) Clave: contenido inicial de estos registros Long. Clave = No. etapas en los LFSRs Hiptesis de partida:
A. Fster Sabater
x1
LFSR 2
x2
zi
LFSR 3
x3
SELECTOR
F ( x1 , x2 , x3 ) = x1 x1 x3 x2 x3
A. Fster Sabater INFOSEC-EMACOT Abril 2009
XOR AND
b(t )
LFSR1
LFSR3
a3 (t )
A. Fster Sabater
Generador binario muy sencillo (Crypto93) Compuesto de dos LFSRs: LFSR1 y LFSR2
LFSR 1 clock
ai
P
cj
LFSR 2
bi
A. Fster Sabater
Ley de decimacin P:
Algoritmos de cifrado A5
Algoritmo A5: generador de secuencia pseudoaleatoria Uso: cifrado del enlace entre el telfono mvil y la estacin base (Telefona G.S.M.) Doble versin:
A5/1 (pases europeos) A5/2 (fuera de Europa)
INFOSEC-EMACOT Abril 2009
A. Fster Sabater
Telefona G.S.M.
(Global System for Mobile Communications)
Conversacin G.S.M. = secuencia de tramas Trama = 228 bits enviada cada 4,6 milisegundos Cifrado de la conversacin: 0 0 0 0 1 1 0 1 texto claro (conversacin digitalizada) 1 0 1 1 0 1 0 1 sec. cifrante (producida por algoritmo A5) 1 0 1 1 1 0 0 0 sec. cifrada (conversacin cifrada)
Algoritmos criptogrficos G.S.M. : A5/1, A5/2 (cifrado) Estos algoritmos nunca fueron publicados oficialmente M. Briceno esquemas funcionales del A5/1 y A5/2 (ingeniera inversa) (http://cryptome.org/gsm-a512.htm)
A. Fster Sabater
INFOSEC-EMACOT
Abril 2009
Cifrado/Descifrado en A5/1
emisor
00110 01101 01011 01011 00010 01001 11001 01011 10010
.. .. .. .. .. ..
receptor
01011 01101 00110
A. Fster Sabater
Algoritmo A5/1
19 14 c1 1
R1
22
c2
11
R2
23
c3
R3
R1 y R3 desplazan
Abril 2009
Algoritmo E0
A. Fster Sabater
INFOSEC-EMACOT
Abril 2009
A. Fster Sabater
PERFIL 1
Aplicacin software con alta velocidad de salida de bits cifrados (throughput) Longitud de clave: 128 bits Longitud de IV: 64 128 bits
PERFIL 2
Aplicacin hardware con recursos limitados: memoria, no. puertas, consumo de potencia Longitud de clave: 80 bits Longitud de IV: 32 64 bits
Seguridad, criptoanlisis/bsqueda exhaustiva, eficiencia, claridad de diseo, superior al AES (counter mode)
INFOSEC-EMACOT Abril 2009
A. Fster Sabater
Panel de expertos: S. Babbage, C. de Cannire, A. Canteaut, C. Cid, N. Courtois, H. Gilbert, T. Johansson, J. Lano, C. Paar, M. Parker, B. Preneel, V. Rijmen, M. Robshaw + Toda la Comunidad Criptogrfica Internacional !!! Seleccin de algoritmos basada en sucesivas cribas (fases)
A. Fster Sabater
Se presentaron 34 primitivas criptogrficas Doble clasificacin: Cifradores orientados a su implementacin software Cifradores orientados a su implementacin hardware Algunos de ellos verificaban los requerimientos de ambas categoras
INFOSEC-EMACOT Abril 2009
A. Fster Sabater
October 14-15, 2004, A workshop is hosted by ECRYPT in Bruges : SASC - The State of the Art of Stream Ciphers. Discussion at this workshop leads to the ECRYPT Call for Primitives. November 2004, ECRYPT launches its Call for Primitives. April 29, 2005, The deadline of submission to ECRYPT. 34 primitives have been submitted to ECRYPT. June 13, 2005, This website is launched, to promote the public evaluation of the primitives. February 2006, The end of the first evaluation phase of eSTREAM. July 2006, The beginning of the second evaluation phase of eSTREAM. April 2007, The beginning of the third evaluation phase of eSTREAM. February 2008, Workshop SASC 2008 May 2008, The final report of the eSTREAM.
A. Fster Sabater
INFOSEC-EMACOT
Abril 2009
Rabbit (Phase 3 Profile 1) This is the archived eSTREAM Phase 3 page of Rabbit. For the latest information on Rabbit, please go to the eSTREAM portfolio page on Rabbit here Algorithm Name: Rabbit Submitters : Martin Boesgaard, Mette Vesterager, Thomas Christensen and Erik Zenner Type of Algorithm : Synchronous Stream Cipher Proposed Environment : Profile 1 (SW) and 2 (HW) Intellectual Property : Patented, but free for non-commercial use. statements Algorithm Description :
Article : The Stream Cipher Rabbit, pdf Submitted C code: zip API-compliant C code: link
A. Fster Sabater
Profile 2 (HW)
DECIM (DECIM v2 and DECIM128) Edon80
F-FCSR (F-FCSR-H v2 and F-FCSR16)
4 propuestas (perfil SW): HC, Rabbit, Salsa20, Sosemanuk. 4 propuestas (perfil HW): Mickey, FCSR, Grain, Trivium
Profile 1 (SW) Profile 2 (HW)
MICKEY (Mickey 2.0 and Mickey-128)
Profile 1 (SW) Profile 2 (HW) HC (HC-128 and HC-256) Grain (Grain-128) Rabbit MICKEY (MICKEY 2.0) Salsa20 Trivium SOSEMANUK
A. Fster Sabater INFOSEC-EMACOT Abril 2009
Trivium: generador de secuencia sncrono orientado al hardware. Autores: C. de Cannire and B. Preneel Conjuga : simplicidad, seguridad y velocidad Consta de:
CLAVE: K de 80 bits VEC. INIC. : IV de 80 bits Genera hasta 264 bits consecutivos
Dos Fases:
A. Fster Sabater
Estado interno de 288 bits (s1, s2, s3, .., s288) Maneja 15 bits en cada iteracin Todo gira en torno al nmero 3
(Trivium)
A. Fster Sabater INFOSEC-EMACOT Abril 2009
Fase de Generacin:
t1 s66 s93 t 2 s162 s177 t3 s243 s288
zi t1 t 2 t3
Bit calculado
t1 t1 s 91 s 92 s171
Actualizacin
( s1 , s2 ,K , s93 ) (t3 , s1 , s2 , K , s92 ) Rotacin ( s94 , s95 ,K , s177 ) (t1 , s94 , s95 , K , s176 ) ( s178 , s179 , K , s288 ) (t 2 , s178 , s179 , K , s287 )
INFOSEC-EMACOT Abril 2009
A. Fster Sabater
Fase de Inicializacin:
( s 94 , s 95 , K , s177 ) ( IV1 , K , IV 80 ,0 , K ,0 )
for i = 1 to 4 288 do
t1 s 66 s 91 s 92 s 93 s171
t 2 s162 s175 s176 s177 s264 t3 s243 s286 s287 s288 s69 ( s1 , s2 ,K , s93 ) (t3 , s1 , s2 , K , s92 ) ( s94 , s95 ,K , s177 ) (t1 , s94 , s95 , K , s176 ) ( s178 , s179 , K , s288 ) (t 2 , s178 , s179 , K , s287 )
A. Fster Sabater
INFOSEC-EMACOT
Abril 2009
LFSR: un registro de 10 etapas Contenido de cada etapa es un elemento de GF (232 ) st +i palabra de 32 bits
( X ) = X 10 + 1 X 7 + X + 1
s t +10 s t + 9 1 s t + 3 s t
INFOSEC-EMACOT Abril 2009
A. Fster Sabater
Algoritmo RC4
Inicializacin: 1. Si = i, i=0...255 2. Rellenar el array Ki i=0...255 repitiendo la semilla de clave secreta 3. f=0 4. Desde i = 0 hasta 255 hacer: f = (f + Si + Ki) mod 256 Intercambiar Si y Sf Generacin de secuencia cifrante: Inicializar i y f a 0, y calcular cada byte St de la secuencia cifrante mediante: 1. i = (i + 1) mod 256; f = (f + Si) mod 256; 2. Intercambiar Si y Sf 3. t = (Si + Sf) mod 256
A. Fster Sabater INFOSEC-EMACOT Abril 2009
Conclusiones
eSTREAM ha devuelto el inters por el cifrado en flujo tras varios aos de innactividad. Hay muchos y buenos cifradores en flujo para su posible criptoanlisis.
A. Fster Sabater
INFOSEC-EMACOT
Abril 2009