From 97f4283d1c206e5922edf96f1d80486a141bd50a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20F=C3=A6revaag?= Date: Mon, 24 Jun 2013 15:46:08 +0200 Subject: [PATCH] Wrote doc and added ciphertext file as input --- project3/README.md | 31 +++++++++++++++++++++++-------- 1 file changed, 23 insertions(+), 8 deletions(-) diff --git a/project3/README.md b/project3/README.md index 6eb692e..194717b 100644 --- a/project3/README.md +++ b/project3/README.md @@ -1,17 +1,32 @@ Project 3 ========= -Seconds sine 22. June 2009 00:00:00: +A simple Python script for cracking a known ciphertext with known +encryption algorithm. - 1245646800 - -Seconds since 28. June 2009: - 1246251599 - -This gives an interval of `604799` seconds. +## Content + + * `Breaker.py` - The script used for breaking the ciphertext + * `ciphertext.txt` - The file containing the ciphertext + * `plaintext.txt` - The produced plaintext from the ciphertext + + +## Usage +To decipher the ciphertext, run the `Breaker.py` script with an input +file, containing the ciphertext: + + $ python Breaker.py ciphertext_sheet3.txt -[Source](http://www.unixtimestamp.com/index.php) +This will produce a file called plaintext.txt, if it is successful. + + +## Logic +The script essentially runs a smart brute-force attack. +As we know the time period the file was decrypted, we take all the +possible times and iterates over them. For each relevant time encrypt +each letter with the given algorithm, and see if the result contains +any of the words in our array of known plaintext words.