Changeset 119


Ignore:
Timestamp:
10/25/16 18:31:57 (8 years ago)
Author:
tim
Message:

comments

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/bletchley/CBC/__init__.py

    r76 r119  
    151151        if pad_length > 1:
    152152            # XXX: If this test case fails, we should try instead
    153             # lengthing the pad by one byte with all 256 values (as is
     153            # lengthening the pad by one byte with all 256 values (as is
    154154            # done in the 1-byte pad case).
    155155            #
     
    208208        """
    209209
     210        # XXX: If the second-to-last byte of a block happens to be 0x02
     211        #      then changing the final byte to either 0x01 or 0x02 would
     212        #      cause no error to be generated by the oracle.  Need to
     213        #      handle that corner case.  This doesn't occur on any other
     214        #      offset, since we'll have already set the previously
     215        #      decrypted bytes to a specific pad value, eliminating the
     216        #      ambiguity.
     217
    210218        if(len(block)!=self.block_size):
    211219            raise InvalidBlockError
     
    224232
    225233        # XXX: catch any signal exceptions, such as ^C, and communicate
    226         #      this back to the rest of the script so it can end immediately 
     234        #      this back to the rest of the script so it can end immediately
    227235        for x in range(0, 1+self.retries):
    228236            # Each thread spawned searches a subset of the next byte's
Note: See TracChangeset for help on using the changeset viewer.