1 /* $Id: acss.h,v 1.2 2004/02/06 04:22:43 dtucker Exp $ */
3 * Copyright (c) 2004 The OpenBSD project
5 * Permission to use, copy, modify, and distribute this software for any
6 * purpose with or without fee is hereby granted, provided that the above
7 * copyright notice and this permission notice appear in all copies.
9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
22 #define ACSS_KEYSIZE 5
25 #define ACSS_AUTHENTICATE 0
26 #define ACSS_SESSIONKEY 1
27 #define ACSS_TITLEKEY 2
30 typedef struct acss_key_st
{
31 unsigned int lfsr17
; /* current state of lfsrs */
34 unsigned char seed
[ACSS_KEYSIZE
];
35 unsigned char data
[ACSS_KEYSIZE
];
36 unsigned char subkey
[ACSS_KEYSIZE
];
37 int encrypt
; /* XXX make these bit flags? */
43 void acss_setkey(ACSS_KEY
*, const unsigned char *, int, int);
44 void acss_setsubkey(ACSS_KEY
*, const unsigned char *);
45 int acss(ACSS_KEY
*, unsigned long, const unsigned char *, unsigned char *);
47 #endif /* ifndef _ACSS_H_ */