PREVIOUS  TABLE OF CONTENTS  NEXT 

DeCSS In English

This file was generated by DECSS: Descriptive English for C Statements
and Subroutines.  The C source file for it was called
Private/css-auth/css-descramble.c.

Here, the author says "css_descramble.c  Released under the version 2
of the GPL.  Copyright 1999 Derek Fawcus This file contains functions
to descramble CSS encrypted DVD content".

Here, the author says "Still in progress:  Remove the use of the
bit_reverse[] table by recoding the generation of LFSR1.  Finish combining
this with the css authentication code."

This program makes use of the system file stdio.h.
This program makes use of the system file string.h.
This program makes use of the user file css-descramble.h.
Note a type definition of unsigned character called 'byte'.

Here, the author says "some tables used for descrambling sectors
and/or decrypting title keys".


Specifying the type (this declaration is not to be shared) byte,
allocate the variable 'csstab1', defined to be an array with the size
256 and initialized to the set the hexadecimal number 0x33, the
hexadecimal number 0x73, the hexadecimal number 0x3b, the hexadecimal
number 0x26, the hexadecimal number 0x63, the hexadecimal number 0x23,
the hexadecimal number 0x6b, the hexadecimal number 0x76, the
hexadecimal number 0x3e, the hexadecimal number 0x7e, the hexadecimal
number 0x36, the hexadecimal number 0x2b, the hexadecimal number 0x6e,
the hexadecimal number 0x2e, the hexadecimal number 0x66, the
hexadecimal number 0x7b, the hexadecimal number 0xd3, the hexadecimal
number 0x93, the hexadecimal number 0xdb, the hexadecimal number 0x06,
the hexadecimal number 0x43, the hexadecimal number 0x03, the
hexadecimal number 0x4b, the hexadecimal number 0x96, the hexadecimal
number 0xde, the hexadecimal number 0x9e, the hexadecimal number 0xd6,
the hexadecimal number 0x0b, the hexadecimal number 0x4e, the
hexadecimal number 0x0e, the hexadecimal number 0x46, the hexadecimal
number 0x9b, the hexadecimal number 0x57, the hexadecimal number 0x17,
the hexadecimal number 0x5f, the hexadecimal number 0x82, the
hexadecimal number 0xc7, the hexadecimal number 0x87, the hexadecimal
number 0xcf, the hexadecimal number 0x12, the hexadecimal number 0x5a,
the hexadecimal number 0x1a, the hexadecimal number 0x52, the
hexadecimal number 0x8f, the hexadecimal number 0xca, the hexadecimal
number 0x8a, the hexadecimal number 0xc2, the hexadecimal number 0x1f,
the hexadecimal number 0xd9, the hexadecimal number 0x99, the
hexadecimal number 0xd1, the hexadecimal number 0x00, the hexadecimal
number 0x49, the hexadecimal number 0x09, the hexadecimal number 0x41,
the hexadecimal number 0x90, the hexadecimal number 0xd8, the
hexadecimal number 0x98, the hexadecimal number 0xd0, the hexadecimal
number 0x01, the hexadecimal number 0x48, the hexadecimal number 0x08,
the hexadecimal number 0x40, the hexadecimal number 0x91, the
hexadecimal number 0x3d, the hexadecimal number 0x7d, the hexadecimal
number 0x35, the hexadecimal number 0x24, the hexadecimal number 0x6d,
the hexadecimal number 0x2d, the hexadecimal number 0x65, the
hexadecimal number 0x74, the hexadecimal number 0x3c, the hexadecimal
number 0x7c, the hexadecimal number 0x34, the hexadecimal number 0x25,
the hexadecimal number 0x6c, the hexadecimal number 0x2c, the
hexadecimal number 0x64, the hexadecimal number 0x75, the hexadecimal
number 0xdd, the hexadecimal number 0x9d, the hexadecimal number 0xd5,
the hexadecimal number 0x04, the hexadecimal number 0x4d, the
hexadecimal number 0x0d, the hexadecimal number 0x45, the hexadecimal
number 0x94, the hexadecimal number 0xdc, the hexadecimal number 0x9c,
the hexadecimal number 0xd4, the hexadecimal number 0x05, the
hexadecimal number 0x4c, the hexadecimal number 0x0c, the hexadecimal
number 0x44, the hexadecimal number 0x95, the hexadecimal number 0x59,
the hexadecimal number 0x19, the hexadecimal number 0x51, the
hexadecimal number 0x80, the hexadecimal number 0xc9, the hexadecimal
number 0x89, the hexadecimal number 0xc1, the hexadecimal number 0x10,
the hexadecimal number 0x58, the hexadecimal number 0x18, the
hexadecimal number 0x50, the hexadecimal number 0x81, the hexadecimal
number 0xc8, the hexadecimal number 0x88, the hexadecimal number 0xc0,
the hexadecimal number 0x11, the hexadecimal number 0xd7, the
hexadecimal number 0x97, the hexadecimal number 0xdf, the hexadecimal
number 0x02, the hexadecimal number 0x47, the hexadecimal number 0x07,
the hexadecimal number 0x4f, the hexadecimal number 0x92, the
hexadecimal number 0xda, the hexadecimal number 0x9a, the hexadecimal
number 0xd2, the hexadecimal number 0x0f, the hexadecimal number 0x4a,
the hexadecimal number 0x0a, the hexadecimal number 0x42, the
hexadecimal number 0x9f, the hexadecimal number 0x53, the hexadecimal
number 0x13, the hexadecimal number 0x5b, the hexadecimal number 0x86,
the hexadecimal number 0xc3, the hexadecimal number 0x83, the
hexadecimal number 0xcb, the hexadecimal number 0x16, the hexadecimal
number 0x5e, the hexadecimal number 0x1e, the hexadecimal number 0x56,
the hexadecimal number 0x8b, the hexadecimal number 0xce, the
hexadecimal number 0x8e, the hexadecimal number 0xc6, the hexadecimal
number 0x1b, the hexadecimal number 0xb3, the hexadecimal number 0xf3,
the hexadecimal number 0xbb, the hexadecimal number 0xa6, the
hexadecimal number 0xe3, the hexadecimal number 0xa3, the hexadecimal
number 0xeb, the hexadecimal number 0xf6, the hexadecimal number 0xbe,
the hexadecimal number 0xfe, the hexadecimal number 0xb6, the
hexadecimal number 0xab, the hexadecimal number 0xee, the hexadecimal
number 0xae, the hexadecimal number 0xe6, the hexadecimal number 0xfb,
the hexadecimal number 0x37, the hexadecimal number 0x77, the
hexadecimal number 0x3f, the hexadecimal number 0x22, the hexadecimal
number 0x67, the hexadecimal number 0x27, the hexadecimal number 0x6f,
the hexadecimal number 0x72, the hexadecimal number 0x3a, the
hexadecimal number 0x7a, the hexadecimal number 0x32, the hexadecimal
number 0x2f, the hexadecimal number 0x6a, the hexadecimal number 0x2a,
the hexadecimal number 0x62, the hexadecimal number 0x7f, the
hexadecimal number 0xb9, the hexadecimal number 0xf9, the hexadecimal
number 0xb1, the hexadecimal number 0xa0, the hexadecimal number 0xe9,
the hexadecimal number 0xa9, the hexadecimal number 0xe1, the
hexadecimal number 0xf0, the hexadecimal number 0xb8, the hexadecimal
number 0xf8, the hexadecimal number 0xb0, the hexadecimal number 0xa1,
the hexadecimal number 0xe8, the hexadecimal number 0xa8, the
hexadecimal number 0xe0, the hexadecimal number 0xf1, the hexadecimal
number 0x5d, the hexadecimal number 0x1d, the hexadecimal number 0x55,
the hexadecimal number 0x84, the hexadecimal number 0xcd, the
hexadecimal number 0x8d, the hexadecimal number 0xc5, the hexadecimal
number 0x14, the hexadecimal number 0x5c, the hexadecimal number 0x1c,
the hexadecimal number 0x54, the hexadecimal number 0x85, the
hexadecimal number 0xcc, the hexadecimal number 0x8c, the hexadecimal
number 0xc4, the hexadecimal number 0x15, the hexadecimal number 0xbd,
the hexadecimal number 0xfd, the hexadecimal number 0xb5, the
hexadecimal number 0xa4, the hexadecimal number 0xed, the hexadecimal
number 0xad, the hexadecimal number 0xe5, the hexadecimal number 0xf4,
the hexadecimal number 0xbc, the hexadecimal number 0xfc, the
hexadecimal number 0xb4, the hexadecimal number 0xa5, the hexadecimal
number 0xec, the hexadecimal number 0xac, the hexadecimal number 0xe4,
the hexadecimal number 0xf5, the hexadecimal number 0x39, the
hexadecimal number 0x79, the hexadecimal number 0x31, the hexadecimal
number 0x20, the hexadecimal number 0x69, the hexadecimal number 0x29,
the hexadecimal number 0x61, the hexadecimal number 0x70, the
hexadecimal number 0x38, the hexadecimal number 0x78, the hexadecimal
number 0x30, the hexadecimal number 0x21, the hexadecimal number 0x68,
the hexadecimal number 0x28, the hexadecimal number 0x60, the
hexadecimal number 0x71, the hexadecimal number 0xb7, the hexadecimal
number 0xf7, the hexadecimal number 0xbf, the hexadecimal number 0xa2,
the hexadecimal number 0xe7, the hexadecimal number 0xa7, the
hexadecimal number 0xef, the hexadecimal number 0xf2, the hexadecimal
number 0xba, the hexadecimal number 0xfa, the hexadecimal number 0xb2,
the hexadecimal number 0xaf, the hexadecimal number 0xea, the
hexadecimal number 0xaa, the hexadecimal number 0xe2, and the
hexadecimal number 0xff.

