Changes in / [1:3]


Ignore:
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • /bletchley-distutils

    r1 r3  
    66sys.dont_write_bytecode = False
    77
    8 setup(name='bletchley', version=BLETCHLEY_VERSION, package_dir={'':'lib'}, packages=['bletchley'])
     8setup(name='bletchley', version=BLETCHLEY_VERSION, package_dir={'':'lib'}, packages=['bletchley', 'bletchley.PaddingOracle'])
  • /bletchley_version.py

    • Property svn:keywords set to Rev
    r1 r3  
    1 SVN_REV = "$Rev: 103 $"
     1SVN_REV = "$Rev$"
    22BLETCHLEY_VERSION = "0.0.%s" % SVN_REV.split(' ')[1]
  • /lib/bletchley/PaddingOracle/CBCREncryptionOracle.py

    r1 r3  
    3838    def encrypt_block(self,input_block, prev_block = None):
    3939        if (len(input_block) != self.blockSize):
    40             print "Received input block of len ",len(input_block)
     40            print("Received input block of len ",len(input_block))
    4141            raise InvalidBlockError(self.blockSize,len(input_block))
    4242       
  • /lib/bletchley/PaddingOracle/TimingWebPaddingOracle.py

    r1 r3  
    3838       
    3939        if(encoder== None and decoder!=None) or (encoder!=None and decoder==None):
    40             print "ERROR: Encoder and decoder must be both set or not set at all. Disabling both."
     40            print("ERROR: Encoder and decoder must be both set or not set at all. Disabling both.")
    4141            self.encoder = None
    4242            self.decoder = None
     
    8282    def test_oracle(self):
    8383        if(self.oracle_name == None or self.oracle_value == None):
    84             print "ERROR: Cannot test_oracle if no oracle variable defined"
     84            print("ERROR: Cannot test_oracle if no oracle variable defined")
    8585            return
    8686       
     
    116116            #FIXME most likely this will find a difference
    117117            if(time1 != time2):
    118                 print "Found difference for i="+hex(b)
    119                 print "Original timing: " + str(time1)
    120                 print "Bad timing: " + str(time2)
     118                print("Found difference for i="+hex(b))
     119                print("Original timing: " + str(time1))
     120                print("Bad timing: " + str(time2))
    121121                self.time_threshold = abs(time1 - time2) / 2 + min(time1,time2)
    122122                if(time1 > time2):
     
    125125                    self.oracle_type = 0x02 #Normal timing is lower than threshold
    126126                return True
    127         print "ERROR: Could not find a difference."
     127        print("ERROR: Could not find a difference.")
    128128        return False
    129129   
    130130    def oracle(self,ctext):
    131131        if(self.time_threshold == None):
    132             print "ERROR: Oracle not defined!"
     132            print("ERROR: Oracle not defined!")
    133133        else:
    134134           
Note: See TracChangeset for help on using the changeset viewer.