You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Martin Moss <ma...@btopenworld.com> on 2006/04/10 16:33:44 UTC

Crypt::CBC

All,

I had some code which ran the old version of
Crypt::CBC (2.12).

Using these headers to create the object:-

my $cipher = new
Crypt::CBC($ENCRYPTION_KEY,'Blowfish');

I've now built a new machine. Copied the database
values (encrpypted using the above) onto the new
machine DB using mysqldump etc..

However I've found a problem in that the new machine
is built with Crypt::CBC version 2.17..

The above code does not work anymore as I now get the
following error...:-

Ciphertext does not begin with a valid header for
'salt' header mode at /usr/local/lib/perl/.....

I tried doing this:-

my $cipher = new Crypt::CBC(
            -key => $ENCRYPTION_KEY,
            -cipher => 'Crypt::Blowfish',
            -insecure_legacy_decrypt =>1
            -header =>'randomiv'
            -salt =>'1'
                        );

But I still get the error...

Any ideas what on earth I'm supposed to do to be able
to use my old information?

Marty


		
___________________________________________________________ 
NEW Yahoo! Cars - sell your car and browse thousands of new and used cars online! http://uk.cars.yahoo.com/

Re: Crypt::CBC

Posted by Martin Moss <ma...@btopenworld.com>.
Genius:-)  I think for the time being this is the best
way to go...  At least I'm up and running.. But I
presume this is going to bite me in the bum at a later
date...

--- Ian Joyce <ia...@gmail.com> wrote:

> You can always use version 2.12.
> 
> http://search.cpan.org/~lds/Crypt-CBC-2.12/
> 
> --Ian
> 
> 
> On 4/10/06, Martin Moss
> <ma...@btopenworld.com> wrote:
> > All,
> >
> > I had some code which ran the old version of
> > Crypt::CBC (2.12).
> >
> > Using these headers to create the object:-
> >
> > my $cipher = new
> > Crypt::CBC($ENCRYPTION_KEY,'Blowfish');
> >
> > I've now built a new machine. Copied the database
> > values (encrpypted using the above) onto the new
> > machine DB using mysqldump etc..
> >
> > However I've found a problem in that the new
> machine
> > is built with Crypt::CBC version 2.17..
> >
> > The above code does not work anymore as I now get
> the
> > following error...:-
> >
> > Ciphertext does not begin with a valid header for
> > 'salt' header mode at /usr/local/lib/perl/.....
> >
> > I tried doing this:-
> >
> > my $cipher = new Crypt::CBC(
> >             -key => $ENCRYPTION_KEY,
> >             -cipher => 'Crypt::Blowfish',
> >             -insecure_legacy_decrypt =>1
> >             -header =>'randomiv'
> >             -salt =>'1'
> >                         );
> >
> > But I still get the error...
> >
> > Any ideas what on earth I'm supposed to do to be
> able
> > to use my old information?
> >
> > Marty
> >
> >
> >
> >
>
___________________________________________________________
> > NEW Yahoo! Cars - sell your car and browse
> thousands of new and used cars online!
> http://uk.cars.yahoo.com/
> >
> 



		
___________________________________________________________ 
To help you stay safe and secure online, we've developed the all new Yahoo! Security Centre. http://uk.security.yahoo.com

Re: Crypt::CBC

Posted by Ian Joyce <ia...@gmail.com>.
You can always use version 2.12.

http://search.cpan.org/~lds/Crypt-CBC-2.12/

--Ian


On 4/10/06, Martin Moss <ma...@btopenworld.com> wrote:
> All,
>
> I had some code which ran the old version of
> Crypt::CBC (2.12).
>
> Using these headers to create the object:-
>
> my $cipher = new
> Crypt::CBC($ENCRYPTION_KEY,'Blowfish');
>
> I've now built a new machine. Copied the database
> values (encrpypted using the above) onto the new
> machine DB using mysqldump etc..
>
> However I've found a problem in that the new machine
> is built with Crypt::CBC version 2.17..
>
> The above code does not work anymore as I now get the
> following error...:-
>
> Ciphertext does not begin with a valid header for
> 'salt' header mode at /usr/local/lib/perl/.....
>
> I tried doing this:-
>
> my $cipher = new Crypt::CBC(
>             -key => $ENCRYPTION_KEY,
>             -cipher => 'Crypt::Blowfish',
>             -insecure_legacy_decrypt =>1
>             -header =>'randomiv'
>             -salt =>'1'
>                         );
>
> But I still get the error...
>
> Any ideas what on earth I'm supposed to do to be able
> to use my old information?
>
> Marty
>
>
>
> ___________________________________________________________
> NEW Yahoo! Cars - sell your car and browse thousands of new and used cars online! http://uk.cars.yahoo.com/
>

Re: Crypt::CBC

Posted by Holger Kipp <hk...@alogis.com>.
On Mon, Apr 10, 2006 at 03:33:44PM +0100, Martin Moss wrote:
> All,
> 
> I had some code which ran the old version of
> Crypt::CBC (2.12).

> my $cipher = new
> Crypt::CBC($ENCRYPTION_KEY,'Blowfish');

> However I've found a problem in that the new machine
> is built with Crypt::CBC version 2.17..
> 
> The above code does not work anymore as I now get the
> following error...:-
> 
> Ciphertext does not begin with a valid header for
> 'salt' header mode at /usr/local/lib/perl/.....
> 
> I tried doing this:-
> 
> my $cipher = new Crypt::CBC(
>             -key => $ENCRYPTION_KEY,
>             -cipher => 'Crypt::Blowfish',
>             -insecure_legacy_decrypt =>1
>             -header =>'randomiv'
>             -salt =>'1'
>                         );

maybe you should try

my $cipher = new Crypt::CBC(
              -key => $ENCRYPTION_KEY,
              -cipher => 'Blowfish',
              -salt => 0
             );

to not use salt then.

Regards,
Holger Kipp