Specifying the type (this declaration is not to be shared) byte,
allocate the variable 'lfsr1_bits0', defined to be an array with the
size 256 and initialized to the set the hexadecimal number 0x00, the
hexadecimal number 0x01, the hexadecimal number 0x02, the hexadecimal
number 0x03, the hexadecimal number 0x04, the hexadecimal number 0x05,
the hexadecimal number 0x06, the hexadecimal number 0x07, the
hexadecimal number 0x09, the hexadecimal number 0x08, the hexadecimal
number 0x0b, the hexadecimal number 0x0a, the hexadecimal number 0x0d,
the hexadecimal number 0x0c, the hexadecimal number 0x0f, the
hexadecimal number 0x0e, the hexadecimal number 0x12, the hexadecimal
number 0x13, the hexadecimal number 0x10, the hexadecimal number 0x11,
the hexadecimal number 0x16, the hexadecimal number 0x17, the
hexadecimal number 0x14, the hexadecimal number 0x15, the hexadecimal
number 0x1b, the hexadecimal number 0x1a, the hexadecimal number 0x19,
the hexadecimal number 0x18, the hexadecimal number 0x1f, the
hexadecimal number 0x1e, the hexadecimal number 0x1d, the hexadecimal
number 0x1c, the hexadecimal number 0x24, the hexadecimal number 0x25,
the hexadecimal number 0x26, the hexadecimal number 0x27, the
hexadecimal number 0x20, the hexadecimal number 0x21, the hexadecimal
number 0x22, the hexadecimal number 0x23, the hexadecimal number 0x2d,
the hexadecimal number 0x2c, the hexadecimal number 0x2f, the
hexadecimal number 0x2e, the hexadecimal number 0x29, the hexadecimal
number 0x28, the hexadecimal number 0x2b, the hexadecimal number 0x2a,
the hexadecimal number 0x36, the hexadecimal number 0x37, the
hexadecimal number 0x34, the hexadecimal number 0x35, the hexadecimal
number 0x32, the hexadecimal number 0x33, the hexadecimal number 0x30,
the hexadecimal number 0x31, the hexadecimal number 0x3f, the
hexadecimal number 0x3e, the hexadecimal number 0x3d, the hexadecimal
number 0x3c, the hexadecimal number 0x3b, the hexadecimal number 0x3a,
the hexadecimal number 0x39, the hexadecimal number 0x38, the
hexadecimal number 0x49, the hexadecimal number 0x48, the hexadecimal
number 0x4b, the hexadecimal number 0x4a, the hexadecimal number 0x4d,
the hexadecimal number 0x4c, the hexadecimal number 0x4f, the
hexadecimal number 0x4e, the hexadecimal number 0x40, the hexadecimal
number 0x41, the hexadecimal number 0x42, the hexadecimal number 0x43,
the hexadecimal number 0x44, the hexadecimal number 0x45, the
hexadecimal number 0x46, the hexadecimal number 0x47, the hexadecimal
number 0x5b, the hexadecimal number 0x5a, the hexadecimal number 0x59,
the hexadecimal number 0x58, the hexadecimal number 0x5f, the
hexadecimal number 0x5e, the hexadecimal number 0x5d, the hexadecimal
number 0x5c, the hexadecimal number 0x52, the hexadecimal number 0x53,
the hexadecimal number 0x50, the hexadecimal number 0x51, the
hexadecimal number 0x56, the hexadecimal number 0x57, the hexadecimal
number 0x54, the hexadecimal number 0x55, the hexadecimal number 0x6d,
the hexadecimal number 0x6c, the hexadecimal number 0x6f, the
hexadecimal number 0x6e, the hexadecimal number 0x69, the hexadecimal
number 0x68, the hexadecimal number 0x6b, the hexadecimal number 0x6a,
the hexadecimal number 0x64, the hexadecimal number 0x65, the
hexadecimal number 0x66, the hexadecimal number 0x67, the hexadecimal
number 0x60, the hexadecimal number 0x61, the hexadecimal number 0x62,
the hexadecimal number 0x63, the hexadecimal number 0x7f, the
hexadecimal number 0x7e, the hexadecimal number 0x7d, the hexadecimal
number 0x7c, the hexadecimal number 0x7b, the hexadecimal number 0x7a,
the hexadecimal number 0x79, the hexadecimal number 0x78, the
hexadecimal number 0x76, the hexadecimal number 0x77, the hexadecimal
number 0x74, the hexadecimal number 0x75, the hexadecimal number 0x72,
the hexadecimal number 0x73, the hexadecimal number 0x70, the
hexadecimal number 0x71, the hexadecimal number 0x92, the hexadecimal
number 0x93, the hexadecimal number 0x90, the hexadecimal number 0x91,
the hexadecimal number 0x96, the hexadecimal number 0x97, the
hexadecimal number 0x94, the hexadecimal number 0x95, the hexadecimal
number 0x9b, the hexadecimal number 0x9a, the hexadecimal number 0x99,
the hexadecimal number 0x98, the hexadecimal number 0x9f, the
hexadecimal number 0x9e, the hexadecimal number 0x9d, the hexadecimal
number 0x9c, the hexadecimal number 0x80, the hexadecimal number 0x81,
the hexadecimal number 0x82, the hexadecimal number 0x83, the
hexadecimal number 0x84, the hexadecimal number 0x85, the hexadecimal
number 0x86, the hexadecimal number 0x87, the hexadecimal number 0x89,
the hexadecimal number 0x88, the hexadecimal number 0x8b, the
hexadecimal number 0x8a, the hexadecimal number 0x8d, the hexadecimal
number 0x8c, the hexadecimal number 0x8f, the hexadecimal number 0x8e,
the hexadecimal number 0xb6, the hexadecimal number 0xb7, the
hexadecimal number 0xb4, the hexadecimal number 0xb5, the hexadecimal
number 0xb2, the hexadecimal number 0xb3, the hexadecimal number 0xb0,
the hexadecimal number 0xb1, the hexadecimal number 0xbf, the
hexadecimal number 0xbe, the hexadecimal number 0xbd, the hexadecimal
number 0xbc, the hexadecimal number 0xbb, the hexadecimal number 0xba,
the hexadecimal number 0xb9, the hexadecimal number 0xb8, the
hexadecimal number 0xa4, the hexadecimal number 0xa5, the hexadecimal
number 0xa6, the hexadecimal number 0xa7, the hexadecimal number 0xa0,
the hexadecimal number 0xa1, the hexadecimal number 0xa2, the
hexadecimal number 0xa3, the hexadecimal number 0xad, the hexadecimal
number 0xac, the hexadecimal number 0xaf, the hexadecimal number 0xae,
the hexadecimal number 0xa9, the hexadecimal number 0xa8, the
hexadecimal number 0xab, the hexadecimal number 0xaa, the hexadecimal
number 0xdb, the hexadecimal number 0xda, the hexadecimal number 0xd9,
the hexadecimal number 0xd8, the hexadecimal number 0xdf, the
hexadecimal number 0xde, the hexadecimal number 0xdd, the hexadecimal
number 0xdc, the hexadecimal number 0xd2, the hexadecimal number 0xd3,
the hexadecimal number 0xd0, the hexadecimal number 0xd1, the
hexadecimal number 0xd6, the hexadecimal number 0xd7, the hexadecimal
number 0xd4, the hexadecimal number 0xd5, the hexadecimal number 0xc9,
the hexadecimal number 0xc8, the hexadecimal number 0xcb, the
hexadecimal number 0xca, the hexadecimal number 0xcd, the hexadecimal
number 0xcc, the hexadecimal number 0xcf, the hexadecimal number 0xce,
the hexadecimal number 0xc0, the hexadecimal number 0xc1, the
hexadecimal number 0xc2, the hexadecimal number 0xc3, the hexadecimal
number 0xc4, the hexadecimal number 0xc5, the hexadecimal number 0xc6,
the hexadecimal number 0xc7, the hexadecimal number 0xff, the
hexadecimal number 0xfe, the hexadecimal number 0xfd, the hexadecimal
number 0xfc, the hexadecimal number 0xfb, the hexadecimal number 0xfa,
the hexadecimal number 0xf9, the hexadecimal number 0xf8, the
hexadecimal number 0xf6, the hexadecimal number 0xf7, the hexadecimal
number 0xf4, the hexadecimal number 0xf5, the hexadecimal number 0xf2,
the hexadecimal number 0xf3, the hexadecimal number 0xf0, the
hexadecimal number 0xf1, the hexadecimal number 0xed, the hexadecimal
number 0xec, the hexadecimal number 0xef, the hexadecimal number 0xee,
the hexadecimal number 0xe9, the hexadecimal number 0xe8, the
hexadecimal number 0xeb, the hexadecimal number 0xea, the hexadecimal
number 0xe4, the hexadecimal number 0xe5, the hexadecimal number 0xe6,
the hexadecimal number 0xe7, the hexadecimal number 0xe0, the
hexadecimal number 0xe1, the hexadecimal number 0xe2, and the
hexadecimal number 0xe3.

