]> git.sesse.net Git - vlc/blobdiff - modules/demux/mp4/drmstables.h
MKV: code factorisation around extra_data filling
[vlc] / modules / demux / mp4 / drmstables.h
index cff5bce5ba0835dd7d538f9cf8a1aecb7acbfe1c..027af26bdb4447f6c1ac255145f1bb4688e00cd2 100644 (file)
@@ -1,8 +1,8 @@
 /*****************************************************************************
  * drmstables.h : AES/Rijndael block cipher and miscellaneous tables
  *****************************************************************************
- * Copyright (C) 2004 VideoLAN
- * $Id: drmstables.h,v 1.3 2004/01/18 01:21:33 sam Exp $
+ * Copyright (C) 2004, 2006 the VideoLAN team
+ * $Id$
  *
  * Author: Jon Lech Johansen <jon-vl@nanocrew.net>
  *
  *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
+/*****************************************************************************
+ * p_aes_table, p_aes_encrypt, p_aes_itable, p_aes_decrypt: AES tables
+ *****************************************************************************
+ * The following tables and macros are used for the AES (Rijndael) cypher.
+ *****************************************************************************/
 #define AES_ROR( x, n ) (((x) << (32-(n))) | ((x) >> (n)))
 
 #define AES_XOR_ROR( p_table, p_tmp ) \
@@ -178,6 +183,12 @@ static uint32_t const p_aes_decrypt[ 256 ] =
     0x55000000, 0x21000000, 0x0c000000, 0x7d000000
 };
 
+/*****************************************************************************
+ * p_shuffle_xor, p_shuffle_sub, p_shuffle_add: iTMS drms v1
+ *****************************************************************************
+ * The following tables are used for the first version of the iTMS drms key
+ * scrambling algorithm.
+ *****************************************************************************/
 static uint16_t const p_shuffle_xor[ 256 ] =
 {
     0x00d1, 0x0315, 0x1a32, 0x19ec, 0x1bbb, 0x1d6f, 0x14fe, 0x0e9e,