Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > de-crypt... crypt

Reply
Thread Tools

de-crypt... crypt

 
 
asg
Guest
Posts: n/a
 
      12-23-2005
Does anyone know if there is a way to de-crypt using...
$field = crypt ($field, $salt);
any help is appreciated.
regards

 
Reply With Quote
 
 
 
 
takarov2003@yahoo.com
Guest
Posts: n/a
 
      12-23-2005

asg wrote:
> Does anyone know if there is a way to de-crypt using...
> $field = crypt ($field, $salt);
> any help is appreciated.
> regards


generaly, by exhaustive trial. crypt is one-way.

 
Reply With Quote
 
 
 
 
Brian Wakem
Guest
Posts: n/a
 
      12-23-2005
asg wrote:

> Does anyone know if there is a way to de-crypt using...
> $field = crypt ($field, $salt);
> any help is appreciated.
> regards



Crypt is one way, but if you have enough time or the password is poor (I
assume we are talking usernames/passwords here) then you can do it.


# perl -e 'print "username:" . crypt("password","username") . "\n"' > file
# ./john file
Loaded 1 password (Standard DES [24/32 4K])
password (username)
guesses: 1 time: 0:00:00:00 100% (2) c/s: 336 trying: 12345 - robert


'john' craked it in under a second.

See http://www.openwall.com/john/ for more.



--
Brian Wakem
Email: http://homepage.ntlworld.com/b.wakem/myemail.png
 
Reply With Quote
 
usenet@DavidFilmer.com
Guest
Posts: n/a
 
      12-23-2005
asg wrote:
> Does anyone know if there is a way to de-crypt using...
> $field = crypt ($field, $salt);


There's not an "uncrypt" function or any such thing. One of the
"problems" is that many (infinite, I believe) different strings can
produce the same encrypted hash value. Since a crypt value is only a
few bytes long, but it must be able to represent values which are
longer, it is obvious that there must be a many-to-one relationship
between plaintext strings and encrypted values.

As others have pointed out, a brute-force approach may work. Oddly
enough, it's possible to find a plaintext password which will "work"
but not actually be the same password that was used to create the
hashed value!

 
Reply With Quote
 
 
 
Reply

Thread Tools

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to re-implement the crypt.crypt function? Cosmia Luna Python 4 03-11-2012 10:10 AM
LWP, Crypt-SSLeay, CLI vs. WWW JD Vernon Perl 0 02-24-2004 05:14 PM
Crypt::TripleDES doesn't work with perl 5.8 (Linux) Jonas Perl 0 10-10-2003 09:47 AM
Error using Crypt::OpenSSL::RSA - Fails loading public key - Help needed John Bergstrom Perl 0 08-03-2003 12:22 AM
Crypt RSA install (Problem with Crypt::Primes) AdrianK Perl 0 07-09-2003 09:32 AM



Advertisments