Specifying the type (this declaration is not to be shared) byte,
allocate the variable 'lfsr1_bits1', defined to be an array with the
size 512 and initialized to the set the hexadecimal number 0x00, the
hexadecimal number 0x24, the hexadecimal number 0x49, the hexadecimal
number 0x6d, the hexadecimal number 0x92, the hexadecimal number 0xb6,
the hexadecimal number 0xdb, the hexadecimal number 0xff, the
hexadecimal number 0x00, the hexadecimal number 0x24, the hexadecimal
number 0x49, the hexadecimal number 0x6d, the hexadecimal number 0x92,
the hexadecimal number 0xb6, the hexadecimal number 0xdb, the
hexadecimal number 0xff, the hexadecimal number 0x00, the hexadecimal
number 0x24, the hexadecimal number 0x49, the hexadecimal number 0x6d,
the hexadecimal number 0x92, the hexadecimal number 0xb6, the
hexadecimal number 0xdb, the hexadecimal number 0xff, the hexadecimal
number 0x00, the hexadecimal number 0x24, the hexadecimal number 0x49,
the hexadecimal number 0x6d, the hexadecimal number 0x92, the
hexadecimal number 0xb6, the hexadecimal number 0xdb, the hexadecimal
number 0xff, the hexadecimal number 0x00, the hexadecimal number 0x24,
the hexadecimal number 0x49, the hexadecimal number 0x6d, the
hexadecimal number 0x92, the hexadecimal number 0xb6, the hexadecimal
number 0xdb, the hexadecimal number 0xff, the hexadecimal number 0x00,
the hexadecimal number 0x24, the hexadecimal number 0x49, the
hexadecimal number 0x6d, the hexadecimal number 0x92, the hexadecimal
number 0xb6, the hexadecimal number 0xdb, the hexadecimal number 0xff,
the hexadecimal number 0x00, the hexadecimal number 0x24, the
hexadecimal number 0x49, the hexadecimal number 0x6d, the hexadecimal
number 0x92, the hexadecimal number 0xb6, the hexadecimal number 0xdb,
the hexadecimal number 0xff, the hexadecimal number 0x00, the
hexadecimal number 0x24, the hexadecimal number 0x49, the hexadecimal
number 0x6d, the hexadecimal number 0x92, the hexadecimal number 0xb6,
the hexadecimal number 0xdb, the hexadecimal number 0xff, the
hexadecimal number 0x00, the hexadecimal number 0x24, the hexadecimal
number 0x49, the hexadecimal number 0x6d, the hexadecimal number 0x92,
the hexadecimal number 0xb6, the hexadecimal number 0xdb, the
hexadecimal number 0xff, the hexadecimal number 0x00, the hexadecimal
number 0x24, the hexadecimal number 0x49, the hexadecimal number 0x6d,
the hexadecimal number 0x92, the hexadecimal number 0xb6, the
hexadecimal number 0xdb, the hexadecimal number 0xff, the hexadecimal
number 0x00, the hexadecimal number 0x24, the hexadecimal number 0x49,
the hexadecimal number 0x6d, the hexadecimal number 0x92, the
hexadecimal number 0xb6, the hexadecimal number 0xdb, the hexadecimal
number 0xff, the hexadecimal number 0x00, the hexadecimal number 0x24,
the hexadecimal number 0x49, the hexadecimal number 0x6d, the
hexadecimal number 0x92, the hexadecimal number 0xb6, the hexadecimal
number 0xdb, the hexadecimal number 0xff, the hexadecimal number 0x00,
the hexadecimal number 0x24, the hexadecimal number 0x49, the
hexadecimal number 0x6d, the hexadecimal number 0x92, the hexadecimal
number 0xb6, the hexadecimal number 0xdb, the hexadecimal number 0xff,
the hexadecimal number 0x00, the hexadecimal number 0x24, the
hexadecimal number 0x49, the hexadecimal number 0x6d, the hexadecimal
number 0x92, the hexadecimal number 0xb6, the hexadecimal number 0xdb,
the hexadecimal number 0xff, the hexadecimal number 0x00, the
hexadecimal number 0x24, the hexadecimal number 0x49, the hexadecimal
number 0x6d, the hexadecimal number 0x92, the hexadecimal number 0xb6,
the hexadecimal number 0xdb, the hexadecimal number 0xff, the
hexadecimal number 0x00, the hexadecimal number 0x24, the hexadecimal
number 0x49, the hexadecimal number 0x6d, the hexadecimal number 0x92,
the hexadecimal number 0xb6, the hexadecimal number 0xdb, the
hexadecimal number 0xff, the hexadecimal number 0x00, the hexadecimal
number 0x24, the hexadecimal number 0x49, the hexadecimal number 0x6d,
the hexadecimal number 0x92, the hexadecimal number 0xb6, the
hexadecimal number 0xdb, the hexadecimal number 0xff, the hexadecimal
number 0x00, the hexadecimal number 0x24, the hexadecimal number 0x49,
the hexadecimal number 0x6d, the hexadecimal number 0x92, the
hexadecimal number 0xb6, the hexadecimal number 0xdb, the hexadecimal
number 0xff, the hexadecimal number 0x00, the hexadecimal number 0x24,
the hexadecimal number 0x49, the hexadecimal number 0x6d, the
hexadecimal number 0x92, the hexadecimal number 0xb6, the hexadecimal
number 0xdb, the hexadecimal number 0xff, the hexadecimal number 0x00,
the hexadecimal number 0x24, the hexadecimal number 0x49, the
hexadecimal number 0x6d, the hexadecimal number 0x92, the hexadecimal
number 0xb6, the hexadecimal number 0xdb, the hexadecimal number 0xff,
the hexadecimal number 0x00, the hexadecimal number 0x24, the
hexadecimal number 0x49, the hexadecimal number 0x6d, the hexadecimal
number 0x92, the hexadecimal number 0xb6, the hexadecimal number 0xdb,
the hexadecimal number 0xff, the hexadecimal number 0x00, the
hexadecimal number 0x24, the hexadecimal number 0x49, the hexadecimal
number 0x6d, the hexadecimal number 0x92, the hexadecimal number 0xb6,
the hexadecimal number 0xdb, the hexadecimal number 0xff, the
hexadecimal number 0x00, the hexadecimal number 0x24, the hexadecimal
number 0x49, the hexadecimal number 0x6d, the hexadecimal number 0x92,
the hexadecimal number 0xb6, the hexadecimal number 0xdb, the
hexadecimal number 0xff, the hexadecimal number 0x00, the hexadecimal
number 0x24, the hexadecimal number 0x49, the hexadecimal number 0x6d,
the hexadecimal number 0x92, the hexadecimal number 0xb6, the
hexadecimal number 0xdb, the hexadecimal number 0xff, the hexadecimal
number 0x00, the hexadecimal number 0x24, the hexadecimal number 0x49,
the hexadecimal number 0x6d, the hexadecimal number 0x92, the
hexadecimal number 0xb6, the hexadecimal number 0xdb, the hexadecimal
number 0xff, the hexadecimal number 0x00, the hexadecimal number 0x24,
the hexadecimal number 0x49, the hexadecimal number 0x6d, the
hexadecimal number 0x92, the hexadecimal number 0xb6, the hexadecimal
number 0xdb, the hexadecimal number 0xff, the hexadecimal number 0x00,
the hexadecimal number 0x24, the hexadecimal number 0x49, the
hexadecimal number 0x6d, the hexadecimal number 0x92, the hexadecimal
number 0xb6, the hexadecimal number 0xdb, the hexadecimal number 0xff,
the hexadecimal number 0x00, the hexadecimal number 0x24, the
hexadecimal number 0x49, the hexadecimal number 0x6d, the hexadecimal
number 0x92, the hexadecimal number 0xb6, the hexadecimal number 0xdb,
the hexadecimal number 0xff, the hexadecimal number 0x00, the
hexadecimal number 0x24, the hexadecimal number 0x49, the hexadecimal
number 0x6d, the hexadecimal number 0x92, the hexadecimal number 0xb6,
the hexadecimal number 0xdb, the hexadecimal number 0xff, the
hexadecimal number 0x00, the hexadecimal number 0x24, the hexadecimal
number 0x49, the hexadecimal number 0x6d, the hexadecimal number 0x92,
the hexadecimal number 0xb6, the hexadecimal number 0xdb, the
hexadecimal number 0xff, the hexadecimal number 0x00, the hexadecimal
number 0x24, the hexadecimal number 0x49, the hexadecimal number 0x6d,
the hexadecimal number 0x92, the hexadecimal number 0xb6, the
hexadecimal number 0xdb, the hexadecimal number 0xff, the hexadecimal
number 0x00, the hexadecimal number 0x24, the hexadecimal number 0x49,
the hexadecimal number 0x6d, the hexadecimal number 0x92, the
hexadecimal number 0xb6, the hexadecimal number 0xdb, the hexadecimal
number 0xff, the hexadecimal number 0x00, the hexadecimal number 0x24,
the hexadecimal number 0x49, the hexadecimal number 0x6d, the
hexadecimal number 0x92, the hexadecimal number 0xb6, the hexadecimal
number 0xdb, the hexadecimal number 0xff, the hexadecimal number 0x00,
the hexadecimal number 0x24, the hexadecimal number 0x49, the
hexadecimal number 0x6d, the hexadecimal number 0x92, the hexadecimal
number 0xb6, the hexadecimal number 0xdb, the hexadecimal number 0xff,
the hexadecimal number 0x00, the hexadecimal number 0x24, the
hexadecimal number 0x49, the hexadecimal number 0x6d, the hexadecimal
number 0x92, the hexadecimal number 0xb6, the hexadecimal number 0xdb,
the hexadecimal number 0xff, the hexadecimal number 0x00, the
hexadecimal number 0x24, the hexadecimal number 0x49, the hexadecimal
number 0x6d, the hexadecimal number 0x92, the hexadecimal number 0xb6,
the hexadecimal number 0xdb, the hexadecimal number 0xff, the
hexadecimal number 0x00, the hexadecimal number 0x24, the hexadecimal
number 0x49, the hexadecimal number 0x6d, the hexadecimal number 0x92,
the hexadecimal number 0xb6, the hexadecimal number 0xdb, the
hexadecimal number 0xff, the hexadecimal number 0x00, the hexadecimal
number 0x24, the hexadecimal number 0x49, the hexadecimal number 0x6d,
the hexadecimal number 0x92, the hexadecimal number 0xb6, the
hexadecimal number 0xdb, the hexadecimal number 0xff, the hexadecimal
number 0x00, the hexadecimal number 0x24, the hexadecimal number 0x49,
the hexadecimal number 0x6d, the hexadecimal number 0x92, the
hexadecimal number 0xb6, the hexadecimal number 0xdb, the hexadecimal
number 0xff, the hexadecimal number 0x00, the hexadecimal number 0x24,
the hexadecimal number 0x49, the hexadecimal number 0x6d, the
hexadecimal number 0x92, the hexadecimal number 0xb6, the hexadecimal
number 0xdb, the hexadecimal number 0xff, the hexadecimal number 0x00,
the hexadecimal number 0x24, the hexadecimal number 0x49, the
hexadecimal number 0x6d, the hexadecimal number 0x92, the hexadecimal
number 0xb6, the hexadecimal number 0xdb, the hexadecimal number 0xff,
the hexadecimal number 0x00, the hexadecimal number 0x24, the
hexadecimal number 0x49, the hexadecimal number 0x6d, the hexadecimal
number 0x92, the hexadecimal number 0xb6, the hexadecimal number 0xdb,
the hexadecimal number 0xff, the hexadecimal number 0x00, the
hexadecimal number 0x24, the hexadecimal number 0x49, the hexadecimal
number 0x6d, the hexadecimal number 0x92, the hexadecimal number 0xb6,
the hexadecimal number 0xdb, the hexadecimal number 0xff, the
hexadecimal number 0x00, the hexadecimal number 0x24, the hexadecimal
number 0x49, the hexadecimal number 0x6d, the hexadecimal number 0x92,
the hexadecimal number 0xb6, the hexadecimal number 0xdb, the
hexadecimal number 0xff, the hexadecimal number 0x00, the hexadecimal
number 0x24, the hexadecimal number 0x49, the hexadecimal number 0x6d,
the hexadecimal number 0x92, the hexadecimal number 0xb6, the
hexadecimal number 0xdb, the hexadecimal number 0xff, the hexadecimal
number 0x00, the hexadecimal number 0x24, the hexadecimal number 0x49,
the hexadecimal number 0x6d, the hexadecimal number 0x92, the
hexadecimal number 0xb6, the hexadecimal number 0xdb, the hexadecimal
number 0xff, the hexadecimal number 0x00, the hexadecimal number 0x24,
the hexadecimal number 0x49, the hexadecimal number 0x6d, the
hexadecimal number 0x92, the hexadecimal number 0xb6, the hexadecimal
number 0xdb, the hexadecimal number 0xff, the hexadecimal number 0x00,
the hexadecimal number 0x24, the hexadecimal number 0x49, the
hexadecimal number 0x6d, the hexadecimal number 0x92, the hexadecimal
number 0xb6, the hexadecimal number 0xdb, the hexadecimal number 0xff,
the hexadecimal number 0x00, the hexadecimal number 0x24, the
hexadecimal number 0x49, the hexadecimal number 0x6d, the hexadecimal
number 0x92, the hexadecimal number 0xb6, the hexadecimal number 0xdb,
the hexadecimal number 0xff, the hexadecimal number 0x00, the
hexadecimal number 0x24, the hexadecimal number 0x49, the hexadecimal
number 0x6d, the hexadecimal number 0x92, the hexadecimal number 0xb6,
the hexadecimal number 0xdb, the hexadecimal number 0xff, the
hexadecimal number 0x00, the hexadecimal number 0x24, the hexadecimal
number 0x49, the hexadecimal number 0x6d, the hexadecimal number 0x92,
the hexadecimal number 0xb6, the hexadecimal number 0xdb, the
hexadecimal number 0xff, the hexadecimal number 0x00, the hexadecimal
number 0x24, the hexadecimal number 0x49, the hexadecimal number 0x6d,
the hexadecimal number 0x92, the hexadecimal number 0xb6, the
hexadecimal number 0xdb, the hexadecimal number 0xff, the hexadecimal
number 0x00, the hexadecimal number 0x24, the hexadecimal number 0x49,
the hexadecimal number 0x6d, the hexadecimal number 0x92, the
hexadecimal number 0xb6, the hexadecimal number 0xdb, the hexadecimal
number 0xff, the hexadecimal number 0x00, the hexadecimal number 0x24,
the hexadecimal number 0x49, the hexadecimal number 0x6d, the
hexadecimal number 0x92, the hexadecimal number 0xb6, the hexadecimal
number 0xdb, the hexadecimal number 0xff, the hexadecimal number 0x00,
the hexadecimal number 0x24, the hexadecimal number 0x49, the
hexadecimal number 0x6d, the hexadecimal number 0x92, the hexadecimal
number 0xb6, the hexadecimal number 0xdb, the hexadecimal number 0xff,
the hexadecimal number 0x00, the hexadecimal number 0x24, the
hexadecimal number 0x49, the hexadecimal number 0x6d, the hexadecimal
number 0x92, the hexadecimal number 0xb6, the hexadecimal number 0xdb,
the hexadecimal number 0xff, the hexadecimal number 0x00, the
hexadecimal number 0x24, the hexadecimal number 0x49, the hexadecimal
number 0x6d, the hexadecimal number 0x92, the hexadecimal number 0xb6,
the hexadecimal number 0xdb, the hexadecimal number 0xff, the
hexadecimal number 0x00, the hexadecimal number 0x24, the hexadecimal
number 0x49, the hexadecimal number 0x6d, the hexadecimal number 0x92,
the hexadecimal number 0xb6, the hexadecimal number 0xdb, the
hexadecimal number 0xff, the hexadecimal number 0x00, the hexadecimal
number 0x24, the hexadecimal number 0x49, the hexadecimal number 0x6d,
the hexadecimal number 0x92, the hexadecimal number 0xb6, the
hexadecimal number 0xdb, the hexadecimal number 0xff, the hexadecimal
number 0x00, the hexadecimal number 0x24, the hexadecimal number 0x49,
the hexadecimal number 0x6d, the hexadecimal number 0x92, the
hexadecimal number 0xb6, the hexadecimal number 0xdb, the hexadecimal
number 0xff, the hexadecimal number 0x00, the hexadecimal number 0x24,
the hexadecimal number 0x49, the hexadecimal number 0x6d, the
hexadecimal number 0x92, the hexadecimal number 0xb6, the hexadecimal
number 0xdb, the hexadecimal number 0xff, the hexadecimal number 0x00,
the hexadecimal number 0x24, the hexadecimal number 0x49, the
hexadecimal number 0x6d, the hexadecimal number 0x92, the hexadecimal
number 0xb6, the hexadecimal number 0xdb, the hexadecimal number 0xff,
the hexadecimal number 0x00, the hexadecimal number 0x24, the
hexadecimal number 0x49, the hexadecimal number 0x6d, the hexadecimal
number 0x92, the hexadecimal number 0xb6, the hexadecimal number 0xdb,
the hexadecimal number 0xff, the hexadecimal number 0x00, the
hexadecimal number 0x24, the hexadecimal number 0x49, the hexadecimal
number 0x6d, the hexadecimal number 0x92, the hexadecimal number 0xb6,
the hexadecimal number 0xdb, and the hexadecimal number 0xff.

