/*****************************************************************************
* 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 ) \
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,