Logo Search packages:      
Sourcecode: uif2iso version File versions  Download package

void des_crypt_ecb ( des_context ctx,
unsigned char  input[8],
unsigned char  output[8] 
)

DES-ECB block encryption/decryption.

Parameters:
ctx DES context
input 64-bit input block
output 64-bit output block

Definition at line 476 of file des.c.

References des_context::sk.

{
    int i;
    unsigned long X, Y, T, *SK;

    SK = ctx->sk;

    GET_ULONG_BE( X, input, 0 );
    GET_ULONG_BE( Y, input, 4 );

    DES_IP( X, Y );

    for( i = 0; i < 8; i++ )
    {
        DES_ROUND( Y, X );
        DES_ROUND( X, Y );
    }

    DES_FP( Y, X );

    PUT_ULONG_BE( Y, output, 0 );
    PUT_ULONG_BE( X, output, 4 );
}


Generated by  Doxygen 1.6.0   Back to index