Here, the author says "Reverse the order of the bits within a byte."

Specifying the type (this declaration is not to be shared) byte,
allocate the variable 'bit_reverse', defined to be an array with the
size 256 and initialized to the set the hexadecimal number 0x00, the
hexadecimal number 0x80, the hexadecimal number 0x40, the hexadecimal
number 0xc0, the hexadecimal number 0x20, the hexadecimal number 0xa0,
the hexadecimal number 0x60, the hexadecimal number 0xe0, the
hexadecimal number 0x10, the hexadecimal number 0x90, the hexadecimal
number 0x50, the hexadecimal number 0xd0, the hexadecimal number 0x30,
the hexadecimal number 0xb0, the hexadecimal number 0x70, the
hexadecimal number 0xf0, the hexadecimal number 0x08, the hexadecimal
number 0x88, the hexadecimal number 0x48, the hexadecimal number 0xc8,
the hexadecimal number 0x28, the hexadecimal number 0xa8, the
hexadecimal number 0x68, the hexadecimal number 0xe8, the hexadecimal
number 0x18, the hexadecimal number 0x98, the hexadecimal number 0x58,
the hexadecimal number 0xd8, the hexadecimal number 0x38, the
hexadecimal number 0xb8, the hexadecimal number 0x78, the hexadecimal
number 0xf8, the hexadecimal number 0x04, the hexadecimal number 0x84,
the hexadecimal number 0x44, the hexadecimal number 0xc4, the
hexadecimal number 0x24, the hexadecimal number 0xa4, the hexadecimal
number 0x64, the hexadecimal number 0xe4, the hexadecimal number 0x14,
the hexadecimal number 0x94, the hexadecimal number 0x54, the
hexadecimal number 0xd4, the hexadecimal number 0x34, the hexadecimal
number 0xb4, the hexadecimal number 0x74, the hexadecimal number 0xf4,
the hexadecimal number 0x0c, the hexadecimal number 0x8c, the
hexadecimal number 0x4c, the hexadecimal number 0xcc, the hexadecimal
number 0x2c, the hexadecimal number 0xac, the hexadecimal number 0x6c,
the hexadecimal number 0xec, the hexadecimal number 0x1c, the
hexadecimal number 0x9c, the hexadecimal number 0x5c, the hexadecimal
number 0xdc, the hexadecimal number 0x3c, the hexadecimal number 0xbc,
the hexadecimal number 0x7c, the hexadecimal number 0xfc, the
hexadecimal number 0x02, the hexadecimal number 0x82, the hexadecimal
number 0x42, the hexadecimal number 0xc2, the hexadecimal number 0x22,
the hexadecimal number 0xa2, the hexadecimal number 0x62, the
hexadecimal number 0xe2, the hexadecimal number 0x12, the hexadecimal
number 0x92, the hexadecimal number 0x52, the hexadecimal number 0xd2,
the hexadecimal number 0x32, the hexadecimal number 0xb2, the
hexadecimal number 0x72, the hexadecimal number 0xf2, the hexadecimal
number 0x0a, the hexadecimal number 0x8a, the hexadecimal number 0x4a,
the hexadecimal number 0xca, the hexadecimal number 0x2a, the
hexadecimal number 0xaa, the hexadecimal number 0x6a, the hexadecimal
number 0xea, the hexadecimal number 0x1a, the hexadecimal number 0x9a,
the hexadecimal number 0x5a, the hexadecimal number 0xda, the
hexadecimal number 0x3a, the hexadecimal number 0xba, the hexadecimal
number 0x7a, the hexadecimal number 0xfa, the hexadecimal number 0x06,
the hexadecimal number 0x86, the hexadecimal number 0x46, the
hexadecimal number 0xc6, the hexadecimal number 0x26, the hexadecimal
number 0xa6, the hexadecimal number 0x66, the hexadecimal number 0xe6,
the hexadecimal number 0x16, the hexadecimal number 0x96, the
hexadecimal number 0x56, the hexadecimal number 0xd6, the hexadecimal
number 0x36, the hexadecimal number 0xb6, the hexadecimal number 0x76,
the hexadecimal number 0xf6, the hexadecimal number 0x0e, the
hexadecimal number 0x8e, the hexadecimal number 0x4e, the hexadecimal
number 0xce, the hexadecimal number 0x2e, the hexadecimal number 0xae,
the hexadecimal number 0x6e, the hexadecimal number 0xee, the
hexadecimal number 0x1e, the hexadecimal number 0x9e, the hexadecimal
number 0x5e, the hexadecimal number 0xde, the hexadecimal number 0x3e,
the hexadecimal number 0xbe, the hexadecimal number 0x7e, the
hexadecimal number 0xfe, the hexadecimal number 0x01, the hexadecimal
number 0x81, the hexadecimal number 0x41, the hexadecimal number 0xc1,
the hexadecimal number 0x21, the hexadecimal number 0xa1, the
hexadecimal number 0x61, the hexadecimal number 0xe1, the hexadecimal
number 0x11, the hexadecimal number 0x91, the hexadecimal number 0x51,
the hexadecimal number 0xd1, the hexadecimal number 0x31, the
hexadecimal number 0xb1, the hexadecimal number 0x71, the hexadecimal
number 0xf1, the hexadecimal number 0x09, the hexadecimal number 0x89,
the hexadecimal number 0x49, the hexadecimal number 0xc9, the
hexadecimal number 0x29, the hexadecimal number 0xa9, the hexadecimal
number 0x69, the hexadecimal number 0xe9, the hexadecimal number 0x19,
the hexadecimal number 0x99, the hexadecimal number 0x59, the
hexadecimal number 0xd9, the hexadecimal number 0x39, the hexadecimal
number 0xb9, the hexadecimal number 0x79, the hexadecimal number 0xf9,
the hexadecimal number 0x05, the hexadecimal number 0x85, the
hexadecimal number 0x45, the hexadecimal number 0xc5, the hexadecimal
number 0x25, the hexadecimal number 0xa5, the hexadecimal number 0x65,
the hexadecimal number 0xe5, the hexadecimal number 0x15, the
hexadecimal number 0x95, the hexadecimal number 0x55, the hexadecimal
number 0xd5, the hexadecimal number 0x35, the hexadecimal number 0xb5,
the hexadecimal number 0x75, the hexadecimal number 0xf5, the
hexadecimal number 0x0d, the hexadecimal number 0x8d, the hexadecimal
number 0x4d, the hexadecimal number 0xcd, the hexadecimal number 0x2d,
the hexadecimal number 0xad, the hexadecimal number 0x6d, the
hexadecimal number 0xed, the hexadecimal number 0x1d, the hexadecimal
number 0x9d, the hexadecimal number 0x5d, the hexadecimal number 0xdd,
the hexadecimal number 0x3d, the hexadecimal number 0xbd, the
hexadecimal number 0x7d, the hexadecimal number 0xfd, the hexadecimal
number 0x03, the hexadecimal number 0x83, the hexadecimal number 0x43,
the hexadecimal number 0xc3, the hexadecimal number 0x23, the
hexadecimal number 0xa3, the hexadecimal number 0x63, the hexadecimal
number 0xe3, the hexadecimal number 0x13, the hexadecimal number 0x93,
the hexadecimal number 0x53, the hexadecimal number 0xd3, the
hexadecimal number 0x33, the hexadecimal number 0xb3, the hexadecimal
number 0x73, the hexadecimal number 0xf3, the hexadecimal number 0x0b,
the hexadecimal number 0x8b, the hexadecimal number 0x4b, the
hexadecimal number 0xcb, the hexadecimal number 0x2b, the hexadecimal
number 0xab, the hexadecimal number 0x6b, the hexadecimal number 0xeb,
the hexadecimal number 0x1b, the hexadecimal number 0x9b, the
hexadecimal number 0x5b, the hexadecimal number 0xdb, the hexadecimal
number 0x3b, the hexadecimal number 0xbb, the hexadecimal number 0x7b,
the hexadecimal number 0xfb, the hexadecimal number 0x07, the
hexadecimal number 0x87, the hexadecimal number 0x47, the hexadecimal
number 0xc7, the hexadecimal number 0x27, the hexadecimal number 0xa7,
the hexadecimal number 0x67, the hexadecimal number 0xe7, the
hexadecimal number 0x17, the hexadecimal number 0x97, the hexadecimal
number 0x57, the hexadecimal number 0xd7, the hexadecimal number 0x37,
the hexadecimal number 0xb7, the hexadecimal number 0x77, the
hexadecimal number 0xf7, the hexadecimal number 0x0f, the hexadecimal
number 0x8f, the hexadecimal number 0x4f, the hexadecimal number 0xcf,
the hexadecimal number 0x2f, the hexadecimal number 0xaf, the
hexadecimal number 0x6f, the hexadecimal number 0xef, the hexadecimal
number 0x1f, the hexadecimal number 0x9f, the hexadecimal number 0x5f,
the hexadecimal number 0xdf, the hexadecimal number 0x3f, the
hexadecimal number 0xbf, the hexadecimal number 0x7f, and the
hexadecimal number 0xff.

