diff options
Diffstat (limited to 'pipermail/pycrypto/attachments/20120626/e1bf90e4/attachment-0001.html')
-rw-r--r-- | pipermail/pycrypto/attachments/20120626/e1bf90e4/attachment-0001.html | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/pipermail/pycrypto/attachments/20120626/e1bf90e4/attachment-0001.html b/pipermail/pycrypto/attachments/20120626/e1bf90e4/attachment-0001.html new file mode 100644 index 0000000..ce7ad30 --- /dev/null +++ b/pipermail/pycrypto/attachments/20120626/e1bf90e4/attachment-0001.html @@ -0,0 +1,18 @@ +<tt> +<div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><br> +<br><br> +</div></div>I think I have it working....<br><br> +<br><br> + myiv = "some Random string" # which is 16 bytes long....<br><br> + encobj = AES.new(secret, AES.MODE_CFB, myiv)<br><br> +<br><br> +Would someone help me understand what is happening here please?<br><br> +<br><br> +I'm guessing on both encode and decode the 'myiv' string should be identical...<br><br> +but I'm unsure?<br><br> +<a href="https://www.dlitz.net/software/pycrypto/api/current/Crypto.Cipher.AES-module.html#new" target="_blank">https://www.dlitz.net/software/pycrypto/api/current/Crypto.Cipher.AES-module.html#new</a><br><br> +shows it in use, but with no explanation?<br><br></blockquote><div><br>Choice of the IV is critical for security.<br>For CFB, the combination IV and key must be use only with one message, and never occur again.<br>That is explained here:<br><br> +<br><a href="https://www.dlitz.net/software/pycrypto/api/current/Crypto.Cipher.blockalgo-module.html#MODE_CFB">https://www.dlitz.net/software/pycrypto/api/current/Crypto.Cipher.blockalgo-module.html#MODE_CFB</a><br><br>IV needs indeed to be share by the party encrypting and by the party decrypting the message.<br><br> +<br>Up to pycrypto 2.5, when no iv was provided to new() a string of zeroes was automatically used.<br>Depending on your application, that may or may not be a problem. It is wiser to always make iv explicit.<br></div></div><br> + +</tt> |