V0.6 #852

Merged
Atheros1 merged 399 commits from v0.6 into master 2016-05-03 01:58:38 +02:00
Showing only changes of commit 9239813ebb - Show all commits

View File

@ -335,11 +335,13 @@ class objectProcessor(threading.Thread):
for key, cryptorObject in shared.myECCryptorObjects.items(): for key, cryptorObject in shared.myECCryptorObjects.items():
try: try:
decryptedData = cryptorObject.decrypt(data[readPosition:]) if initialDecryptionSuccessful: # continue decryption attempts to avoid timing attacks
toRipe = key # This is the RIPE hash of my pubkeys. We need this below to compare to the destination_ripe included in the encrypted data. cryptorObject.decrypt(data[readPosition:])
initialDecryptionSuccessful = True else:
logger.info('EC decryption successful using key associated with ripe hash: %s.' % key.encode('hex')) decryptedData = cryptorObject.decrypt(data[readPosition:])
break toRipe = key # This is the RIPE hash of my pubkeys. We need this below to compare to the destination_ripe included in the encrypted data.
initialDecryptionSuccessful = True
logger.info('EC decryption successful using key associated with ripe hash: %s.' % key.encode('hex'))
except Exception as err: except Exception as err:
pass pass
if not initialDecryptionSuccessful: if not initialDecryptionSuccessful:
@ -615,11 +617,13 @@ class objectProcessor(threading.Thread):
initialDecryptionSuccessful = False initialDecryptionSuccessful = False
for key, cryptorObject in shared.MyECSubscriptionCryptorObjects.items(): for key, cryptorObject in shared.MyECSubscriptionCryptorObjects.items():
try: try:
decryptedData = cryptorObject.decrypt(data[readPosition:]) if initialDecryptionSuccessful: # continue decryption attempts to avoid timing attacks
toRipe = key # This is the RIPE hash of the sender's pubkey. We need this below to compare to the RIPE hash of the sender's address to verify that it was encrypted by with their key rather than some other key. cryptorObject.decrypt(data[readPosition:])
initialDecryptionSuccessful = True else:
logger.info('EC decryption successful using key associated with ripe hash: %s' % key.encode('hex')) decryptedData = cryptorObject.decrypt(data[readPosition:])
break toRipe = key # This is the RIPE hash of the sender's pubkey. We need this below to compare to the RIPE hash of the sender's address to verify that it was encrypted by with their key rather than some other key.
initialDecryptionSuccessful = True
logger.info('EC decryption successful using key associated with ripe hash: %s' % key.encode('hex'))
except Exception as err: except Exception as err:
pass pass
# print 'cryptorObject.decrypt Exception:', err # print 'cryptorObject.decrypt Exception:', err