Here, the author says "this function is only used internally when decrypting title key".  

This is the definition of the function 'css_titlekey'.  It returns a
value of the type (this declaration is not to be shared) void.  The
function 'css_titlekey' has the following parameters: byte pointer
'key', byte pointer 'im', byte 'invert', and byte 'invert'.

The local variables for the function 'css_titlekey' begin here:
Specifying the type unsigned integer, allocate the variables
'lfsr1_lo', 'lfsr1_hi', 'lfsr0', and 'combined'.

Specifying the type byte, allocate the variables 'o_lfsr0' and 'o_lfsr1'.

Specifying the type byte, allocate the variable 'k', defined to be an
array with the size 5.

Specifying the type integer, allocate the variable 'i'.

And now comes the instruction set for the function 'css_titlekey'.

Assign to lfsr1_lo the value "im bitwise orred by the hexadecimal
number 0x100".

Assign to lfsr1_hi the value "array im's element at address (1)".

Assign to lfsr0 the value "the 2-level parenthetical expression array
im's element at address (4) shifted left by 17 now bitwise orred by
the 1-level parenthetical expression array im's element at address (3)
shifted left by 9 now bitwise orred by the 1-level parenthetical
expression array im's element at address (2) shifted left by 1 now now
plus 8 minus the 1-level parenthetical expression array im's element
at address (2) bitwise anded by 7".

