[ pycrypto-Bugs-1471372 ] Bug in AllOrNothing transform.

"SourceForge.net" <[email protected]> Sun, 16 Apr 2006 10:50:51 -0700
Newsgroups gmane.comp.python.cryptography.cvs
Message-ID <[email protected]>
Bugs item #1471372, was opened at 2006-04-17 03:13
Message generated for change (Comment added) made by eocsor
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=120937&aid=1471372&group_id=20937

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: Bug in AllOrNothing transform.

Initial Comment:
(I think I've got the following right, forgive me if
it's a mistake on my part. I'm still new to all this :)


In Crypto.Protocol.AllOrNothing the digest method will
create blocks of invalid size 0.3-0.4% of the time for
random input cases.

The reason for this a long_to_bytes() call without the
blocksize parameter specified, which defaults to zero.

Included is a patch.

----------------------------------------------------------------------

Comment By: Roscoe (eocsor)
Date: 2006-04-17 03:20

Message:
Logged In: YES 
user_id=1503309

Opps. Forgot to check I was logged in.

'''
--- AllOrNothing.py     2006-04-17 02:25:24.000000000 +0930
+++ fixedAllOrNothing.py        2006-04-17
03:00:40.000000000 +0930
@@ -139,7 +139,7 @@
         # we convert the blocks to strings since in Python,
byte sequences are
         # always represented as strings.  This is more
consistent with the
         # model that encryption and hash algorithms always
operate on strings.
-        return map(long_to_bytes, blocks)
+        return
[long_to_bytes(i,self.__ciphermodule.block_size) for i in
blocks]
 
 
     def undigest(self, blocks):
'''

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=120937&aid=1471372&group_id=20937


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642