source: trunk/cscrypt/rc6.h

Last change on this file was 8952, checked in by Gorgone Impertinence, 7 years ago

no codechange
only set a common structure for all sub modules

  • Property svn:eol-style set to LF
File size: 1.3 KB
1/* rc6 (TM)
2* Unoptimized sample implementation of Ron Rivest's submission to the
3* AES bakeoff.
5* Salvo Salasio, 19 June 1998
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.
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.
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 */
24#define rc6keylen 44
26typedef unsigned int RC6KEY[rc6keylen];
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, RC6KEY S);
37void rc6_block_encrypt(unsigned int *pt, unsigned int *ct, int block_count, RC6KEY S);
38void rc6_block_decrypt(unsigned int *ct, unsigned int *pt, int block_count, RC6KEY S);
Note: See TracBrowser for help on using the repository browser.