NOTARY(3)

NAME
xs, enroll, verify, reverify, keynotary - certification functions

SYNOPSIS
char *xs(char *key, char *buf, int n)
enroll(char *name, char *oldkey, char *newkey)
verify(char *name, char *xsum, char *buf, int n)
rverify(char *name, char *xsum, char *buf, int n)
keynotary(char *key1, char *key2)

DESCRIPTION

All these functions except xs must be linked with option -lipc of ld(1).

Xs composes a cryptographic checksum of the n characters starting at buf. The key argument points to an 8-character checksumming key. A pointer is returned to a null-terminated ASCII checksum.

Enroll registers a checksumming key for user name with notary(1), only one checksumming key per user name at a time. On first registry the oldkey argument is ignored. On subsequent registries, the oldkey argument must match the currently stored checksumming key. The new checksumming key is newkey; if newkey is trivial, name is deregistered.

Verify consults the notary oracle to check the validity of a checksum composed by xs. A non zero return value signifies that the checksum was calculated using the checksumming key registered with the notary oracle as belonging to user name. Rverify does what verify does, but leaves the connection to the oracle open until presented with a NULL value for name. Hence, subsequent calls to rverify should be quicker.

Keynotary is used to tell the notary daemon the key for its private encrypted data. Key1 is the key the data is currently encrypted with; key2 (if nonzero) is the key to use in the future. A file descriptor is returned, from which diagnostic information may be read.

SEE ALSO
notary(1), ipc(3)

DIAGNOSTICS
Verify and enroll return zero on failure, otherwise nonzero.