]>
jfr.im git - irc/quakenet/newserv.git/blob - lib/helix.h
4 typedef unsigned long WORD
;
5 typedef unsigned char UCHAR
;
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 */
22 h_key(struct helix_ctx
*ctx
, unsigned char *U
, int U_len
);
24 h_nonce(struct helix_ctx
*ctx
, UCHAR nonce
[16]);
26 h_encrypt(struct helix_ctx
*ctx
, UCHAR
*buf
, int n
, UCHAR macbuf
[16]);
28 h_decrypt(struct helix_ctx
*ctx
, UCHAR
*buf
, int n
, UCHAR macbuf
[16]);