Annotation of OpenXM/src/ox_ntl/crypt/des/des.h, Revision 1.3
1.3 ! iwane 1: /* $OpenXM: OpenXM/src/ox_ntl/crypt/des/des.h,v 1.2 2004/09/20 00:10:24 iwane Exp $ */
1.1 iwane 2: /*
3: * FIPS PUB 46-3
4: * DATA ENCRYPTION STANDARD
5: */
6:
7:
8: #ifndef __DES_H__
9: #define __DES_H__
10:
1.2 iwane 11: #include <inttypes.h>
1.1 iwane 12:
13: typedef struct {
14: union {
15: uint32_t ui[2];
16: unsigned char ks[8];
17: } key;
18: } des_key;
19:
20: #ifdef __cplusplus
21: extern "C" {
22: #endif
23:
24: int des_keychk(des_key *);
25: void des_keyset(const unsigned char *key, des_key *);
26:
27: int des_enc_c(const des_key *, const unsigned char *, unsigned char *);
28: int des_dec_c(const des_key *, const unsigned char *, unsigned char *);
29:
30:
31: int des_enc_ecb(const des_key *, int len, const unsigned char *, unsigned char *);
32: int des_dec_ecb(const des_key *, int len, const unsigned char *, unsigned char *);
33:
1.3 ! iwane 34: int des_enc_cbc(const des_key *, unsigned char *, int len, const unsigned char *, unsigned char *);
! 35: int des_dec_cbc(const des_key *, unsigned char *, int len, const unsigned char *, unsigned char *);
1.1 iwane 36:
37: int des_enc_cfb(const des_key *, int bit, const unsigned char *iv, int len, const unsigned char *, unsigned char *);
38: int des_dec_cfb(const des_key *, int bit, const unsigned char *iv, int len, const unsigned char *, unsigned char *);
39:
40: int des_ofb(const des_key *, int bit, const unsigned char *iv, int len, const unsigned char *, unsigned char *);
41:
42: #ifdef __cplusplus
43: }
44: #endif
45:
46: #endif /* __DES_H__ */
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>