#print 'Uncomment this next line to print the first deterministic address that would be generated with the given passphrase. This will Not add it to the Bitmessage interface or the keys.dat file.'
# Form implementation generated from reading ui file 'newaddressdialog.ui'
#
# Created: Thu Jun 13 20:12:21 2013
# by: PyQt4 UI code generator 4.10.1
# Created: Sun Sep 15 23:53:31 2013
# by: PyQt4 UI code generator 4.10.2
#
# WARNING! All changes made in this file will be lost!
@ -178,7 +178,7 @@ class Ui_NewAddressDialog(object):
self.radioButtonDeterministicAddress.setText(_translate("NewAddressDialog","Use a passphrase to make addresses",None))
self.checkBoxEighteenByteRipe.setText(_translate("NewAddressDialog","Spend several minutes of extra computing time to make the address(es) 1 or 2 characters shorter",None))
self.label_11.setText(QtGui.QApplication.translate("regenerateAddressesDialog","Number of addresses to make based on your passphrase:",None,QtGui.QApplication.UnicodeUTF8))
self.label_2.setText(QtGui.QApplication.translate("regenerateAddressesDialog","Address version Number:",None,QtGui.QApplication.UnicodeUTF8))
self.checkBoxEighteenByteRipe.setText(QtGui.QApplication.translate("regenerateAddressesDialog","Spend several minutes of extra computing time to make the address(es) 1 or 2 characters shorter",None,QtGui.QApplication.UnicodeUTF8))
self.label_4.setText(QtGui.QApplication.translate("regenerateAddressesDialog","You must check (or not check) this box just like you did (or didn\'t) when you made your addresses the first time.",None,QtGui.QApplication.UnicodeUTF8))
self.label.setText(QtGui.QApplication.translate("regenerateAddressesDialog","If you have previously made deterministic addresses but lost them due to an accident (like hard drive failure), you can regenerate them here. If you used the random number generator to make your addresses then this form will be of no use to you.",None,QtGui.QApplication.UnicodeUTF8))
self.checkBoxEighteenByteRipe.setText(_translate("regenerateAddressesDialog","Spend several minutes of extra computing time to make the address(es) 1 or 2 characters shorter",None))
self.label_4.setText(_translate("regenerateAddressesDialog","You must check (or not check) this box just like you did (or didn\'t) when you made your addresses the first time.",None))
self.label.setText(_translate("regenerateAddressesDialog","If you have previously made deterministic addresses but lost them due to an accident (like hard drive failure), you can regenerate them here. If you used the random number generator to make your addresses then this form will be of no use to you.",None))
print'Generated address with ripe digest:',ripe.digest().encode('hex')
print'Address generator calculated',numberOfAddressesWeHadToMakeBeforeWeFoundOneWithTheCorrectRipePrefix,'addresses at',numberOfAddressesWeHadToMakeBeforeWeFoundOneWithTheCorrectRipePrefix/(time.time()-startTime),'addresses per second before finding one with the correct ripe-prefix.'
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
print'EC decryption successful using key associated with ripe hash:',key.encode('hex')
break
exceptExceptionaserr:
pass
# print 'cryptorObject.decrypt Exception:', err
ifnotinitialDecryptionSuccessful:
# This is not a broadcast I am interested in.
# We are interested in this broadcast because of its tag.
print'Cannot decode senderAddressVersion other than 2 or 3. Assuming the sender isn\'t being silly, you should upgrade Bitmessage because this message shall be ignored.'
ifsendersAddressVersion<4:
print'Cannot decode senderAddressVersion less than 4 for broadcast version number 3. Assuming the sender isn\'t being silly, you should upgrade Bitmessage because this message shall be ignored.'
return
readPosition+=sendersAddressVersionLength
sendersStream,sendersStreamLength=decodeVarint(
@ -774,11 +764,14 @@ class receiveDataThread(threading.Thread):
print'debug. successfully decrypted and checked pubkey from sql inventory.'#testing
sqlExecute(
'''UPDATE sent SET status='doingmsgpow' WHERE toaddress=? AND status='msgqueued'''',
toaddress)
break
else:# There was something wrong with this pubkey even though it had the correct tag- almost certainly because of malicious behavior or a badly programmed client.
continue
sha=hashlib.new('sha512')
sha.update(publicSigningKey+publicEncryptionKey)
ripeHasher=hashlib.new('ripemd160')
ripeHasher.update(sha.digest())
ripe=ripeHasher.digest()
# We need to make sure that the tag on the outside of the encryption
# is the one generated from hashing these particular keys.
@ -5,7 +5,7 @@ lengthOfTimeToLeaveObjectsInInventory = 237600 # Equals two days and 18 hours.
lengthOfTimeToHoldOnToAllPubkeys=2419200# Equals 4 weeks. You could make this longer if you want but making it shorter would not be advisable because there is a very small possibility that it could keep you from obtaining a needed pubkey for a period of time.
maximumAgeOfObjectsThatIAdvertiseToOthers=216000# Equals two days and 12 hours
maximumAgeOfNodesThatIAdvertiseToOthers=10800# Equals three hours
useVeryEasyProofOfWorkForTesting=True # If you set this to True while on the normal network, you won't be able to send or sometimes receive messages.
useVeryEasyProofOfWorkForTesting=False # If you set this to True while on the normal network, you won't be able to send or sometimes receive messages.