otrdecoder - decoder for .otrkey files
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2.0 KiB

otrdecoder - decoder for .otrkey files

otrdecoder is an opensource tool for decoding .otrkey files from https://www.onlinetvrecorder.com/. It tries to be compatible with the command line programs from them. Currently it's limited to decoding, the extended features are not implemented.

It's based on otrtool (https://github.com/otrtool/otrtool), but ported from C to Python. The decoding algorithm was reverse-engineered by eddy14, it's described in his blog (German, mirrored by PyroPeter):
http://pyropeter.eu/41yd.de/blog/2010/04/18/otrkey-breaker/ , Google Translate


It depends on Python3. Furthermore it needs a cryptographic module, either cryptography or PyCryptodome. Install one of them with
pip3 install cryptography or pip3 install pycryptodome.


usage: otrdecoder [-h] [-v] -i FILE -e EMAIL -p PASSWORD [-o OUTDIR] [-f] [-q]

optional arguments:
  -h, --help, -?  prints this screen
  -v              prints version
  -i FILE         use FILE as input file
  -e EMAIL        use EMAIL to fetch the key directly from otr
  -p PASSWORD     use PASSWORD to fetch the key directly from otr
  -o OUTDIR       use OUTDIR as output directory (default: .)
  -f              force overwriting of output file
  -q              don't verify input file before processing.


The performance is comparable to the compiled programs. Decoding is a little bit slower, as the .otrkey files are using little-endian blowfish encryption. The crytographic modules support only the standard big-endian blowfish, so the data has to be endian swapped before and after the encryption. otrtool can directly decrypt the little-endian blowfish, saving this swapping.

Furthermore otrtool verifies the data during the decoding, while this program uses extra verify passes. That's done to be compatible to the original program.