Assign to lfsr0 the value "the 1-level parenthetical expression array
bit_reverse's element at address (lfsr0 bitwise anded by the
hexadecimal number 0xff) shifted left by 24 now bitwise orred by the
1-level parenthetical expression array bit_reverse's element at
address (the 1-level parenthetical expression lfsr0 shifted right by 8
now bitwise anded by the hexadecimal number 0xff) shifted left by 16
now bitwise orred by the 1-level parenthetical expression array
bit_reverse's element at address (the 1-level parenthetical expression
lfsr0 shifted right by 16 now bitwise anded by the hexadecimal number
0xff) shifted left by 8 now bitwise orred by array bit_reverse's
element at address (the 1-level parenthetical expression lfsr0 shifted
right by 24 now bitwise anded by the hexadecimal number 0xff)".

Assign to combined the value "0".

Here we set up for an iteration loop.

We initialize by performing this instruction: Assign to i the value "0".

We continue the loop as long as the following expression comes out
positive: 'i checked to be less than 5'

At the end of each repetition we increment i.

And now some statements.

Assign to o_lfsr1 the value "array lfsr1_bits0's element at address
(lfsr1_hi) bitwise xorred by array lfsr1_bits1's element at address
(lfsr1_lo)".

Assign to lfsr1_hi the value "lfsr1_lo shifted right by 1".

