]> jfr.im git - irc/quakenet/newserv.git/blob - lib/helix.h
Add debugging info to pqsql.
[irc/quakenet/newserv.git] / lib / helix.h
1 #ifndef __helix_H
2 #define __helix_H
3
4 typedef unsigned long WORD;
5 typedef unsigned char UCHAR;
6
7 #define NONCE_LEN 16
8 #define MAC_LEN 16
9
10 /* HELIX variables */
11 typedef struct helix_ctx {
12 WORD h_iplus8[2]; /* block number maintained in two parts */
13 WORD K[8]; /* expanded key */
14 WORD N[8]; /* expanded nonce */
15 int l_u; /* length of user key */
16 WORD A, B, C, D, E; /* Z_0..Z_4 in the paper */
17 } helix_ctx;
18
19 #undef TEST
20
21 void
22 h_key(struct helix_ctx *ctx, unsigned char *U, int U_len);
23 void
24 h_nonce(struct helix_ctx *ctx, UCHAR nonce[16]);
25 void
26 h_encrypt(struct helix_ctx *ctx, UCHAR *buf, int n, UCHAR macbuf[16]);
27 void
28 h_decrypt(struct helix_ctx *ctx, UCHAR *buf, int n, UCHAR macbuf[16]);
29
30 #endif