Skip to content

Commit

Permalink
Wrote doc and added ciphertext file as input
Browse files Browse the repository at this point in the history
  • Loading branch information
Markus Færevaag committed Jun 24, 2013
1 parent 24fa79e commit 97f4283
Showing 1 changed file with 23 additions and 8 deletions.
31 changes: 23 additions & 8 deletions project3/README.md
Original file line number Diff line number Diff line change
@@ -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.

0 comments on commit 97f4283

Please sign in to comment.