FutureQuest, Inc. FutureQuest, Inc. FutureQuest, Inc.

FutureQuest, Inc.
Go Back   FutureQuest Community > General Site Owner Support (All may read/respond) > PHP, Perl, Python and/or MySQL
User Name
Password  Lost PW

Reply
 
Thread Tools Search this Thread Display Modes
Old 06-03-1999, 02:04 PM   Postid: 42651
SneakyDave
Fond of TAZ
 
SneakyDave's Avatar

Forum Notability:
93 pts: Helpful Contributor
[Post Feedback]
 
Join Date: Feb 1999
Posts: 919
Encrypt / Decrypt Unsupported Function?

I'm just trying a few things with encrypt() and decrypt() in PHP, and I'm getting Unsupported function errors referencing them?

Here's the code:

Code Sample:

<?
$mess = &quot;just a message&quot;;
$passwd = &quot;password&quot;;
$data = encrypt($mess,0,$passwd);
print(decrypt($data,0,$passwd));
?>




Is there anything obviously wrong? Thanks
Sneaky
SneakyDave is offline   Reply With Quote
Old 06-03-1999, 02:38 PM   Postid: 42652
SneakyDave
Fond of TAZ
 
SneakyDave's Avatar

Forum Notability:
93 pts: Helpful Contributor
[Post Feedback]
 
Join Date: Feb 1999
Posts: 919
I just RTFM, and noticed that it doesn't even list functions for encrypt or decrypt, just crypt, although the book demonstrates uses of all three.
SneakyDave is offline   Reply With Quote
Old 06-03-1999, 05:43 PM   Postid: 42653
Justin
Visitor
 
Justin's Avatar

Forum Notability:
0 pts:
[Post Feedback]
 
Join Date: Jan 1999
Location: Kissimmee, FL
Posts: 3,672
crypt() is a one way street and I *think* it's the same as htpasswd's encryption (using Unix/Linux crypt function). Encrypt and decrypt I think are part of a library or module or something...

Also note that on Windows, crypt() does squat

------------------
Justin Nelson
FutureQuest Support
Justin is offline   Reply With Quote
Old 06-03-1999, 06:59 PM   Postid: 42654
Charles Capps
Registered User

Forum Notability:
10 pts: User-friendly
[Post Feedback]
 
Join Date: Mar 1999
Location: Seattle, WA
Posts: 1,059
Justin: Even with the crypt module enabled?
------------------
"Okay, so I'm not "SANE" so to speak, but uh... I'm the lovable kind of psycho"
http://solareclipse.net/
Charles Capps is offline   Reply With Quote
Old 06-03-1999, 08:37 PM   Postid: 42655
Justin
Visitor
 
Justin's Avatar

Forum Notability:
0 pts:
[Post Feedback]
 
Join Date: Jan 1999
Location: Kissimmee, FL
Posts: 3,672
I tried that on my system, and it still will not work... I'm not sure why, but I do know that for .htaccess protected directories there is no encryption on the passwords (which sucks) - I'm sure NT has some form of encryption... then again, maybe not...

------------------
Justin Nelson
FutureQuest Support
Justin is offline   Reply With Quote
Old 06-03-1999, 10:20 PM   Postid: 42656
SneakyDave
Fond of TAZ
 
SneakyDave's Avatar

Forum Notability:
93 pts: Helpful Contributor
[Post Feedback]
 
Join Date: Feb 1999
Posts: 919
Yeah, for now, I'm just crypting a person's password with a salt and storing it in a file. When they need access again, I'll encrypt their password and compare it to the encrypted password in the file. The only problem (or feature) is that you can't decrypt a password using crypt(). I think its just standard DES encryption, isn't it?
SneakyDave is offline   Reply With Quote
Old 06-03-1999, 10:38 PM   Postid: 42657
 Terra
CTO FutureQuest, Inc.
 
Terra's Avatar
 
Join Date: Jun 1998
Location: Z'ha'dum
Posts: 7,674
nope...  crypt() was designed to be a one-way hash, with no decryption methods other than brute force...  crypt is pretty darn good that there are no known cryptoanalysis methods to undo it...

In parlance, it has 4092 permutations driven by the salt and takes brute force (stepping through every possible value) to find the plaintext...  You can also run dictionaries against it, as most people use common words...

Even corrupted (b0rk3d) passwords don't stand up well to dictionary cracks, cause most of the crackers are coded specifically to h4nd13 such w0rd5...

--
Terra
--Official member of the rat race--
FutureQuest
Terra is offline   Reply With Quote
Old 06-04-1999, 02:34 AM   Postid: 42658
 Terra
CTO FutureQuest, Inc.
 
Terra's Avatar
 
Join Date: Jun 1998
Location: Z'ha'dum
Posts: 7,674
Hehehehe!

http://www.leonatkinson.com/index.ph...ng_book_errata

--
Terra
--Oooops--
FutureQuest
Terra is offline   Reply With Quote
Old 06-04-1999, 08:50 AM   Postid: 42659
SneakyDave
Fond of TAZ
 
SneakyDave's Avatar

Forum Notability:
93 pts: Helpful Contributor
[Post Feedback]
 
Join Date: Feb 1999
Posts: 919
There's (sort of) a BUG in the BOOK?

Thanks Terra!

Sneaky
SneakyDave is offline   Reply With Quote
Old 06-04-1999, 01:42 PM   Postid: 42662
SneakyDave
Fond of TAZ
 
SneakyDave's Avatar

Forum Notability:
93 pts: Helpful Contributor
[Post Feedback]
 
Join Date: Feb 1999
Posts: 919
Thanks, I think just crypt() will work for now, and I'll take a look into PGP later.

I've got some governement nuclear bomb designs I'm trying to smuggle to China.

Sneaky
SneakyDave is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 visitors)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -4. The time now is 04:42 PM.


Running on vBulletin®
Copyright © 2000 - 2013, Jelsoft Enterprises Ltd.
Hosted & Administrated by FutureQuest, Inc.
Images & content copyright © 1998-2013 FutureQuest, Inc.
FutureQuest, Inc.