DRM decrypting tool for Samsung TVs PVR
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.
Bernhard Fröhlich f4a49456fb Implement internal buffer to allow reading and writing in bigger chunks 4 years ago
.travis.yml Create debugging build for Travis CI per default 5 years ago
AES.c Add new AES and AES-NI implementation from pycrypto. Implement small 5 years ago
AESNI.c Set memalign implementation based on architecture 5 years ago
LICENSE Initial commit 5 years ago
Makefile Enable Link Time Optimization only if the compiler is gcc because clang needs ld.gold which is not neccessary available. 4 years ago
README.md Switch to -Ofast per default 4 years ago
aes.h Add License header 5 years ago
buffer.c Implement internal buffer to allow reading and writing in bigger chunks and for future OpenMP support. 4 years ago
buffer.h Implement internal buffer to allow reading and writing in bigger chunks and for future OpenMP support. 4 years ago
drmdecrypt.c Fix adaptation field check and add more debugging output of MPEG header. 5 years ago
trace.h Add flags to increase and decrease verbosity level and set default 5 years ago

README.md

drmdecrypt

Synopsis

drmdecrypt is a tool to decrypt recorded files from Samsung TVs into standard transport stream format. There are multiple similar versions out there based on code from SamyGO and various people but they are all either slow, Windows specific, full of bugs or even all together.

This version is fast, POSIX compliant (Linux, FreeBSD, Windows (MinGW)) and is focused on a small number of useful features.

Features

  • Reading title and channel from .inf file
  • Bulk decoding multiple files
  • AES-NI support (5x faster)

Usage

Usage: drmdecrypt [-dqvx][-o outdir] infile.srf ...
Options:
   -d         Show debugging output
   -o outdir  Output directory
   -q         Be quiet. Only error output.
   -v         Version information
   -x         Disable AES-NI support

Building / Installing

make
make install

Support status

Samsung has changed the encryption of the PVR recordings a few times so here is a small overview of what the situation is right now. Situation might change over time.

Model year Status
C (2010) supported
D (2011) supported
E (2012) unknown
F (2013) unknown
H (2014) not supported (unknown key)

TODO

  • Internal I/O buffer for decrypting
  • default is BUFSIZ or better struct fstat blocksize
  • I/O write: write() + O_DIRECT + posix_memalign()
  • I/O read: fread(188) + setvbuf(32k+8, _IOFBF)
  • OpenMP for multiprocessing: #pragma omp parallel for schedule(static)