Re: CBC::CRYPT

[email protected] ("Sisyphus") Thu, 10 Oct 2002 14:25:14 +1000
Newsgroups perl.crypto
Message-ID <016e01c27015$0c165710$8ab0dccb@sisyphusii330h>
----- Original Message -----
From: "Erik Sjöberg" <[email protected]>
To: <[email protected]>
Sent: Thursday, October 10, 2002 1:29 PM
Subject: CBC::CRYPT


> Hi !
>
> I have a problem with the implementation of the CBC/DES-encryption in my
> programs.
> I have a server and a client. The idea is that the client shall send an
> encrypted message containing an XML-document.

How are the contents of the document being read in ?
Sounds like perhaps you need to be using:
       $cipher->start('encrypting');
       $cipher->start('decrypting');

(perldoc crypt::cbc)

You might find examples included in the crypt::cbc tarball from cpan
(http://search.cpan.org), or the test suite it contains might contain some
useful code. (You miss out on all of that stuff when you install with ppm.)

I ran your scripts (with the xml stuff removed from the server script) and
they worked fine.

Perhaps there's a problem with the xml parsing/encoding ?

Hth.

Cheers,
Rob