wildmandnd has asked for the wisdom of the Perl Monks concerning the following question:
I know the blowfish key. I know the string that was encrypted. I know the final encrypted packet. But if i decrypt it with perl Blowfish, or encrypt initial packet - it does not work, result is trash.use Blowfish; $blowfishkey=pack("H*",'5b3b272e5d39342d33313d3d2d252640215e2b5d00'); $packet = pack("H*",'071bdba4419a1e4e'); $cipher = new Crypt::Blowfish $blowfishkey; print "Key: $blowfishkey\n"; print "Crypted packet: $packet\n"; $packet = $cipher->decrypt($packet); print "Decrypted packet: $packet\n"; $packet = "\x00WildMaN"; print "Initial known packet: $packet\n"; $packet = $cipher->encrypt($packet); print "Should be encrypted as: $packet\n";
20040915 Edit by castaway: Changed title from 'Problem with Blowfish'
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Rountrip through Crypt::Blowfish corrupts data?
by hv (Prior) on Sep 14, 2004 at 12:31 UTC | |
|
Re: Rountrip through Crypt::Blowfish corrupts data?
by zentara (Cardinal) on Sep 14, 2004 at 14:05 UTC | |
|
Re: Rountrip through Crypt::Blowfish corrupts data?
by tachyon (Chancellor) on Sep 15, 2004 at 07:39 UTC | |
by wildmandnd (Initiate) on Sep 15, 2004 at 09:50 UTC |