[comp.lang.c] UNIX-like crypt function

wsinpvb@eutrc3.urc.tue.nl (p.v.bemmelen) (08/17/89)

I am writing a program on a UNIX system that uses the crypt() function.
Now I want to port this program to MS-DOS, but the problem is that I don't
have a crypt() function, (source or object code).
Who can help me obtain a crypt() function ?? One that runs faster than the
standard unix one would also be welcome to speed up the UNIX version as well.

Greetings,

wsinpvb@eutrc3.UUCP
wsinpvb@eutrc3.urc.tue.nl

hinton@netcom.UUCP (Greg Hinton) (08/18/89)

In article <855@eutrc3.urc.tue.nl> wsinpvb@eutrc3.urc.tue.nl (p.v.bemmelen) writes:
>Who can help me obtain a crypt() function ?? One that runs faster than the
>standard unix one would also be welcome to speed up the UNIX version as well.


I believe Robert T. Morris has just what you're looking for! :-)
-- 
Greg Hinton
INET: hinton@netcom.uucp
UUCP: ...!uunet!apple!netcom!hinton

nghiem@walt.cc.utexas.edu (Alex Nghiem) (08/20/89)

[request for crypt function]

Didn't I read somewhere that Unix encryption was restricted to
U.S.A. and not for export? What happens if the function gets
in the "wrong" hands through the network?


nghiem@walt.cc.utexas.edu
!cs.utexas.edu!ut-emx!walt!nghiem

roy@phri.UUCP (Roy Smith) (08/20/89)

In  <17369@ut-emx.UUCP> nghiem@walt.cc.utexas.edu (Alex Nghiem) writes:
> What happens if [crypt()] gets in the "wrong" hands through the network?

	The ruskies will then be able to decode all of our secret military
transmissions, bringing about the fall of democracy as we know it today and
subjecting the entire planet to the dominance of the evil empire.
-- 
Roy Smith, Public Health Research Institute
455 First Avenue, New York, NY 10016
{att,philabs,cmcl2,rutgers,hombre}!phri!roy -or- roy@alanine.phri.nyu.edu
"The connector is the network"

dts@quad.uucp (David T. Sandberg) (08/21/89)

In article <3947@phri.UUCP> roy@phri.UUCP (Roy Smith) writes:
:In  <17369@ut-emx.UUCP> nghiem@walt.cc.utexas.edu (Alex Nghiem) writes:
:> What happens if [crypt()] gets in the "wrong" hands through the network?
:
:	The ruskies will then be able to decode all of our secret military
:transmissions, bringing about the fall of democracy as we know it today and
:subjecting the entire planet to the dominance of the evil empire.

Not to mention that the Colonel's secret fried chicken recipe would be
placed in grave danger!

-- 
                                  David Sandberg - Quadric Systems
  "Strike Hard, Strike Sure"      PSEUDO: dts@quad.uucp
    Bomber Command, R.A.F.        ACTUAL: ..uunet!rosevax!sialis!quad!dts

amb@cs.columbia.edu (Andrew Boardman) (08/22/89)

In article <17369@ut-emx.UUCP> nghiem@walt.cc.utexas.edu (Alex Nghiem) writes:
>Didn't I read somewhere that Unix encryption was restricted to
>U.S.A. and not for export? What happens if the function gets
>in the "wrong" hands through the network?

