Changeset 3999


Ignore:
Timestamp:
11/26/10 13:20:01 (10 years ago)
Author:
schlocke
Message:

cccam: added rc6 support

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/cscrypt/rc6.c

    r3996 r3999  
    2020#include "rc6.h"
    2121
     22#define w 32    /* word size in bits */
     23#define r 20    /* based on security estimates */
     24
     25#define P32 0xB7E15163  /* Magic constants for key setup */
     26#define Q32 0x9E3779B9
     27
     28/* derived constants */
     29#define bytes   (w / 8)                         /* bytes per word */
     30#define c       ((b + bytes - 1) / bytes)       /* key in words, rounded up */
     31#define R24     (2 * r + 4)
     32#define lgw     5                               /* log2(w) -- wussed out */
     33
    2234/* Rotations */
    2335#define ROTL(x,y) (((x)<<((y)&(w-1))) | ((x)>>(w-((y)&(w-1)))))
  • trunk/cscrypt/rc6.h

    r3996 r3999  
    2222 */
    2323   
    24 #define w 32    /* word size in bits */
    25 #define r 20    /* based on security estimates */
    26    
    27 #define P32 0xB7E15163  /* Magic constants for key setup */
    28 #define Q32 0x9E3779B9
    29    
    30 /* derived constants */
    31 #define bytes   (w / 8)                         /* bytes per word */
    32 #define c       ((b + bytes - 1) / bytes)       /* key in words, rounded up */
    33 #define R24     (2 * r + 4)
    34 #define lgw     5                               /* log2(w) -- wussed out */
    35    
    36 #define rc6keylen R24 - 1                      /* Key schedule */
     24#define rc6keylen 43
    3725
    3826typedef unsigned int RC6KEY[rc6keylen];
  • trunk/module-cccam.c

    r3997 r3999  
    66#include "reader-common.h"
    77#include <poll.h>
     8#include "cscrypt/rc6.h"
    89
    910extern int pthread_mutexattr_settype(pthread_mutexattr_t *__attr, int __kind); //Needs extern defined???
Note: See TracChangeset for help on using the changeset viewer.