int
skeychallenge(
struct skey *mp
, const char *name
, char *ss
, size_t sslen
)
int
skeylookup(
struct skey *mp
, const char *name
)
int
skeygetnext(
struct skey *mp
)
int
skeyverify(
struct skey *mp
, char *response
)
int
skeyzero(
struct skey *mp
, char *response
)
int
getskeyprompt(
struct skey *mp
, char *name
, char *prompt
)
const
char
*
skey_set_algorithm(
const char *new
)
const
char
*
skey_get_algorithm(
void
)
int
skey_haskey(
const char *username
)
const
char
*
skey_keyinfo(
const char *username
)
int
skey_passcheck(
const char *username
, char *passwd
)
int
skey_authenticate(
const char *username
)
void
f(
char *x
)
int
keycrunch(
char *result
, const char *seed
, const char *passwd
)
void
rip(
char *buf
)
char
*
readpass(
char *buf
, int n
)
char
*
readskey(
char *buf
, int n
)
int
atob8(
char *out
, const char *in
)
int
btoa8(
char *out
, const char *in
)
int
htoi(
int c
)
const
char
*
skipspace(
const char *cp
)
void
backspace(
char *buf
)
void
sevenbit(
char *buf
)
char
*
btoe(
char *engout
, const char *c
)
int
etob(
char *out
, const char *e
)
char
*
put8(
char *out
, const char *s
)
Most S/Key operations take a pointer to a struct skey, which should be considered as an opaque identifier.
mp
, name
, ss
, sslen
)
name
.
If successful, the caller's skey structure
mp
is filled and 0 is returned.
If unsuccessful (e.g. if name is unknown),
-1 is returned.
mp
, name
)
name
in the one-time password database.
Returns 0 if the entry is found and 1 if the entry is not found.
If an error occurs accessing the database, -1 is returned.
mp
)
mp
, response
)
response
to a S/Key challenge.
Returns 0 if the verification is successful and 1 if the verification failed.
If an error occurs accessing the database, -1 is returned.
mp
, response
)
mp
, name
, prompt
)
mp
and return 0.
If unsuccessful (e.g. if name is unknown) -1 is returned.
The following lower-level functions are available:
new
)
new
are "md4", "md5" and "sha1".
void
)
username
)
username
exists and 1 if the user doesn't exist.
Returns -1 on file error.
username
)
username
, passwd
)
username
)The following miscellaneous functions are available:
x
)
x
and return 8 bytes in place.
char *result
, const char *seed
, const char *passwd
)
buf
)
buf
.
buf
, n
)
buf
, n
)
out
, in
)
in
to binary array
out
.
Returns 0 on success, -1 on error.
out
, in
)
in
to hex-ascii string
out
.
Returns 0 on success, -1 on error.
int c
)
cp
)
cp
.
buf
)
buf
.
buf
)
buf
is all seven bits.
engout
, c
)
engout
.
out
, e
)
out
, s
)
s
as a series of 16-bit hex digits.
/usr/lib/libskey.a
/usr/lib/libskey.so
/usr/lib/libskey_p.a
The skey library defines many poorly named functions which pollute the name space.