source: trunk/third/moira/util/rsaref/des.h @ 23095

Revision 23095, 2.0 KB checked in by ghudson, 16 years ago (diff)
Import the moira package from SIPB Debathena.
Line 
1/* DES.H - header file for DESC.C
2 */
3
4#ifndef _DES_H_
5#define _DES_H_ 1
6
7#ifdef __cplusplus
8extern "C" {
9#endif
10
11typedef struct {
12  UINT4 subkeys[32];                                             /* subkeys */
13  UINT4 iv[2];                                       /* initializing vector */
14  UINT4 originalIV[2];                        /* for restarting the context */
15  int encrypt;                                               /* encrypt flag */
16} DES_CBC_CTX;
17
18typedef struct {
19  UINT4 subkeys[32];                                             /* subkeys */
20  UINT4 iv[2];                                       /* initializing vector */
21  UINT4 inputWhitener[2];                                 /* input whitener */
22  UINT4 outputWhitener[2];                               /* output whitener */
23  UINT4 originalIV[2];                        /* for restarting the context */
24  int encrypt;                                              /* encrypt flag */
25} DESX_CBC_CTX;
26
27typedef struct {
28  UINT4 subkeys[3][32];                     /* subkeys for three operations */
29  UINT4 iv[2];                                       /* initializing vector */
30  UINT4 originalIV[2];                        /* for restarting the context */
31  int encrypt;                                              /* encrypt flag */
32} DES3_CBC_CTX;
33
34void DES_CBCInit PROTO_LIST
35  ((DES_CBC_CTX *, unsigned char *, unsigned char *, int));
36int DES_CBCUpdate PROTO_LIST
37  ((DES_CBC_CTX *, unsigned char *, unsigned char *, unsigned int));
38void DES_CBCRestart PROTO_LIST ((DES_CBC_CTX *));
39
40void DESX_CBCInit PROTO_LIST
41  ((DESX_CBC_CTX *, unsigned char *, unsigned char *, int));
42int DESX_CBCUpdate PROTO_LIST
43  ((DESX_CBC_CTX *, unsigned char *, unsigned char *, unsigned int));
44void DESX_CBCRestart PROTO_LIST ((DESX_CBC_CTX *));
45
46void DES3_CBCInit PROTO_LIST
47  ((DES3_CBC_CTX *, unsigned char *, unsigned char *, int));
48int DES3_CBCUpdate PROTO_LIST
49  ((DES3_CBC_CTX *, unsigned char *, unsigned char *, unsigned int));
50void DES3_CBCRestart PROTO_LIST ((DES3_CBC_CTX *));
51
52#ifdef __cplusplus
53}
54#endif
55
56#endif
Note: See TracBrowser for help on using the repository browser.