My original question was:
>  I'm looking for a procedure converting the plaintext password to the
> auth-entry password string under C2. The DEC OSF/1 Enhanced Security
> manual seems to be quite obscure on this issue. What it says is that
> the password is encrypted using the crypt(3) routine in 8-characters
> blocks. What is does not say is which salt is used in encyphering all
> blocks but the first one. I tried using the same salt and the last two
> characters from the previous block -- neither works.
> 
I've got 4 replies all recommending undocumented bigcrypt(). It has
the same interface as crypt(3) but some wrapping was needed to make it
really work. The following procedure does the trick:
#include <sia.h>
#include <siad.h>
char *C2_crypt(char *txt, char *salt)
{
  extern char *bigcrypt(char *, char *);
  SIAENTITY *entity;
  static char *argv[] = {"crypt", 0};
  char *pwd;
  sia_ses_init(&entity, 1, argv, NULL, "crypt", NULL, FALSE, NULL);
  pwd = bigcrypt(txt, salt);
  entity = NULL;
  sia_ses_release(&entity);
  return pwd;
}
And, of course, the security library is needed.
Thanks to:
  Richard Rogers <cstrmr_at_staffs.ac.uk>
  Clyde Hoover <clyde_at_motown.cc.utexas.edu>
  Randy M. Hayman  <haymanR_at_icefog.uacn.alaska.edu>
  Barry Lynam <b.lynam_at_qut.edu.au>
--
Andrew Pochinsky
Received on Wed Mar 01 1995 - 11:45:08 NZDT