Cryptography: The mathematics of secret codes is a game

38

Transcript of Cryptography: The mathematics of secret codes is a game

Page 1: Cryptography: The mathematics of secret codes is a game
Page 2: Cryptography: The mathematics of secret codes is a game
Page 3: Cryptography: The mathematics of secret codes is a game

Transcribir en guarismos, letras o símbolos, de acuerdo con una clave, un mensaje cuyo contenido se quiere ocultar.

Page 4: Cryptography: The mathematics of secret codes is a game

Procedimiento que utilizando un algoritmo con cierta clave transforma un mensaje, sin atender a su estructura lingüística o significado, de tal forma que sea incomprensible o, al menos, difícil de comprender, a toda persona que no tenga la clave secreta del algoritmo que se usa para poder descifrarlo.

Page 5: Cryptography: The mathematics of secret codes is a game

ASCII 65 66 67

Hexadecimal 41 42 43

Binario 01000001 01000010 01000011

Base 64 QUJD

Morse ·– –··· –·–·

Algunas formas de representar “ABC”:

Page 6: Cryptography: The mathematics of secret codes is a game
Page 7: Cryptography: The mathematics of secret codes is a game

ABCDEFGHIJKLMNOPQRSTUVWXYZBCDEFGHIJKLMNOPQRSTUVWXYZACDEFGHIJKLMNOPQRSTUVWXYZABDEFGHIJKLMNOPQRSTUVWXYZABC

ESTO ES UN EJEMPLO DE CIFRADO CESARHVWR HV XQ HMHPSOR GH FLIUDGR FHVDU

Page 8: Cryptography: The mathematics of secret codes is a game

Software libre y gratuito diseñado para el aprendizaje de conceptos sobre criptografía y criptoanálisis.

Interfaz disponible en varios idiomas (también en español).

Page 9: Cryptography: The mathematics of secret codes is a game

DEMO: Análisis automático de un cifrado César

ho pdsd txh wh oohydud d uhvroyhu ho sxcohvh hqfxhqwud hq od fdushwd uhfxuvrv gh odxqlgdg sulqflsdo

Page 10: Cryptography: The mathematics of secret codes is a game

En vez de desplazar todo el alfabeto en bloque, los caracteres se reordenan libremente y de forma individual.

Combinaciones posibles (A-Z): 26!403.291.461.126.605.635.584.000.000

Page 11: Cryptography: The mathematics of secret codes is a game

Fuerza bruta

Análisis de frecuencias

Patrones reconocibles

ABBAXDEZA

EFFECTIVE

Page 12: Cryptography: The mathematics of secret codes is a game

Radicalmente diferente de la versión 1.

Para bien y para mal…

Sigue en beta desde hace unos cuantos años.

Page 13: Cryptography: The mathematics of secret codes is a game

DEMO: Análisis de un cifrado de sustitución basado en patrones

Page 14: Cryptography: The mathematics of secret codes is a game

Igual que el cifrado César, pero usando como alfabeto los 256 valores posibles de un byte.

Extiende el cifrado clásico de textos, siendo aplicable a datos de cualquier tipo.

Page 15: Cryptography: The mathematics of secret codes is a game

DEMO: Suma de bytes

ACC5C7CFC9D6D784D4C9D2C9D8D6C5D8C984C5D2C884D6C5DAC5CBC984C8C9D0CDC7C5D8C984D4D9C6D0CDC784C5D2C884D4D6CDDAC5D8C9D0DD84D3DBD2C9C884C7D3D1D4D9D8C9D684D7DDD7D8C9D1D79084CDD2CAC9C7D8CDD2CB84D8CCC9D184DBCDD8CC84DACDD6D9D7C9D79084C5D2C884D7D8C9C5D0CDD2CB84D1C5D8C9D6CDC5D0D784CAD3D684D8CCC9CDD684D3DBD284C9D2C8D79284B8CCC9D7C984D4C9D3D4D0C99084D8CCC9DD84C5D6C984D8C9D6D6D3D6CDD7D8D792

Page 16: Cryptography: The mathematics of secret codes is a game

A B A xor B

0 0 0

0 1 1

1 0 1

1 1 0

A xor A = 0M xor C = XX xor C = M

Page 17: Cryptography: The mathematics of secret codes is a game

DEMO: Análisis automático de un cifrado XOR

