version 1.2, 2004/09/20 00:10:24 |
version 1.4, 2005/06/19 15:45:38 |
|
|
/* $OpenXM: OpenXM/src/ox_ntl/crypt/des/des.c,v 1.1 2004/07/11 00:32:17 iwane Exp $ */ |
/* $OpenXM: OpenXM/src/ox_ntl/crypt/des/des.c,v 1.3 2005/06/19 15:29:00 iwane Exp $ */ |
/* |
/* |
* FIPS PUB 46-3 |
* FIPS PUB 46-3 |
* DATA ENCRYPTION STANDARD |
* DATA ENCRYPTION STANDARD |
Line 394 f_(uint32_t r, uint32_t kl, uint32_t kr) |
|
Line 394 f_(uint32_t r, uint32_t kl, uint32_t kr) |
|
} |
} |
|
|
/*===========================================================* |
/*===========================================================* |
* BASE CRIPTO |
* BASE CRYPTO |
*===========================================================*/ |
*===========================================================*/ |
void |
void |
des_dec_i( |
des_dec_i( |
Line 520 des_dec_c(const des_key *key, const unsigned char *enc |
|
Line 520 des_dec_c(const des_key *key, const unsigned char *enc |
|
} |
} |
|
|
/*===========================================================* |
/*===========================================================* |
* CRIPTO: length of input data is "64 * n" byte |
* CRYPTO: length of input data is "64 * n" byte |
*===========================================================*/ |
*===========================================================*/ |
static int |
static int |
des_prm_chk(int datalen, int buflen) |
des_prm_chk(int datalen, int buflen) |
Line 557 des_dec_ecb(const des_key *key, int len, const unsigne |
|
Line 557 des_dec_ecb(const des_key *key, int len, const unsigne |
|
|
|
|
|
int |
int |
des_enc_cbc(const des_key *key, const unsigned char *iv, int len, |
des_enc_cbc(const des_key *key, unsigned char *iv, int len, |
const unsigned char *data, unsigned char *buf) |
const unsigned char *data, unsigned char *buf) |
{ |
{ |
int ret; |
int ret; |
Line 569 des_enc_cbc(const des_key *key, const unsigned char *i |
|
Line 569 des_enc_cbc(const des_key *key, const unsigned char *i |
|
|
|
|
|
int |
int |
des_dec_cbc(const des_key *key, const unsigned char *iv, int len, |
des_dec_cbc(const des_key *key, unsigned char *iv, int len, |
const unsigned char *data, unsigned char *buf) |
const unsigned char *data, unsigned char *buf) |
{ |
{ |
int ret; |
int ret; |