tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
From: Andrew Pochinsky <pochinsk () ctpa04 ! mit ! edu>
To: tru64-unix-managers
Subject: SUMMARY: C2 password encryption
Date: Wed, 01 Mar 1995 16:44:21 +0000	[thread overview]
Message-ID: <96075318306344.tru64-unix-managers.marc@archive.invalid> (raw)


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@staffs.ac.uk>
  Clyde Hoover <clyde@motown.cc.utexas.edu>
  Randy M. Hayman  <haymanR@icefog.uacn.alaska.edu>
  Barry Lynam <b.lynam@qut.edu.au>

--
Andrew Pochinsky

                 reply	other threads:[~1995-03-01 16:44 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox