xntlm-des

xntlm-des — DES encryption/decryption

Synopsis




void        xntlm_deskey                    (XNTLM_DES_KS ks,
                                             unsigned char *key,
                                             int decrypt);
void        xntlm_des                       (XNTLM_DES_KS ks,
                                             unsigned char block[8]);

Description

These routines implement DES encryption and decryption. They are here primarly for xntlm-internal use, but can also be used by other code (such as e2k_des_encode_string() and e2k_des_decode_string()).

Details

xntlm_deskey ()

void        xntlm_deskey                    (XNTLM_DES_KS ks,
                                             unsigned char *key,
                                             int decrypt);

Sets up ks based on key. You must call this to initialize the key schedule before calling xntlm_des().

ks :key schedule to fill in
key :the encryption key
decrypt :0 for encryption, 1 for decryption

xntlm_des ()

void        xntlm_des                       (XNTLM_DES_KS ks,
                                             unsigned char block[8]);

DES encrypts/decrypts (according to ks) a single block in ECB mode.

ks :the key schedule to use
block :the block of data to encrypt or decrypt

See Also

e2k_des_encode_string(), e2k_des_decode_string()