[pycrypto] DES3 problem
Dave Pawson
dave.pawson at gmail.com
Sat Nov 30 01:09:02 PST 2013
On 29 November 2013 20:16, Legrandin <helderijs at gmail.com> wrote:
> Hi,
>
> Since a cipher object is stateful, it can be used for either
> encryption or decryption but not both.
I don't understand that. In what way does it maintain state please?
> The only exception is the ECB mode. Being it stateless, it lets you
> intermix encryption and decryption.
Thanks.
(Nothing that I've found in the docs explains this?)
> However, that mode should be avoided when possible because it's very
> tricky to get right.
>
> A nonce (sometimes called IV) is critical a value required by most
> modes (ECB again being an exception).
> It is typically required to be unique per each combination of
> key/message. In some cases - like for CBC - it must also be
> unpredictable to an adversary. The nonce/IV does not need to kept
> secret but it needs to be delivered to the receiver somehow, otherwise
> it wouldn't be able to perform decryption.
Ping! The light goes on. Thank you.
> One common choice is to generate the nonce/IV randomly and prepend it
> to the ciphertext (that is, the result of a call to .encrypt() ) but
> nothing stops you from sending it afterwards.
Again missing from the documentation (or I missed it).
I've pointed out the DES/DES3 reversal to the github owner.
regards
--
Dave Pawson
XSLT XSL-FO FAQ.
Docbook FAQ.
http://www.dpawson.co.uk
More information about the pycrypto
mailing list