Eneboo - Documentación para desarrolladores
'defines' | Funciones | Variables
Referencia del Archivo src/libdigidoc/openssl/crypto/des/des_locl.h
#include <openssl/e_os2.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <math.h>
#include <openssl/des.h>

Ir al código fuente de este archivo.

'defines'

#define ITERATIONS   16
#define HALF_ITERATIONS   8
#define MAXWRITE   (1024*16)
#define BSIZE   (MAXWRITE+4)
#define c2l(c, l)
#define c2ln(c, l1, l2, n)
#define l2c(l, c)
#define HDRSIZE   4
#define n2l(c, l)
#define l2n(l, c)
#define l2cn(l1, l2, c, n)
#define ROTATE(a, n)   (((a)>>(n))+((a)<<(32-(n))))
#define LOAD_DATA_tmp(a, b, c, d, e, f)   LOAD_DATA(a,b,c,d,e,f,g)
#define LOAD_DATA(R, S, u, t, E0, E1, tmp)
#define D_ENCRYPT(LL, R, S)
#define PERM_OP(a, b, t, n, m)
#define IP(l, r)
#define FP(l, r)

Funciones

void fcrypt_body (DES_LONG *out, DES_key_schedule *ks, DES_LONG Eswap0, DES_LONG Eswap1)

Variables

const DES_LONG DES_SPtrans [8][64]

Documentación de los 'defines'

#define BSIZE   (MAXWRITE+4)
#define c2l (   c,
 
)
Valor:
(l =((DES_LONG)(*((c)++)))    , \
                         l|=((DES_LONG)(*((c)++)))<< 8L, \
                         l|=((DES_LONG)(*((c)++)))<<16L, \
                         l|=((DES_LONG)(*((c)++)))<<24L)
#define c2ln (   c,
  l1,
  l2,
 
)
Valor:
{ \
                        c+=n; \
                        l1=l2=0; \
                        switch (n) { \
                        case 8: l2 =((DES_LONG)(*(--(c))))<<24L; \
                        case 7: l2|=((DES_LONG)(*(--(c))))<<16L; \
                        case 6: l2|=((DES_LONG)(*(--(c))))<< 8L; \
                        case 5: l2|=((DES_LONG)(*(--(c))));     \
                        case 4: l1 =((DES_LONG)(*(--(c))))<<24L; \
                        case 3: l1|=((DES_LONG)(*(--(c))))<<16L; \
                        case 2: l1|=((DES_LONG)(*(--(c))))<< 8L; \
                        case 1: l1|=((DES_LONG)(*(--(c))));     \
                                } \
                        }
#define D_ENCRYPT (   LL,
  R,
  S 
)
Valor:
{\
        LOAD_DATA_tmp(R,S,u,t,E0,E1); \
        t=ROTATE(t,4); \
        LL^=\
                DES_SPtrans[0][(u>> 2L)&0x3f]^ \
                DES_SPtrans[2][(u>>10L)&0x3f]^ \
                DES_SPtrans[4][(u>>18L)&0x3f]^ \
                DES_SPtrans[6][(u>>26L)&0x3f]^ \
                DES_SPtrans[1][(t>> 2L)&0x3f]^ \
                DES_SPtrans[3][(t>>10L)&0x3f]^ \
                DES_SPtrans[5][(t>>18L)&0x3f]^ \
                DES_SPtrans[7][(t>>26L)&0x3f]; }
#define FP (   l,
 
)
Valor:
{ \
        register DES_LONG tt; \
        PERM_OP(l,r,tt, 1,0x55555555L); \
        PERM_OP(r,l,tt, 8,0x00ff00ffL); \
        PERM_OP(l,r,tt, 2,0x33333333L); \
        PERM_OP(r,l,tt,16,0x0000ffffL); \
        PERM_OP(l,r,tt, 4,0x0f0f0f0fL); \
        }
#define HALF_ITERATIONS   8
#define HDRSIZE   4
#define IP (   l,
 
)
Valor:
{ \
        register DES_LONG tt; \
        PERM_OP(r,l,tt, 4,0x0f0f0f0fL); \
        PERM_OP(l,r,tt,16,0x0000ffffL); \
        PERM_OP(r,l,tt, 2,0x33333333L); \
        PERM_OP(l,r,tt, 8,0x00ff00ffL); \
        PERM_OP(r,l,tt, 1,0x55555555L); \
        }
#define ITERATIONS   16
#define l2c (   l,
  c 
)
Valor:
(*((c)++)=(unsigned char)(((l)     )&0xff), \
                         *((c)++)=(unsigned char)(((l)>> 8L)&0xff), \
                         *((c)++)=(unsigned char)(((l)>>16L)&0xff), \
                         *((c)++)=(unsigned char)(((l)>>24L)&0xff))
#define l2cn (   l1,
  l2,
  c,
 
)
Valor:
{ \
                        c+=n; \
                        switch (n) { \
                        case 8: *(--(c))=(unsigned char)(((l2)>>24L)&0xff); \
                        case 7: *(--(c))=(unsigned char)(((l2)>>16L)&0xff); \
                        case 6: *(--(c))=(unsigned char)(((l2)>> 8L)&0xff); \
                        case 5: *(--(c))=(unsigned char)(((l2)     )&0xff); \
                        case 4: *(--(c))=(unsigned char)(((l1)>>24L)&0xff); \
                        case 3: *(--(c))=(unsigned char)(((l1)>>16L)&0xff); \
                        case 2: *(--(c))=(unsigned char)(((l1)>> 8L)&0xff); \
                        case 1: *(--(c))=(unsigned char)(((l1)     )&0xff); \
                                } \
                        }
#define l2n (   l,
  c 
)
Valor:
(*((c)++)=(unsigned char)(((l)>>24L)&0xff), \
                         *((c)++)=(unsigned char)(((l)>>16L)&0xff), \
                         *((c)++)=(unsigned char)(((l)>> 8L)&0xff), \
                         *((c)++)=(unsigned char)(((l)     )&0xff))
#define LOAD_DATA (   R,
  S,
  u,
  t,
  E0,
  E1,
  tmp 
)
Valor:
u=R^s[S  ]; \
        t=R^s[S+1]
#define LOAD_DATA_tmp (   a,
  b,
  c,
  d,
  e,
 
)    LOAD_DATA(a,b,c,d,e,f,g)
#define MAXWRITE   (1024*16)
#define n2l (   c,
 
)
Valor:
(l =((DES_LONG)(*((c)++)))<<24L, \
                         l|=((DES_LONG)(*((c)++)))<<16L, \
                         l|=((DES_LONG)(*((c)++)))<< 8L, \
                         l|=((DES_LONG)(*((c)++))))
#define PERM_OP (   a,
  b,
  t,
  n,
 
)
Valor:
((t)=((((a)>>(n))^(b))&(m)),\
        (b)^=(t),\
        (a)^=((t)<<(n)))
#define ROTATE (   a,
 
)    (((a)>>(n))+((a)<<(32-(n))))

Documentación de las funciones

void fcrypt_body ( DES_LONG *  out,
DES_key_schedule ks,
DES_LONG  Eswap0,
DES_LONG  Eswap1 
)

Documentación de las variables

const DES_LONG DES_SPtrans[8][64]
 Todo Clases Namespaces Archivos Funciones Variables 'typedefs' Enumeraciones Valores de enumeraciones Propiedades Amigas 'defines'