Not a lot.  Picture this: person who is in another country with his
machine on the Internet ftp's the appropriate crypt binary (or source
if he has it) via one of his accounts in the US.  It's quite probably
happened quite a few times; it's not a high-security item.  It's just
Officially Frowned Upon for some terribly good reason which escapes me
at the moment.  (This last bit was explained to me by an ex-NSA friend
who's now at DEC of all places.)

Andrew Boardman
amb@cs.columbia.edu
(for those that must, ab4@cunixc on bitnet) 

gwyn@smoke.BRL.MIL (Doug Gwyn) (08/22/89)

In article <17369@ut-emx.UUCP> nghiem@walt.cc.utexas.edu (Alex Nghiem) writes:
>Didn't I read somewhere that Unix encryption was restricted to
>U.S.A. and not for export? What happens if the function gets
>in the "wrong" hands through the network?

Nothing happens.  The UNIX crypt routines (all of them) have long been
in the "wrong hands".  The export restriction applies to software vendors,
primarily because they haven't been able to obtain blanket export licenses
from the Commerce Dept. and the cost of doing them one at a time is
prohibitive.

wvenable@spam.ua.oz (Bill Venables) (08/23/89)

In article <10793@smoke.BRL.MIL> gwyn@brl.arpa (Doug Gwyn) writes:
> In article <17369@ut-emx.UUCP> nghiem@walt.cc.utexas.edu (Alex Nghiem) writes:
>>Didn't I read somewhere that Unix encryption was restricted to
>>U.S.A. and not for export? What happens if the function gets
>>in the "wrong" hands through the network?
>
> Nothing happens.  The UNIX crypt routines (all of them) have long been
> in the "wrong hands".
[...]

 Let me confirm (although noone seems to doubt it) that the crypt() facility
 is not available on UNIX machines in Australia, and I must say I find this
 circumstance, although petty, a rather gratuitous insult from Uncle Sam.

 wnv.
-- 
  Dr. W. N. Venables, Dept. Statistics,   | ACSnet:     wvenable@spam.ua.oz.au
  Univ. of Adelaide,  South Australia.    |

gwyn@smoke.BRL.MIL (Doug Gwyn) (08/23/89)

In article <164@spam.ua.oz> wvenable@spam.oz.au (Bill Venables) writes:
> Let me confirm (although noone seems to doubt it) that the crypt() facility
> is not available on UNIX machines in Australia, and I must say I find this
> circumstance, although petty, a rather gratuitous insult from Uncle Sam.

It may not be distributed in commercial releases, but I guarantee that
some UNIX system in Australia does have all the usual UNIX crypt code,
obtained at a time when nobody was paying much attention to this matter.

I don't think Uncle Sam was trying to be insulting, just bureaucrats
applying rules blindly rather than judging situations on their own merits.

ruud@targon.UUCP (Ruud Harmsen) (08/23/89)

In article <164@spam.ua.oz> wvenable@spam.oz.au (Bill Venables) writes:
> Let me confirm (although noone seems to doubt it) that the crypt() facility
> is not available on UNIX machines in Australia, and I must say I find this
> circumstance, although petty, a rather gratuitous insult from Uncle Sam.
>
I presume you are talking about the PROGRAM crypt (in section 1 of the man-
pages), whereas other had the SUBROUTINE crypt(3) in mind.
These two, despite their names, HAVE NOTHING TO DO with each other!

crypt(3) is available on all UNIXes (though not as source), crypt(1) is not.

trt@rti.UUCP (Thomas Truscott) (08/24/89)

In article <605@targon.UUCP>, ruud@targon.UUCP (Ruud Harmsen) writes:
> In article <164@spam.ua.oz> wvenable@spam.oz.au (Bill Venables) writes:
> crypt(3) is available on all UNIXes (though not as source), crypt(1) is not.

... and this is particularly amusing since crypt(3) uses a powerful encryption
method (DES) whereas crypt(1) uses a much simpler and weaker method.

But "they" have spoken.  crypt(1) must not escape from the USA.
Of course people within the USA are permitted to use it.
People outside the USA will have to be content with reading
the 1984 AT&T Bell Laboratories Technical Journal which explains
how to break the encryption!
	Tom Truscott

prc@erbe.se (Robert Claeson) (08/24/89)

In article <10802@smoke.BRL.MIL> gwyn@brl.arpa (Doug Gwyn) writes:
>In article <164@spam.ua.oz> wvenable@spam.oz.au (Bill Venables) writes:
>> Let me confirm (although noone seems to doubt it) that the crypt() facility
>> is not available on UNIX machines in Australia, and I must say I find this
>> circumstance, although petty, a rather gratuitous insult from Uncle Sam.

>It may not be distributed in commercial releases, but I guarantee that
>some UNIX system in Australia does have all the usual UNIX crypt code,
>obtained at a time when nobody was paying much attention to this matter.

You get it if you buy a UNIX source license. Some computer companies in
Europe distributes both the crypt command and the library function with
the UNIX'es for their box'es. And many (some?) U.S. computer manufacturers
provides the crypt function in the library, even though they not always
includes the crypt command.

-- 
          Robert Claeson      E-mail: rclaeson@erbe.se
	  ERBE DATA AB

richard@aiai.ed.ac.uk (Richard Tobin) (08/25/89)

In article <10802@smoke.BRL.MIL> gwyn@brl.arpa (Doug Gwyn) writes:
>In article <164@spam.ua.oz> wvenable@spam.oz.au (Bill Venables) writes:
>> Let me confirm (although noone seems to doubt it) that the crypt() facility
>> is not available on UNIX machines in Australia [...]
>
>It may not be distributed in commercial releases, but I guarantee that
>some UNIX system in Australia does have all the usual UNIX crypt code,
>obtained at a time when nobody was paying much attention to this matter.

All the Unix systems I've seen in the UK have the crypt() library
function.  What recent ones don't have is the crypt *program*.  It would
be very awkward if the function were removed, since it is used for
passwords.  The source for the program crypt has been posted to the net
at least once (in the crypt-breakers workbench).

As I understand it, the crypt() function implements the DES algorithm
(modified by the presence of the salt).  The crypt program uses an
enigma-type encoding, after using crypt() (indirectly through the
trivial program makekey) to generate a key from the password.

All this seems a bit strange, since I'd have thought that DES was the
thing that might not be exportable...

-- Richard
-- 
Richard Tobin,                       JANET: R.Tobin@uk.ac.ed             
AI Applications Institute,           ARPA:  R.Tobin%uk.ac.ed@nsfnet-relay.ac.uk
Edinburgh University.                UUCP:  ...!ukc!ed.ac.uk!R.Tobin

carlp@frigg.iscs.com (Carl Paukstis) (08/25/89)

In article <605@targon.UUCP> ruud@targon.UUCP (Ruud Harmsen) writes:
>
>crypt(3) is available on all UNIXes (though not as source), crypt(1) is not.
                          ^^^
"Always avoid over-generalizing."  I recall that we had some rather
interesting discussions with the commerce department on this subject.
The "International" version of the stuff WE send out most emphatically
does NOT include the crypt(3) function.  That's basically the ONLY
reason we HAVE a separate "International" version.  I'm not aware of
what we did for password encryption, but it's not the standard
encryption, or DES, or anything else which qualifies as encryption
technology.

It doesn't have to make sense, it's the LAW.  Or the rule with force of
law.  "I'm from the government and I'm here to help you."

--
Carl Paukstis       "I'm the NRA"      |  DOMAIN:  carlp@frigg.ISCS.COM   
   NOTE preferred mail address change, |  UUCP:    ...!uunet!iscuva!frigg!carlp
   although the old one will forward.  |  Ma Bell: +1 509 927-5439
We'll be changing DOMAIN name shortly to "ISC-BR.COM".  Ya gotta love a merger!

cudcv@warwick.ac.uk (Rob McMahon) (08/26/89)

In article <605@targon.UUCP> ruud@targon.UUCP (Ruud Harmsen) writes:
>crypt(3) is available on all UNIXes (though not as source), crypt(1) is not.

Nope.  SunOS 2.0 doesn't have crypt(3) either.  Rob
-- 
UUCP:   ...!mcvax!ukc!warwick!cudcv	PHONE:  +44 203 523037
JANET:  cudcv@uk.ac.warwick             ARPA:   cudcv@warwick.ac.uk
Rob McMahon, Computing Services, Warwick University, Coventry CV4 7AL, England

karl@haddock.ima.isc.com (Karl Heuer) (08/28/89)

In article <2606@iscuva.ISCS.COM> carlp@frigg.iscs.COM (Carl Paukstis) writes:
>The "International" version of the stuff WE send out most emphatically
>does NOT include the crypt(3) function.

This must be the legendary implementation that stores passwords using rot-13.

:-)

Karl W. Z. Heuer (ima!haddock!karl or karl@haddock.isc.com), The Walking Lint

jourdan@seti.inria.fr (Martin Jourdan) (08/28/89)

In article <183@titania.warwick.ac.uk> cudcv@warwick.ac.uk (Rob McMahon) writes:
> In article <605@targon.UUCP> ruud@targon.UUCP (Ruud Harmsen) writes:
> >crypt(3) is available on all UNIXes (though not as source), crypt(1) is not.
> 
> Nope.  SunOS 2.0 doesn't have crypt(3) either.  Rob

But our SunOS 3.4 does have it, even in France; however it does not
have the crypt(1) program nor the manual page for crypt(3).  (BTW: I
would be interested in it; can someone mail me the nroff source?  Many
thanks in advance.)  Look in /lib/libc.a; maybe all what you lack is
the man page also...
-- 

Martin Jourdan <jourdan@minos.inria.fr>, INRIA, Rocquencourt, France.
My employers have no opinion and they guarantee my freedom of expression.