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*
= Command Line Tools =
== bletchley-analyze ==
Analyzes samples of encrypted data in an attempt to decode samples to
binary and identify patterns useful in cryptanalysis. The purpose of
the tool is to provide an cryptanalyst with a variety of information
that is useful in determining how a token is encoded, encrypted and
formatted.
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:
- Token length analysis is performed to attempt to determine possible
ciphertext block sizes, where applicable
- The tokens are analyzed for blocks of data that are repeated
throughout any of the tokens
- A hexadecimal dump and escaped binary/ascii string is printed for
each token with repeated blocks highlighted
- The full set of all known and possible data encodings is
determined1
- An educated guess is made as to the most likely encoding is
- All tokens are decoded using the most likely encoding, and then the
process is repeated until no further encodings are detected
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) encoding:
{{{
zRW5bHxcRYHHqi0nriqOzg%3D%3D
meU8SyxVHE3Hqi0nriqOzg%3D%3D
vTA9eA4hhbFlktsbYI4hIg%3D%3D
meU8SyxVHE1lktsbYI4hIg%3D%3D
}}}
These tokens were then fed to bletchley-analyze:
1. Bletchley's blobtools module currently supports 33 encoding variants,
including various forms of hexadecimal, base32, base64, and percent
encodings.
== bletchley-encode ==
TODO
== bletchley-decode ==
TODO
== bletchley-http2py ==
TODO
== bletchley-nextrand ==
TODO
= Libraries =
TODO