Contenido principal

One-time pad challenge

Julio 13, 2013

El día 7 de Marzo de 2013 publiqué en el grupo de Sinfocol en Facebook un mini reto relacionado con el cifrado One-time pad, cuyo funcionamiento constituye el esquema perfecto de cifrado si es usado correctamente:

Los tres ganadores fueron:
1. Everth Gallegos (PerverthsO)
2. Manuel Suárez (Blackubay)
3. Juan Escobar

La descripción del reto todavía se encuentra en el grupo:



El contenido del archivo dota2.txt es el siguiente:

ekFAEUFdTRFQU05RFV9VWEEeE3oTW1VcGFhSF3BHXVdYRR4UWEMXXVJTRl5eXhNC
UVwZRklQUldRU0UZWVEWX04XU1dTQkVTQUMfFXoVV1ZbV1tBF0VWVF4KF1pARhV4
Fl1aXUAURl9VQhZHUVRQQRJAVUFDQFhKW0ddEUBbQ1dGGVdaX1ZDQBNYVlZcEF1W
E1JdS1JXQhBCUVoWehBAUksRHhJAR1teEkBYRxNAUVUXU1VUVlBMElZeGERfUF4K
GVRcURFJVE0QRVlQThNQUkJUGF9YQVRbSRJCRVtbXVcRVRlOXEZcGFtXFkNHRU1a
GhR1Q0UUW1FYTxhRSxJGXlFRQhBXV1RHUl9bXlVLFURSRlcfFEFcUUBRE0BQQxda
XVwQWFEXQFxcVBJHXlBWXRFGRVtDUxFZXllMVVISW1QIExwTcRRYXVJeEEdfUFwQ
QFxcShNMXVpRFkldTBdCXxZVVhdEQVxcEElYRUsTVU1WQl0dElZaUBNZW0MQQFgS
X1VCGU9WQkVBVVVFVEMRVlQWXVdbVl9OVF0QUEwVRV1UEF5ZR1RRFlxRF19IEVRe
WkNGXVdUXRoUZl1VTBZWQFReTRZDWBBfWUNRFFtcU1cZV0RRVVtdUhRbUxRKUUxQ
VlAZR1lfQBoYWlxRUkVDXBhDUVZIEkBSQVMRRE1AVBVAXRRbXBlWV01QVEJWURFV
SxJBX1dcFlhLGXwRVkNTWF1UE15IGF5cQksYV1dXGVxdSkZYV0xUVBVVSxBdVl9b
UFBdXFpNAxhDUVZKElNWREZUWVdYTRNVWFMTUUFCVllDGUNfFlpREVteR0QTSl9R
XFxUVkRFF1BdEkNXQVpcXxJHX19HGhRNXlhXSkYTU0gYRFpWEl5YSlFQEFZeEVxY
WkRNVFtQVRFDXVNOEVpWV18TR1pVFl9XQ1JXFV9fGUJDTUVQAxFTVkEQQFlTVxB6
FVVaGVFWXF1QVRlSUFhRRBdGX1JMFn8XUlUVXVVbQ0ddWU0cEnpBTRlRVxJYV0EY
VFxeVFBFUVdGF1gWRlFNGFJDVlUUQFxWX0FHFw==

Las pistas proporcionadas durante el transcurso de cada día en la semana fueron:
:arrow: Base64.
:arrow: Esquema de cifrado perfecto, indestructible, inquebrantable, inmejorable, irrompible, etc... en ciertos casos, cuando es usado de forma correcta.
:arrow: La primera palabra del texto plano es: "How".
:arrow: La última pista es: Número E!
:arrow: Texto plano = b64.decode(dota2.txt) ^ Número E

La última verdadera pista contenía la forma de resolver el acertijo, acertijo que puede ser encontrado en forma de código fuente (Gracias a Juan Escobar por permitirme publicar su código):

# Reto Sinfocol
# https://www.facebook.com/groups/107415515957353/422375584461343/
# Juan M. Escobar T. @itsecurityco

import base64

