Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery

Re^2: Crypt::CBC and varying the key

by Anonymous Monk
on Mar 16, 2006 at 06:57 UTC ( #537062=note: print w/ replies, xml ) Need Help??

in reply to Re: Crypt::CBC and varying the key
in thread Crypt::CBC and varying the key

Yes, I know what CBC is. I *use* CBC. But I want to crypt 2 blocks (not in the sense of the cipher but say strings) of data. The second block has another key from the first one. But the IV is carried over. This is to get two levels of access to the data.

Comment on Re^2: Crypt::CBC and varying the key
Replies are listed 'Best First'.
Re^3: Crypt::CBC and varying the key
by jimbojones (Friar) on Mar 17, 2006 at 20:14 UTC

    It looks like you'll have to modify In my version (2.14), the 'finish' method deletes the current IV.
    delete $self->{'civ'}; delete $self->{'buffer'}; return $result; }
    You'll have to prevent that from happening, and then add a method to return the current (last) IV, instead of the initial IV
    sub get_civ { return $self->{civ}; }
    I have no idea if or how this affects the security of the two messages.

    Hope this helps, J

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://537062]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (4)
As of 2015-11-29 13:48 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (751 votes), past polls