#include "cast5.h"
#include "common.h"
#include "intreadwrite.h"
#include "attributes.h"
 
Go to the source code of this file.
 | 
| #define  | IA(x)   ((x) >> 24) | 
|   | 
| #define  | IB(x)   (((x) >> 16) & 0xff) | 
|   | 
| #define  | IC(x)   (((x) >> 8) & 0xff) | 
|   | 
| #define  | ID(x)   ((x) & 0xff) | 
|   | 
| #define  | LR(x,  c)   (((x) << (c)) | ((x) >> (32 - (c)))) | 
|   | 
| #define  | F3(l,  r,  i) | 
|   | 
| #define  | F2(l,  r,  i) | 
|   | 
| #define  | F1(l,  r,  i) | 
|   | 
| #define  | COMPUTE_Z | 
|   | 
| #define  | COMPUTE_X | 
|   | 
 | 
| static void  | generate_round_keys (int rnds, uint32_t *K, uint32_t *x, uint32_t *z) | 
|   | 
| static void  | encipher (AVCAST5 *cs, uint8_t *dst, const uint8_t *src) | 
|   | 
| static void  | decipher (AVCAST5 *cs, uint8_t *dst, const uint8_t *src, uint8_t *iv) | 
|   | 
| struct AVCAST5 *  | av_cast5_alloc (void) | 
|   | Allocate an AVCAST5 context To free the struct: av_free(ptr)  More...
  | 
|   | 
| av_cold int  | av_cast5_init (AVCAST5 *cs, const uint8_t *key, int key_bits) | 
|   | Initialize an AVCAST5 context.  More...
  | 
|   | 
| void  | av_cast5_crypt2 (AVCAST5 *cs, uint8_t *dst, const uint8_t *src, int count, uint8_t *iv, int decrypt) | 
|   | Encrypt or decrypt a buffer using a previously initialized context.  More...
  | 
|   | 
| void  | av_cast5_crypt (AVCAST5 *cs, uint8_t *dst, const uint8_t *src, int count, int decrypt) | 
|   | Encrypt or decrypt a buffer using a previously initialized context, ECB mode only.  More...
  | 
|   | 
 | 
| const int  | av_cast5_size = sizeof(AVCAST5) | 
|   | 
| static const uint32_t  | S1 [256] | 
|   | 
| static const uint32_t  | S2 [256] | 
|   | 
| static const uint32_t  | S3 [256] | 
|   | 
| static const uint32_t  | S4 [256] | 
|   | 
| static const uint32_t  | S5 [256] | 
|   | 
| static const uint32_t  | S6 [256] | 
|   | 
| static const uint32_t  | S7 [256] | 
|   | 
| static const uint32_t  | S8 [256] | 
|   | 
◆ IA
      
        
          | #define IA | 
          ( | 
            | 
          x | ) | 
             ((x) >> 24) | 
        
      
 
 
◆ IB
      
        
          | #define IB | 
          ( | 
            | 
          x | ) | 
             (((x) >> 16) & 0xff) | 
        
      
 
 
◆ IC
      
        
          | #define IC | 
          ( | 
            | 
          x | ) | 
             (((x) >> 8) & 0xff) | 
        
      
 
 
◆ ID
      
        
          | #define ID | 
          ( | 
            | 
          x | ) | 
             ((x) & 0xff) | 
        
      
 
 
◆ LR
      
        
          | #define LR | 
          ( | 
            | 
          x,  | 
        
        
           | 
           | 
            | 
          c  | 
        
        
           | 
          ) | 
           |    (((x) << (c)) | ((x) >> (32 - (c)))) | 
        
      
 
 
◆ F3
Value:    do {                                                                                             \
        I = 
LR(cs->Km[
i] - 
r, cs->Kr[
i]);                                                            \
 
    } while (0)
 
Definition at line 33 of file cast5.c.
 
 
◆ F2
Value:    do {                                                                                             \
        I = 
LR(cs->Km[
i] ^ 
r, cs->Kr[
i]);                                                            \
 
    } while (0)
 
Definition at line 40 of file cast5.c.
 
 
◆ F1
Value:    do {                                                                                             \
        I = 
LR(cs->Km[
i] + 
r, cs->Kr[
i]);                                                            \
 
    } while (0)
 
Definition at line 47 of file cast5.c.
 
 
◆ COMPUTE_Z
Value:
Definition at line 54 of file cast5.c.
 
 
◆ COMPUTE_X
Value:
Definition at line 62 of file cast5.c.
 
 
◆ generate_round_keys()
  
  
      
        
          | static void generate_round_keys  | 
          ( | 
          int  | 
          rnds,  | 
         
        
           | 
           | 
          uint32_t *  | 
          K,  | 
         
        
           | 
           | 
          uint32_t *  | 
          x,  | 
         
        
           | 
           | 
          uint32_t *  | 
          z  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
static   | 
  
 
 
◆ encipher()
◆ decipher()
◆ S1
◆ S2
◆ S3
◆ S4
◆ S5
◆ S6
◆ S7
◆ S8