skey.h revision 1.1 1 1.1 deraadt /*
2 1.1 deraadt * S/KEY v1.1b (skey.h)
3 1.1 deraadt *
4 1.1 deraadt * Authors:
5 1.1 deraadt * Neil M. Haller <nmh (at) thumper.bellcore.com>
6 1.1 deraadt * Philip R. Karn <karn (at) chicago.qualcomm.com>
7 1.1 deraadt * John S. Walden <jsw (at) thumper.bellcore.com>
8 1.1 deraadt *
9 1.1 deraadt * Modifications:
10 1.1 deraadt * Scott Chasin <chasin (at) crimelab.com>
11 1.1 deraadt *
12 1.1 deraadt * Main client header
13 1.1 deraadt *
14 1.1 deraadt * $Id: skey.h,v 1.1 1994/05/21 05:46:13 deraadt Exp $
15 1.1 deraadt */
16 1.1 deraadt
17 1.1 deraadt #if defined(__TURBOC__) || defined(__STDC__) || defined(LATTICE)
18 1.1 deraadt #define ANSIPROTO 1
19 1.1 deraadt #endif
20 1.1 deraadt
21 1.1 deraadt #ifndef __ARGS
22 1.1 deraadt #ifdef ANSIPROTO
23 1.1 deraadt #define __ARGS(x) x
24 1.1 deraadt #else
25 1.1 deraadt #define __ARGS(x) ()
26 1.1 deraadt #endif
27 1.1 deraadt #endif
28 1.1 deraadt
29 1.1 deraadt #ifdef SOLARIS
30 1.1 deraadt #define setpriority(x,y,z) z
31 1.1 deraadt #endif
32 1.1 deraadt
33 1.1 deraadt /* Server-side data structure for reading keys file during login */
34 1.1 deraadt struct skey
35 1.1 deraadt {
36 1.1 deraadt FILE *keyfile;
37 1.1 deraadt char buf[256];
38 1.1 deraadt char *logname;
39 1.1 deraadt int n;
40 1.1 deraadt char *seed;
41 1.1 deraadt char *val;
42 1.1 deraadt long recstart; /* needed so reread of buffer is efficient */
43 1.1 deraadt
44 1.1 deraadt
45 1.1 deraadt };
46 1.1 deraadt
47 1.1 deraadt /* Client-side structure for scanning data stream for challenge */
48 1.1 deraadt struct mc
49 1.1 deraadt {
50 1.1 deraadt char buf[256];
51 1.1 deraadt int skip;
52 1.1 deraadt int cnt;
53 1.1 deraadt };
54 1.1 deraadt
55 1.1 deraadt void f __ARGS ((char *x));
56 1.1 deraadt int keycrunch __ARGS ((char *result, char *seed, char *passwd));
57 1.1 deraadt char *btoe __ARGS ((char *engout, char *c));
58 1.1 deraadt char *put8 __ARGS ((char *out, char *s));
59 1.1 deraadt int etob __ARGS ((char *out, char *e));
60 1.1 deraadt void rip __ARGS ((char *buf));
61 1.1 deraadt int skeychallenge __ARGS ((struct skey * mp, char *name, char *ss));
62 1.1 deraadt int skeylookup __ARGS ((struct skey * mp, char *name));
63 1.1 deraadt int skeyverify __ARGS ((struct skey * mp, char *response));
64