Didier Stevens

Tuesday 22 November 2016

Simple Ciphers: cipher-tool.py

Filed under: Encryption,My Software — Didier Stevens @ 0:00

When I left my last position, my friends and colleagues with whom I’ve worked for years gave me a little challenge: a PDF with a hidden ciphertext. At first I had to use Excel to decipher the ciphertext, but later I wrote a small Python tool to help me.

The simple ciphers supported by this tool are XOR, ROT, Vigenère and subtract (I added that last one because it was used in a maldoc). You can use the man page (option -m) to learn more.

cipher-tool_V0_0_1.zip (https)
MD5: B7D44090A76F66D7194D0A0D890E2CEB
SHA256: 1E8E1F112595FC08C3C20A06D172C21DDE6375EC8651A8DE6EF57B938F3E67E8


  1. Hi Didier, a few years ago I wrote a similar tool (bbtrans) as part of the balbuzard project. I made it modular so that it should be easy to add more transforms.
    bbtrans: https://bitbucket.org/decalage/balbuzard/wiki/bbtrans
    Available transforms: https://bitbucket.org/decalage/balbuzard/wiki/Transforms

    Comment by decalage0 — Tuesday 22 November 2016 @ 9:58

  2. Nice!

    Comment by Didier Stevens — Tuesday 22 November 2016 @ 10:01

  3. […] Didier Stevens has released a deciphering Python script that supports “XOR, ROT, Vigenère and subtract”. Simple Ciphers: cipher-tool.py […]

    Pingback by Week 47 – 2016 – This Week In 4n6 — Saturday 26 November 2016 @ 23:05

  4. […] Simple Ciphers: cipher-tool.py […]

    Pingback by Overview of Content Published In November | Didier Stevens — Tuesday 6 December 2016 @ 0:00

RSS feed for comments on this post. TrackBack URI

Leave a Reply (comments are moderated)

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Blog at WordPress.com.