source: trunk/cscrypt/rc6.h@ 4012

Last change on this file since 4012 was 4012, checked in by schlocke, 10 years ago

cccam: added full cccam 2.2.x support !!

File size: 1.3 KB
Line 
1/* rc6 (TM)
2* Unoptimized sample implementation of Ron Rivest's submission to the
3* AES bakeoff.
4*
5* Salvo Salasio, 19 June 1998
6*
7* Intellectual property notes: The name of the algorithm (RC6) is
8* trademarked; any property rights to the algorithm or the trademark
9* should be discussed with discussed with the authors of the defining
10* paper "The RC6(TM) Block Cipher": Ronald L. Rivest (MIT),
11* M.J.B. Robshaw (RSA Labs), R. Sidney (RSA Labs), and Y.L. Yin (RSA Labs),
12* distributed 18 June 1998 and available from the lead author's web site.
13*
14* This sample implementation is placed in the public domain by the author,
15* Salvo Salasio. The ROTL and ROTR definitions were cribbed from RSA Labs'
16* RC5 reference implementation.
17*/
18
19/* RC6 is parameterized for w-bit words, b bytes of key, and
20 * r rounds. The AES version of RC6 specifies b=16, 24, or 32;
21 * w=32; and r=20.
22 */
23
24#define rc6keylen 43
25
26typedef unsigned int RC6KEY[rc6keylen];
27
28/*
29 * K=plain key
30 * b=plain key len
31 * S=prepared key by setup
32 * pt=uncrypted data
33 * ct=crypted data
34 * block size is always 16bytes
35 */
36void rc6_key_setup(unsigned char *K, int b, unsigned int *S);
37void rc6_block_encrypt(unsigned int *pt, unsigned int *ct, unsigned int *S);
38void rc6_block_decrypt(unsigned int *ct, unsigned int *pt, unsigned int *S);
Note: See TracBrowser for help on using the repository browser.