You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by indrek siitan <tf...@cafe.ee> on 2000/04/19 20:02:00 UTC

crypt() under windows

Hi,

seems like the standard crypt() function is not implemented
under Windows. :(

does anyone have a perl source, that does the 3DES crypt()
encryption? i only need it for a development version, so the
speed doesn't matter. the production version will run under
Linux and use the standard crypt() call.


Rgds,
  Tfr

  --==< tfr@cafe.ee >==< http://tfr.cafe.ee/ >==< +1-504-4467425 >==-- 

Re: crypt() under windows

Posted by Billy Donahue <bi...@billy.zone.xs2.net>.
On Wed, 19 Apr 2000, indrek siitan wrote:

> Date: Wed, 19 Apr 2000 13:02:00 -0500
> From: indrek siitan <tf...@cafe.ee>
> To: modperl@apache.org, embperl@perl.apache.org
> Subject: crypt() under windows
> 
> Hi,
> 
> seems like the standard crypt() function is not implemented
> under Windows. :(
> 
> does anyone have a perl source, that does the 3DES crypt()
> encryption? i only need it for a development version, so the
> speed doesn't matter. the production version will run under
> Linux and use the standard crypt() call.

Why can't you just snarf it from the libc source?
Ain't this free software stuff great?

--
"The Funk, the whole Funk, and nothing but the Funk."
Billy Donahue <ma...@billy.zone.xs2.net>
http://billy.zone.xs2.net


Re: crypt() under windows

Posted by Billy Donahue <bi...@billy.zone.xs2.net>.
On Wed, 19 Apr 2000, indrek siitan wrote:

> Date: Wed, 19 Apr 2000 13:02:00 -0500
> From: indrek siitan <tf...@cafe.ee>
> To: modperl@apache.org, embperl@perl.apache.org
> Subject: crypt() under windows
> 
> Hi,
> 
> seems like the standard crypt() function is not implemented
> under Windows. :(
> 
> does anyone have a perl source, that does the 3DES crypt()
> encryption? i only need it for a development version, so the
> speed doesn't matter. the production version will run under
> Linux and use the standard crypt() call.

Why can't you just snarf it from the libc source?
Ain't this free software stuff great?

--
"The Funk, the whole Funk, and nothing but the Funk."
Billy Donahue <ma...@billy.zone.xs2.net>
http://billy.zone.xs2.net


Re: crypt() under windows

Posted by Randy Kobes <ra...@theoryx5.uwinnipeg.ca>.
On Thu, 20 Apr 2000, Matt Sergeant wrote:

> On Thu, 20 Apr 2000, Gunther Birznieks wrote:
> 
> > At 09:00 PM 4/19/00 +0100, Matt Sergeant wrote:
> > >On Wed, 19 Apr 2000, Tim Bishop wrote:
> > >
> > > >
> > > > Hi-
> > > >
> > > > We used Martin Vorlaender's Crypt::UnixCrypt module for the same reason
> > > > you need it - no crypt() on Windows.
> > >
> > >Nonesense. Read README.win32 before building your perl.
> > 
> > Curiously, the precompiled Win32 ModPerl that perl.apache.org references 
> > for people to download does not have crypt() compiled in. Yet ActiveState's 
> > binary distribution of build 522 does. Odd.
> > 
> > Is there a reason that the source distributions default build would be 
> > different from ActiveState's default build?
> 
> It was compiled in the US. ActiveState is a Canadian company so can
> distribute crypt(). Someone should probably do a later build of the whole
> shebang anyway about now - volunteers? (preferrably from outside the US?)
> 

I'm building up a Win32 mod_perl/mod_ssl binary, based on
perl-5.6.0, that has crypt built in, like ActiveState's.
And it'll also be coming from Canada. However, among some
other things, the latest CPAN versions of both mod_perl and 
Embperl need some changes to compile with this combination, and 
I'm waiting for these changes to propagate into the next 
official releases.

best regards,
randy kobes



Re: crypt() under windows

Posted by Billy Donahue <bi...@billy.zone.xs2.net>.
On Thu, 20 Apr 2000, Matt Sergeant wrote:

> Date: Thu, 20 Apr 2000 09:11:00 +0100 (BST)
> From: Matt Sergeant <ma...@sergeant.org>
> To: Gunther Birznieks <gu...@extropia.com>
> Cc: modperl@apache.org, embperl@perl.apache.org
> Subject: Re: crypt() under windows
> 
> On Thu, 20 Apr 2000, Gunther Birznieks wrote:
> 
> > At 09:00 PM 4/19/00 +0100, Matt Sergeant wrote:
> > >On Wed, 19 Apr 2000, Tim Bishop wrote:
> > >
> > > >
> > > > Hi-
> > > >
> > > > We used Martin Vorlaender's Crypt::UnixCrypt module for the same reason
> > > > you need it - no crypt() on Windows.
> > >
> > >Nonesense. Read README.win32 before building your perl.
> > 
> > Curiously, the precompiled Win32 ModPerl that perl.apache.org references 
> > for people to download does not have crypt() compiled in. Yet ActiveState's 
> > binary distribution of build 522 does. Odd.
> > 
> > Is there a reason that the source distributions default build would be 
> > different from ActiveState's default build?
> 
> It was compiled in the US. ActiveState is a Canadian company so can
> distribute crypt(). Someone should probably do a later build of the whole
> shebang anyway about now - volunteers? (preferrably from outside the US?)
 

During the QNX crypt fiasco, I heard that the export restrictions
didn't apply to hashing functions.

--
"The Funk, the whole Funk, and nothing but the Funk."
Billy Donahue <ma...@billy.zone.xs2.net>
http://billy.zone.xs2.net


Re: crypt() under windows

Posted by Randy Kobes <ra...@theoryx5.uwinnipeg.ca>.
On Thu, 20 Apr 2000, Matt Sergeant wrote:

> On Thu, 20 Apr 2000, Gunther Birznieks wrote:
> 
> > At 09:00 PM 4/19/00 +0100, Matt Sergeant wrote:
> > >On Wed, 19 Apr 2000, Tim Bishop wrote:
> > >
> > > >
> > > > Hi-
> > > >
> > > > We used Martin Vorlaender's Crypt::UnixCrypt module for the same reason
> > > > you need it - no crypt() on Windows.
> > >
> > >Nonesense. Read README.win32 before building your perl.
> > 
> > Curiously, the precompiled Win32 ModPerl that perl.apache.org references 
> > for people to download does not have crypt() compiled in. Yet ActiveState's 
> > binary distribution of build 522 does. Odd.
> > 
> > Is there a reason that the source distributions default build would be 
> > different from ActiveState's default build?
> 
> It was compiled in the US. ActiveState is a Canadian company so can
> distribute crypt(). Someone should probably do a later build of the whole
> shebang anyway about now - volunteers? (preferrably from outside the US?)
> 

I'm building up a Win32 mod_perl/mod_ssl binary, based on
perl-5.6.0, that has crypt built in, like ActiveState's.
And it'll also be coming from Canada. However, among some
other things, the latest CPAN versions of both mod_perl and 
Embperl need some changes to compile with this combination, and 
I'm waiting for these changes to propagate into the next 
official releases.

best regards,
randy kobes



Re: crypt() under windows

Posted by Billy Donahue <bi...@billy.zone.xs2.net>.
On Thu, 20 Apr 2000, Matt Sergeant wrote:

> Date: Thu, 20 Apr 2000 09:11:00 +0100 (BST)
> From: Matt Sergeant <ma...@sergeant.org>
> To: Gunther Birznieks <gu...@extropia.com>
> Cc: modperl@apache.org, embperl@perl.apache.org
> Subject: Re: crypt() under windows
> 
> On Thu, 20 Apr 2000, Gunther Birznieks wrote:
> 
> > At 09:00 PM 4/19/00 +0100, Matt Sergeant wrote:
> > >On Wed, 19 Apr 2000, Tim Bishop wrote:
> > >
> > > >
> > > > Hi-
> > > >
> > > > We used Martin Vorlaender's Crypt::UnixCrypt module for the same reason
> > > > you need it - no crypt() on Windows.
> > >
> > >Nonesense. Read README.win32 before building your perl.
> > 
> > Curiously, the precompiled Win32 ModPerl that perl.apache.org references 
> > for people to download does not have crypt() compiled in. Yet ActiveState's 
> > binary distribution of build 522 does. Odd.
> > 
> > Is there a reason that the source distributions default build would be 
> > different from ActiveState's default build?
> 
> It was compiled in the US. ActiveState is a Canadian company so can
> distribute crypt(). Someone should probably do a later build of the whole
> shebang anyway about now - volunteers? (preferrably from outside the US?)
 

During the QNX crypt fiasco, I heard that the export restrictions
didn't apply to hashing functions.

--
"The Funk, the whole Funk, and nothing but the Funk."
Billy Donahue <ma...@billy.zone.xs2.net>
http://billy.zone.xs2.net


RE: crypt() under windows

Posted by indrek siitan <tf...@cafe.ee>.
Hi,

> Someone should probably do a later build of the whole
> shebang anyway about now - volunteers? (preferrably from
> outside the US?)

yup, that would be lovely .. if someone's already up to doing
it, it would be even lovelier to have about 3-4 different packages:

(1) the "stable" package - at the moment that means apache 1.3.12,
    perl 5.005.*, mod_perl 1.22, embperl 1.2.1

(2) the "beta" package - apache 2.0a2, perl 5.6, mod_perl 2.0 if 
    that comes out, embperl 2.0 beta if that comes out

(3) my personal wish - the "stable" package with the embperl beta..
    'cause I really like things being stable versions as much as I
    can, but on the other hand I'm really waiting for embperl to 
    become binary-safe


Rgds,
  Tfr

  --==< tfr@cafe.ee >==< http://tfr.cafe.ee/ >==< +1-504-4467425 >==-- 

Re: crypt() under windows

Posted by Matt Sergeant <ma...@sergeant.org>.
On Thu, 20 Apr 2000, Gunther Birznieks wrote:

> At 09:00 PM 4/19/00 +0100, Matt Sergeant wrote:
> >On Wed, 19 Apr 2000, Tim Bishop wrote:
> >
> > >
> > > Hi-
> > >
> > > We used Martin Vorlaender's Crypt::UnixCrypt module for the same reason
> > > you need it - no crypt() on Windows.
> >
> >Nonesense. Read README.win32 before building your perl.
> 
> Curiously, the precompiled Win32 ModPerl that perl.apache.org references 
> for people to download does not have crypt() compiled in. Yet ActiveState's 
> binary distribution of build 522 does. Odd.
> 
> Is there a reason that the source distributions default build would be 
> different from ActiveState's default build?

It was compiled in the US. ActiveState is a Canadian company so can
distribute crypt(). Someone should probably do a later build of the whole
shebang anyway about now - volunteers? (preferrably from outside the US?)

-- 
<Matt/>

Fastnet Software Ltd. High Performance Web Specialists
Providing mod_perl, XML, Sybase and Oracle solutions
Email for training and consultancy availability.
http://sergeant.org http://xml.sergeant.org


Re: crypt() under windows

Posted by Matt Sergeant <ma...@sergeant.org>.
On Thu, 20 Apr 2000, Gunther Birznieks wrote:

> At 09:00 PM 4/19/00 +0100, Matt Sergeant wrote:
> >On Wed, 19 Apr 2000, Tim Bishop wrote:
> >
> > >
> > > Hi-
> > >
> > > We used Martin Vorlaender's Crypt::UnixCrypt module for the same reason
> > > you need it - no crypt() on Windows.
> >
> >Nonesense. Read README.win32 before building your perl.
> 
> Curiously, the precompiled Win32 ModPerl that perl.apache.org references 
> for people to download does not have crypt() compiled in. Yet ActiveState's 
> binary distribution of build 522 does. Odd.
> 
> Is there a reason that the source distributions default build would be 
> different from ActiveState's default build?

It was compiled in the US. ActiveState is a Canadian company so can
distribute crypt(). Someone should probably do a later build of the whole
shebang anyway about now - volunteers? (preferrably from outside the US?)

-- 
<Matt/>

Fastnet Software Ltd. High Performance Web Specialists
Providing mod_perl, XML, Sybase and Oracle solutions
Email for training and consultancy availability.
http://sergeant.org http://xml.sergeant.org


Re: crypt() under windows

Posted by Gunther Birznieks <gu...@extropia.com>.
At 09:00 PM 4/19/00 +0100, Matt Sergeant wrote:
>On Wed, 19 Apr 2000, Tim Bishop wrote:
>
> >
> > Hi-
> >
> > We used Martin Vorlaender's Crypt::UnixCrypt module for the same reason
> > you need it - no crypt() on Windows.
>
>Nonesense. Read README.win32 before building your perl.

Curiously, the precompiled Win32 ModPerl that perl.apache.org references 
for people to download does not have crypt() compiled in. Yet ActiveState's 
binary distribution of build 522 does. Odd.

Is there a reason that the source distributions default build would be 
different from ActiveState's default build?

Admittedly I have never bothered compiling Perl on Win32 as I only use it 
to play with (not serious production for the obvious limitations of 
mod_perl on Win32). So I have not seen the reference to this readme you are 
referring to.


__________________________________________________
Gunther Birznieks (gunther.birznieks@extropia.com)
Extropia - The Web Technology Company
http://www.extropia.com/


Re: crypt() under windows

Posted by Gunther Birznieks <gu...@extropia.com>.
At 09:00 PM 4/19/00 +0100, Matt Sergeant wrote:
>On Wed, 19 Apr 2000, Tim Bishop wrote:
>
> >
> > Hi-
> >
> > We used Martin Vorlaender's Crypt::UnixCrypt module for the same reason
> > you need it - no crypt() on Windows.
>
>Nonesense. Read README.win32 before building your perl.

Curiously, the precompiled Win32 ModPerl that perl.apache.org references 
for people to download does not have crypt() compiled in. Yet ActiveState's 
binary distribution of build 522 does. Odd.

Is there a reason that the source distributions default build would be 
different from ActiveState's default build?

Admittedly I have never bothered compiling Perl on Win32 as I only use it 
to play with (not serious production for the obvious limitations of 
mod_perl on Win32). So I have not seen the reference to this readme you are 
referring to.


__________________________________________________
Gunther Birznieks (gunther.birznieks@extropia.com)
Extropia - The Web Technology Company
http://www.extropia.com/


Re: crypt() under windows

Posted by Rusty Foster <ru...@kuro5hin.org>.
Meta comment: should replies here go to the list by default? I keep
replying only to the author by accident, when I meant to reply only to
the list. This has probably been discussed before... Anyway:

Matt Sergeant wrote:
> 
> On Wed, 19 Apr 2000, Tim Bishop wrote:
> 
> >
> > Hi-
> >
> > We used Martin Vorlaender's Crypt::UnixCrypt module for the same reason
> > you need it - no crypt() on Windows.
> 
> Nonesense. Read README.win32 before building your perl.

Whether it's true or not, if you're going to use crypt() in an
application that you want to have some prayer of being easily
cross-platform, Crypt::UnixCrypt is the way to go. I had trouble moving
my stuff from redhat linux to slackware and FreeBSD, because it's
possible to set up the systems without crypt() (or with a crypt() that
doesn't behave even similarly to the RH linux version, in the case of
BSD). Basically, it's usually pretty important that crypt() work
predictably in your application, if you're going to use it, and at least
a perl-only implementation is predicatable across platforms.

--R


-- 
=======================================================================
|      Rusty Foster       | "You can never entirely stop being what   |
|   rusty@kuro5hin.org    | you once were. That's why it's important  |
|    rusty@intes.net      | to be the right person today, and not put |
| http://www.kuro5hin.org | it off till tomorrow."        -Larry Wall |
=======================================================================

Re: crypt() under windows

Posted by Matt Sergeant <ma...@sergeant.org>.
On Wed, 19 Apr 2000, Tim Bishop wrote:

> 
> Hi-
> 
> We used Martin Vorlaender's Crypt::UnixCrypt module for the same reason
> you need it - no crypt() on Windows.  

Nonesense. Read README.win32 before building your perl.

-- 
<Matt/>

Fastnet Software Ltd. High Performance Web Specialists
Providing mod_perl, XML, Sybase and Oracle solutions
Email for training and consultancy availability.
http://sergeant.org http://xml.sergeant.org


Re: crypt() under windows

Posted by Matt Sergeant <ma...@sergeant.org>.
On Wed, 19 Apr 2000, Tim Bishop wrote:

> 
> Hi-
> 
> We used Martin Vorlaender's Crypt::UnixCrypt module for the same reason
> you need it - no crypt() on Windows.  

Nonesense. Read README.win32 before building your perl.

-- 
<Matt/>

Fastnet Software Ltd. High Performance Web Specialists
Providing mod_perl, XML, Sybase and Oracle solutions
Email for training and consultancy availability.
http://sergeant.org http://xml.sergeant.org


Re: crypt() under windows

Posted by Tim Bishop <ti...@activespace.com>.
Hi-

We used Martin Vorlaender's Crypt::UnixCrypt module for the same reason
you need it - no crypt() on Windows.  

http://search.cpan.org/search?dist=Crypt-UnixCrypt

However we discovered that it is not *exactly* the same as linux crypt().
That is, for some passwords that contained non-alphanumerics in the first
2 character positions, the hash produced by Crypt::UnixCrypt and linux's
crypt() differed.

If you just need something that works similarly to crypt on windows, this
module works well.  But don't use it if you need the hashes to be
portable.

-Tim


On Wed, 19 Apr 2000, indrek siitan wrote:

> Hi,
> 
> seems like the standard crypt() function is not implemented
> under Windows. :(
> 
> does anyone have a perl source, that does the 3DES crypt()
> encryption? i only need it for a development version, so the
> speed doesn't matter. the production version will run under
> Linux and use the standard crypt() call.
> 
> 
> Rgds,
>   Tfr
> 
>   --==< tfr@cafe.ee >==< http://tfr.cafe.ee/ >==< +1-504-4467425 >==-- 
> 


Re: crypt() under windows

Posted by Tim Bishop <ti...@activespace.com>.
Hi-

We used Martin Vorlaender's Crypt::UnixCrypt module for the same reason
you need it - no crypt() on Windows.  

http://search.cpan.org/search?dist=Crypt-UnixCrypt

However we discovered that it is not *exactly* the same as linux crypt().
That is, for some passwords that contained non-alphanumerics in the first
2 character positions, the hash produced by Crypt::UnixCrypt and linux's
crypt() differed.

If you just need something that works similarly to crypt on windows, this
module works well.  But don't use it if you need the hashes to be
portable.

-Tim


On Wed, 19 Apr 2000, indrek siitan wrote:

> Hi,
> 
> seems like the standard crypt() function is not implemented
> under Windows. :(
> 
> does anyone have a perl source, that does the 3DES crypt()
> encryption? i only need it for a development version, so the
> speed doesn't matter. the production version will run under
> Linux and use the standard crypt() call.
> 
> 
> Rgds,
>   Tfr
> 
>   --==< tfr@cafe.ee >==< http://tfr.cafe.ee/ >==< +1-504-4467425 >==-- 
>