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