Assign to lfsr1_lo the value "the 2-level parenthetical expression
lfsr1_lo bitwise anded by 1 now shifted left by 8 now bitwise xorred
by o_lfsr1".

Assign to o_lfsr1 the value "array bit_reverse's element at address (o_lfsr1)".

Here, the author says ""o_lfsr0 =
(lfsr0>7)^(lfsr0>10)^(lfsr0>11)^(lfsr0>19);"

Assign to o_lfsr0 the value "the 7-level parenthetical expression
lfsr0 shifted right by 8 now bitwise xorred by lfsr0 now shifted right
by 1 now bitwise xorred by lfsr0 now shifted right by 3 now bitwise
xorred by lfsr0 now shifted right by 7".

Assign to lfsr0 the value "the 1-level parenthetical expression lfsr0
shifted right by 8 now bitwise orred by the 1-level parenthetical
expression o_lfsr0 shifted left by 24".

Increase combined by "the 1-level parenthetical expression o_lfsr0
bitwise xorred by invert now plus o_lfsr1".

Assign to array k's element at address (i) the value "combined bitwise
anded by the hexadecimal number 0xff".

Bit shift combined right by "8".

A compound block of instructions for a for loop ends here.

Assign to array key's element at address (4) the value "array k's
element at address (4) bitwise xorred by array csstab1's element at
address (array key's element at address (4)) bitwise xorred by array
key's element at address (3)".

Assign to array key's element at address (3) the value "array k's
element at address (3) bitwise xorred by array csstab1's element at
address (array key's element at address (3)) bitwise xorred by array
key's element at address (2)".

Assign to array key's element at address (2) the value "array k's element at address (2)
bitwise xorred by array csstab1's element at address (array key's element at address (2))
bitwise xorred by array key's element at address (1)".

Assign to array key's element at address (1) the value "array k's
element at address (1) bitwise xorred by array csstab1's element at
address (array key's element at address (1)) bitwise xorred by key".

Assign to key the value "k bitwise xorred by array csstab1's element
at address (key) bitwise xorred by array key's element at address
(4)".

Assign to array key's element at address (4) the value "array k's
element at address (4) bitwise xorred by array csstab1's element at
address (array key's element at address (4)) bitwise xorred by array
key's element at address (3)".

Assign to array key's element at address (3) the value "array k's
element at address (3) bitwise xorred by array csstab1's element at
address (array key's element at address (3)) bitwise xorred by array
key's element at address (2)".

Assign to array key's element at address (2) the value "array k's
element at address (2) bitwise xorred by array csstab1's element at
address (array key's element at address (2)) bitwise xorred by array
key's element at address (1)".

Assign to array key's element at address (1) the value "array k's
element at address (1) bitwise xorred by array csstab1's element at
address (array key's element at address (1)) bitwise xorred by key".

Assign to key the value "k bitwise xorred by array csstab1's element
at address (key)".

And here ends the definition of the function 'css_titlekey'.

Here, the author says "this function decrypts a title key with the
specified disk key tkey: the unobfuscated title key (XORed with
BusKey) dkey: the unobfuscated disk key (XORed with BusKey) 2048 bytes
in length (though only 5 bytes are needed, see below) pkey: array of
pointers to player keys and disk key offsets use the result returned
in tkey with css_descramble".

This is the definition of the function 'css_decrypttitlekey'.  It
returns a value of the type integer.

The function 'css_decrypttitlekey' has the following parameters: byte
pointer 'tkey', byte pointer 'dkey', the structure playkey
second-level pointer 'pkey', and the structure playkey second-level
pointer 'pkey'.

The local variables for the function 'css_decrypttitlekey' begin here:
Specifying the type byte, allocate the variables 'test', defined to be
an array with the size 5 and 'pretkey', defined to be an array with
the size 5.

Specifying the type integer, allocate the variable 'i'.

And now comes the instruction set for the function 'css_decrypttitlekey'.

Here we set up for an iteration loop.

We continue the loop as long as the following expression comes out
positive: 'the memory contents of pkey'

At the end of each repetition we increment pkey and increment i.

And now some statements.

Perform the function memcpy as applied to the arguments 'pretkey',
'dkey plus structure pointer member ', and '5'.

Perform the function css_titlekey as applied to the arguments
'pretkey', 'structure pointer member ', and '0'.

Perform the function memcpy as applied to the arguments 'test',
'dkey', and '5'.

Perform the function css_titlekey as applied to the arguments 'test',
'pretkey', and '0'.

Execute the following part if the expression "the function memcmp as
applied to the arguments 'test', 'pretkey', and '5' checked for
equality against 0" evaluates as positive:

And now some statements.

Perform the function fprintf as applied to the arguments 'stderr',
'"Using Key %d\n"', and 'i plus 1'.

Here we break from the current loop.\nA compound block of instructions
for an if ends here.

A compound block of instructions for a for loop ends here.

Execute the following part if the expression "the logical negation of
the memory contents of pkey" evaluates as positive:

And now some statements.

Perform the function fprintf as applied to the arguments 'stderr',
'"Shit - Need Key %d\n"', and ‘i plus 1'.

Here we end the current subroutine.

A compound block of instructions for an if ends here.

Perform the function css_titlekey as applied to the arguments 'tkey',
'pretkey', and 'the hexadecimal number 0xff'.

Here we end the current subroutine.

We return the following value: "1".

And here ends the definition of the function 'css_decrypttitlekey'.

Here, the author says "this function does the actual descrambling sec:
encrypted sector (2048 bytes) key: decrypted title key obtained from
css_decrypttitlekey".

Now back to the code.

This is the definition of the function 'css_descramble'.
It returns a value of the type void.

The function 'css_descramble' has the following parameters:
byte pointer 'sec', byte pointer 'key', and byte pointer 'key'.

The local variables for the function 'css_descramble' begin here:
Specifying the type unsigned integer, allocate the variables
'lfsr1_lo', 'lfsr1_hi', 'lfsr0', and 'combined'.

Specifying the type unsigned character, allocate the variables
'o_lfsr0' and 'o_lfsr1'.

Specifying the type unsigned character, allocate the variable pointer
'end' (initialized to sec plus the hexadecimal number 0x800).

And now comes the instruction set for the function 'css_descramble'.
Note: we define the macro SALTED with the symbol i to use the token
sequence "(key[i] ^ sec[0x54 + (i)])".

Assign to lfsr1_lo the value "the function SALTED as applied to the
argument '0' bitwise orred by the hexadecimal number 0x100".

Assign to lfsr1_hi the value "the function SALTED as applied to the
argument '1'".

Assign to lfsr0 the value "the 2-level parenthetical expression the
function SALTED as applied to the argument '4' shifted left by 17 now
bitwise orred by the 1-level parenthetical expression the function
SALTED as applied to the argument '3' shifted left by 9 now bitwise
orred by the 1-level parenthetical expression the function SALTED as
applied to the argument '2' shifted left by 1 now now plus 8 minus the
1-level parenthetical expression the function SALTED as applied to the
argument '2' bitwise anded by 7".

Assign to lfsr0 the value "the 1-level parenthetical expression array
bit_reverse's element at address (lfsr0 bitwise anded by the
hexadecimal number 0xff) shifted left by 24 now bitwise orred by the
1-level parenthetical expression array bit_reverse's element at
address (the 1-level parenthetical expression lfsr0 shifted right by 8
now bitwise anded by the hexadecimal number 0xff) shifted left by 16
now bitwise orred by the 1-level parenthetical expression array
bit_reverse's element at address (the 1-level parenthetical expression
lfsr0 shifted right by 16 now bitwise anded by the hexadecimal number
0xff) shifted left by 8 now bitwise orred by array bit_reverse's
element at address (the 1-level parenthetical expression lfsr0 shifted
right by 24 now bitwise anded by the hexadecimal number 0xff)".

Increase sec by "the hexadecimal number 0x80".

Assign to combined the value "0".

Here we go into a repetition loop which we stay in as long as the
following expression evaluates as positive: 'sec checked for
inequality against end'

And now some statements.

Assign to o_lfsr1 the value "array lfsr1_bits0's element at address
(lfsr1_hi) bitwise xorred by array lfsr1_bits1's element at address
(lfsr1_lo)".

Assign to lfsr1_hi the value "lfsr1_lo shifted right by 1".

Assign to lfsr1_lo the value "the 2-level parenthetical expression
lfsr1_lo bitwise anded by 1 now shifted left by 8 now bitwise xorred
by o_lfsr1".

Assign to o_lfsr1 the value "array bit_reverse's element at address
(o_lfsr1)".

Here, the author says "o_lfsr0 =
(lfsr0>7)^(lfsr0>10)^(lfsr0>11)^(lfsr0>19);"

Assign to o_lfsr0 the value "the 7-level parenthetical expression
lfsr0 shifted right by 8 now bitwise xorred by lfsr0 now shifted right
by 1 now bitwise xorred by lfsr0 now shifted right by 3 now bitwise
xorred by lfsr0 now shifted right by 7".

Assign to lfsr0 the value "the 1-level parenthetical expression lfsr0
shifted right by 8 now bitwise orred by the 1-level parenthetical
expression o_lfsr0 shifted left by 24".

Increase combined by "o_lfsr0 plus a casting into the type 'byte' of
the one's complement of o_lfsr1".

Assign to the memory contents of sec (which is incremented up by one)
the value "array csstab1's element at address (the memory contents of
sec) bitwise xorred by the 1-level parenthetical expression combined
bitwise anded by the hexadecimal number 0xff".

Bit shift combined right by "8".

A compound block of instructions for a while loop ends here.

Now ends the repetition loop.

And here ends the definition of the function 'css_descramble'.


PREVIOUS  TABLE OF CONTENTS  NEXT