forked from mfaerevaag/cryptanalysis
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Wrote doc and added ciphertext file as input
- 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.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |