HDCP encryption/decryption code released

The HDCP cipher is designed to be efficient when implemented in hardware, but it is terribly inefficient in software, primarily because it makes extensive use of bit operations.

This implementation uses bit-slicing to achieve high speeds by exploiting bit-level parallelism. There are a few high-level routines to make it as easy as possible to implement HDCP.

The code includes the block cipher, stream cipher, and hashing algorithms necessary to perform an HDCP handshake and to encrypt or decrypt video.

The code passes the test vectors provided in the HDCP specification and can encrypt video at a rate of about 180 640×480 frames/second on a 2.33GHz Intel Xeon CPU. This isn’t quite fast enough to decrypt 1080p content in real-time on a single core, but decryption can be run in parallel across multiple cores.




Share this