00 27 00 1F FF EF B5 B9 B6 B9 FF FE FE FE FF 9F FF 9F FF FF 00 24 FF BC FF FD FE FE FD FE FE FD FD FD FD FDFD FD FD FC FA FC FC FC FC FC F9 FB FB FC FA F8 F9 F8 F8 F8 F9 F8 F8 F7 F6 F4 F6 F7 F7 F5 F7 F8 F8 F5 F2 F5 F5 F4 F3 F3 F3 F3 F8 F6 F1 F0 F2 F3 F1 F4 F3 F3 F3 00 24 FF BC ...

Page 18: Cryptography: The mathematics of secret codes is a game
Page 19: Cryptography: The mathematics of secret codes is a game

EJEMPLOCIFRADOVIGENERECLAVECLAVECLAVECLAVECLGUEHTNZCDJTLDJZKREIITP

Page 20: Cryptography: The mathematics of secret codes is a game

DEMO: Análisis automático de un cifrado Vigenère

Huk pawf, qv tq ohjgpdmmg sd xaiax rwd bmzga. Dsjs wntm hwjuwma rokw vwwee rwkusmgmflwwd nisiawflz fuqzwjg, yex emw qs yiedgfwk gaocfljsnezws vw vzsowxjsvj. hmqzwlwoebshmfljpgblgtsmrmpsjjsrwidmflgnvqwflamioesuhmfooocetsjmapskusjbaepsjjsmefckwakbuucftsbjggwgftseorokwljzsbiflgrdp Niwfskpedhw

Page 21: Cryptography: The mathematics of secret codes is a game

DEMO: Análisis automático de un cifrado Vigenère

NFPTF WAWMG SSCQY AMG CDCI, WIT TWFAIEVLAUHG GYGMICMWHI GFPZMUHCK KPLGL ZWHTRRVPA RRE, LPCT GPH JBDRTWZ ZMFWJ GPVIWMK. OAXIKJQIF PVA CXEFI KUEMVP PXWHO, ESCV JTZSGJW MQSCTGCKC SNW DYKWXTZV AZMFVZOJX, BPUMY BYJ GB MXVCD, KPZBL JSWXPZUPA PNELQ SBOX …

Page 22: Cryptography: The mathematics of secret codes is a game

Se aplica la operación XOR byte a byte.

E J E M P L O X O R45 4A 45 4D 50 4C 4F 20 58 4F 5210 11 12 10 11 12 10 11 12 10 1155 5B 57 5D 41 5E 5F 31 4A 5F 43U [ W ] A ^ _ 1 J _ C

Page 23: Cryptography: The mathematics of secret codes is a game

DEMO: Análisis semiautomático de un cifrado XOR

Ag1SUDgRChUMKENSFwYECAas5kEXAQUVGxUBIw4GF1UVB1QDJkECBxACHRVPIwQeUlcgHBZPCwBSNQcFEBVNZwQeUhGzxBVPIwRSHhRQSzgaKQBSFhBQKBMANBUdUFURSRgOZwkdABRQDREDZ0MmFxkVDR0ONQgdUFt9Y3llFAAeBxEfGlQiJg0bFRsfGlVP

Page 24: Cryptography: The mathematics of secret codes is a game

DEMO: Análisis semiautomático de un cifrado XOR

D5 CB 44 A4 E4 12 E2 D1 46 A2 E2 1A F9 CA 59 E2 B6 24 FE CD 46 A6 B6 07 FE C1 0A B2 E3 1A F5 CF 0A A1 E4 1C E1 CA 0A A5 F9 0B B6 CE 5F AE E6 00 B6 CB 5C A6 E4 53 E2 CC 4F E3 FA 12 EC DD 0A A7 F9 14 BA 84 5E AB F3 53 E6 C8 4B AA F8 53 EE CB 58 E3 F5 1A E6 CC 4F B1 B6 1A E5 84 59 B7 FF 1F FA 84 5C A6 E4 0A B6 D1 44 B0 F3 10 E3 D6 4F E3 E1 ...

Page 25: Cryptography: The mathematics of secret codes is a game

DEMO: Convertir una prueba de reversing en una de crypto ;-)

Page 26: Cryptography: The mathematics of secret codes is a game

DEMO: Convertir una prueba de reversing en una de crypto ;-)

Page 27: Cryptography: The mathematics of secret codes is a game

DEMO: Convertir una prueba de reversing en una de crypto ;-)