ciphertext = base64.b64decode("ekFAEUFdTRFQU05RFV9VWEEeE3oTW1VcGFhSF3BHXVdYRR4UWEMXXVJTRl5eXhNCUVwZRklQUldRU0UZWVEWX04XU1dTQkVTQUMfFXoVV1ZbV1tBF0VWVF4KF1pARhV4Fl1aXUAURl9VQhZHUVRQQRJAVUFDQFhKW0ddEUBbQ1dGGVdaX1ZDQBNYVlZcEF1WE1JdS1JXQhBCUVoWehBAUksRHhJAR1teEkBYRxNAUVUXU1VUVlBMElZeGERfUF4KGVRcURFJVE0QRVlQThNQUkJUGF9YQVRbSRJCRVtbXVcRVRlOXEZcGFtXFkNHRU1aGhR1Q0UUW1FYTxhRSxJGXlFRQhBXV1RHUl9bXlVLFURSRlcfFEFcUUBRE0BQQxdaXVwQWFEXQFxcVBJHXlBWXRFGRVtDUxFZXllMVVISW1QIExwTcRRYXVJeEEdfUFwQQFxcShNMXVpRFkldTBdCXxZVVhdEQVxcEElYRUsTVU1WQl0dElZaUBNZW0MQQFgSX1VCGU9WQkVBVVVFVEMRVlQWXVdbVl9OVF0QUEwVRV1UEF5ZR1RRFlxRF19IEVReWkNGXVdUXRoUZl1VTBZWQFReTRZDWBBfWUNRFFtcU1cZV0RRVVtdUhRbUxRKUUxQVlAZR1lfQBoYWlxRUkVDXBhDUVZIEkBSQVMRRE1AVBVAXRRbXBlWV01QVEJWURFVSxJBX1dcFlhLGXwRVkNTWF1UE15IGF5cQksYV1dXGVxdSkZYV0xUVBVVSxBdVl9bUFBdXFpNAxhDUVZKElNWREZUWVdYTRNVWFMTUUFCVllDGUNfFlpREVteR0QTSl9RXFxUVkRFF1BdEkNXQVpcXxJHX19HGhRNXlhXSkYTU0gYRFpWEl5YSlFQEFZeEVxYWkRNVFtQVRFDXVNOEVpWV18TR1pVFl9XQ1JXFV9fGUJDTUVQAxFTVkEQQFlTVxB6FVVaGVFWXF1QVRlSUFhRRBdGX1JMFn8XUlUVXVVbQ0ddWU0cEnpBTRlRVxJYV0EYVFxeVFBFUVdGF1gWRlFNGFJDVlUUQFxWX0FHFw==");

key = "2.7182818284590452353602874713526624977572470936999595749669676277240766303535475945713821785251664274274663919320030599218174135966290435729003342952605956307381323286279434907632338298807531952510190115738341879307021540891499348841675092447614606680822648001684774118537423454424371075390777449920695517027618386062613313845830007520449338265602976067371132007093287091274437470472306969772093101416928368190255151086574637721112523897844250569536967707854499699679468644549059879316368892300987931277361782154249992295763514822082698951936680331825288693984964651058209392398294887933203625094431173012381970684161403970198376793206832823764648042953118023287825098194558153017567173613320698112509961818815930416903515988885193458072738667385894228792284998920868058257492796104841984443634632449684875602336248270419786232090021609902353043699418491463140934317381436405462531520961836908887070167683964243781405927145635490613031072085103837505101157477041718986106873969655212671546889570350354";
# http://www.greatplay.net/uselessia/articles/e2-1000.html

plaintext = ''
for i in range(0,len(ciphertext)):
    plaintext += unichr(ord(ciphertext[i]) ^ ord(key[i]))

print plaintext

El texto plano es el siguiente:

How you have felt, O men of Athens, at hearing the speeches of my accusers, I cannot tell; but I know that their persuasive words almost made me forget who I was - such was the effect of them; and yet they have hardly spoken a word of truth. But many as their falsehoods were, there was one of them which quite amazed me; - I mean when they told you to be upon your guard, and not to let yourselves be deceived by the force of my eloquence. They ought to have been ashamed of saying this, because they were sure to be detected as soon as I opened my lips and displayed my deficiency; they certainly did appear to be most shameless in saying this, unless by the force of eloquence they mean the force of truth; for then I do indeed admit that I am eloquent. But in how different a way from theirs!

Felicitaciones a los ganadores!

Archivado en: Criptografía, Retos informáticos |

2 comentarios

  1. Juan Escobar Julio 13, 2013 @ 10:24 pm

    Gracias a ti Daniel!

  2. PerverthsO Octubre 17, 2013 @ 10:56 pm

    te daria gracias hds pero pero por tu culpa ahora soy vicioso de dota 2 ¬¬

Deja un comentario