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