Bletchley provides a variety of tools that make black box
cryptanalysis easier by taking care of some of the more tedious
engineering challenges. Bletchley is maintained by VSR.
Bletchley is currently in the early stages of development, which means
documentation may be lacking. Contributions are welcome.
*Contents*
bletchley-analyze currently performs two primary functions: iterative
encoding detection and ciphertext-only block analysis. Encrypted tokens
are processed in multiple rounds. Within each round, the following
occurs:
bletchley-analyze
can read from stdin or from a file. Tokens are
delimited with newlines. Various options are provided to give the
analyst control over the block sizes and encoding used during analysis.
See the tool's usage statement for more information.
As an example, several tokens were encrypted using ECB mode and encoded
using base64, and then percent (URL) encoded:
{{{
zRW5bHxcRYHHqi0nriqOzg%3D%3D
meU8SyxVHE3Hqi0nriqOzg%3D%3D
vTA9eA4hhbFlktsbYI4hIg%3D%3D
meU8SyxVHE1lktsbYI4hIg%3D%3D
}}}
These tokens were then fed to bletchley-analyze
:
-e ?
' to list them.
== bletchley-encode ==
A simple tool to encode arbitrary data using a specified encoding chain.
See the usage statement for more information. A quick example:
{{{
$ echo 'Mallory Is My Friend.' | bletchley-encode -e percent/upper-plus,base64/rfc3548
TWFsbG9yeSBJcyBNeSBGcmllbmQuCg%3D%3D
}}}
NOTE: The encoding chain is applied from right to left in order to be consistent with other tools.
That is, one can use the same encoding chain ordering for
bletchley-encode
, bletchley-decode
, and bletchley-analyze
.
== bletchley-decode ==
A simple tool to decode data using a specified encoding chain. See the
usage statement for more information. A quick example:
{{{
$ echo 'TWFsbG9yeSBJcyBNeSBGcmllbmQuCg%3D%3D' | bletchley-decode -e percent/upper-plus,base64/rfc3548
Mallory Is My Friend.
}}}
== bletchley-http2py ==
This script parses an HTTP request (provided via stdin or as a text
file) and generates a Python script that sends (approximately) the same
request. This is useful when one wants to repeatedly send variations of
a request that was observed to be sent by an application or web
browser. For more information, see the script's usage statement.
== bletchley-nextrand ==
A simple program which computes the state of a Java Random class
instance given two sequential outputs of
nextInt()
.
For more information, see the usage statement.
= Libraries =
TODO
(Hint: start with 'pydoc bletchley')