Page 28: Cryptography: The mathematics of secret codes is a game

Determinar la longitud de la clave y tratar como N cifrados monoalfabéticos.

Autocorrelación

Kasiski

Fragmentos conocidos

Cabeceras de ficheros

Texto conocido o deducible

Page 29: Cryptography: The mathematics of secret codes is a game
Page 30: Cryptography: The mathematics of secret codes is a game

Aplicar operaciones matemáticas

Invertir ciertos valores

Usar la posición de cada carácter

Codificaciones inventadas o poco habituales

Page 31: Cryptography: The mathematics of secret codes is a game

DEMO: Análisis de datos usando Excel

187205203213136221210208140224214208226220146213221233219234152240227239228157230232243161246232233249238179168252237236254249243259176243251255256260269266184268270252270273190275271193277275278266263267214201240268282272295207279285289297281296214299288296303290292221309292289307309227305294297303301298318307248237321318240325314312326314246320331249328330336253319255340339323326329261341333264347335335282000

Page 32: Cryptography: The mathematics of secret codes is a game

DEMO: Análisis de datos usando Excel

691512902791512402231612402102231512612791991702691231191761231212412112302412791902902502012302391231012641231971012231902791012122231761231502902212802102902102012612791612502112012512231502612231502512231212112512512502891802102231612112231991112412412712212612231612402102231102022102991712612502112012231512612791991702231891122231912412502612502012302231212791512612231612402102231102012002231112202231791012231791412412791122231002102991802791412102002231791712612112231502012231791231412112712612502012102641

Page 33: Cryptography: The mathematics of secret codes is a game

DEMO: Detección de anomalías

821612462154066171121343693212877145854044145825776273563675027483781600694360207463323165611615776445435734657520167387666376217688120101553338692055816314576440235420827420742257654564373547442800645430388762254887327148248177227837876428823711588862721266232287692040262345223466817404777548370018271713443683692875336314105456753821772165804644312052153023666373633863078155557746694855847503343664365031822822543438538524452051446747015828884274032634321275107718204550282437844463436682645363536510726270856034584760660805692225640678716366248026327370662125588565148812700140328543277377810624732041264433506844001847705258465203741517836401845283040144478046660427720747546585184881274707320177752622212750302237793116060284146753183387705588420631156605223818320266512450060315708801784281163434574686325138797744662740182235227621860182282805400442771633698464552380457605311455778701242310232608614528666042624205344272773575690776173537457700420553822572756671473720656240464126582422847180836243464527777787276583616368468585133678857808527081

Page 34: Cryptography: The mathematics of secret codes is a game

DEMO: Análisis de datos

7052737355742517656357915675147746810726708207377245658334761833286055472817288181778401672515803408266077257185626735001167407310761164865834843388321848824735020758113285276804435332406767980470802034818264008036707213268728755673261417820574758050326570431600244371632607124442321664723085246965782874808385875317877546252058340520208452148188403611674043232463735006754081667882263203217083605857380216715376267350467853534605437780501126907325516888152131178410515443683523164546952108318722465186716953427087658160610137855647073231714084543211718856864153054108707337772750456158317370542248335287123827631406420601418160557641306748025435842213260457057885282441776650453381551508320526958234665253874311433241413874151583677868254801026807722333206971727731334022760178153461757 ...

Page 35: Cryptography: The mathematics of secret codes is a game

DEMO: Más análisis de datos

010D1423353E525A0D213847616678870F1D22313F445E6312212F38464B5A6805182139425558670D1D2F384B505463061A22272D3C48540F262F3D444A596B04090C1E37475B640F1D252A424B515A05091C313E545561151A2D3C424352600519213342575E661A2E454A586C859809212234394C61631426272A3E43474D12212E404950586C14232F343A4E57651217272C40495D660F1D3240545D696A0C182B404D606869161B1D22273538470D1D292E42474B500E1221273B4D4E5C1320293C4F586775

Page 36: Cryptography: The mathematics of secret codes is a game
Page 37: Cryptography: The mathematics of secret codes is a game

Bit flipping Chosen-plaintext Timing Fault injection Teorema chino del resto Exponenciación Padding oracle Predicción de IV

Page 38: Cryptography: The mathematics of secret codes is a game

Generadores de números aleatorios Curvas elípticas Cifrado asimétrico Hashes Esteganografía Side channel Password cracking Cifrados ECB …