From e6438a9df3834743f37415b4826380103cabdce4 Mon Sep 17 00:00:00 2001 From: Jonathan Warren Date: Fri, 26 Apr 2013 17:58:46 -0400 Subject: [PATCH] Implimented broadcast encryption (testing completed) --- src/bitmessagemain.py | 7 ++++--- src/specialaddressbehavior.py | 4 ++-- src/specialaddressbehavior.ui | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/bitmessagemain.py b/src/bitmessagemain.py index 7a77fb41..7f734cee 100755 --- a/src/bitmessagemain.py +++ b/src/bitmessagemain.py @@ -758,9 +758,6 @@ class receiveDataThread(QThread): if toRipe != ripe.digest(): print 'The encryption key used to encrypt this message doesn\'t match the keys inbedded in the message itself. Ignoring message.' return - else: - print 'The encryption key DOES match the keys in the message.' - messageEncodingType, messageEncodingTypeLength = decodeVarint(decryptedData[readPosition:readPosition+9]) if messageEncodingType == 0: return @@ -2407,6 +2404,9 @@ class sqlThread(QThread): self.cur.execute( '''DROP TABLE pubkeys_backup;''') print 'Deleting all pubkeys from inventory. They will be redownloaded and then saved with the correct times.' self.cur.execute( '''delete from inventory where objecttype = 'pubkey';''') + #print 'replacing Bitmessage announcements mailing list with a new one.' + #self.cur.execute( '''delete from subscriptions where address='BM-BbkPSZbzPwpVcYZpU4yHwf9ZPEapN5Zx' ''') + #self.cur.execute( '''INSERT INTO subscriptions VALUES('Bitmessage new releases/announcements','BM-BbkPSZbzPwpVcYZpU4yHwf9ZPEapN5Zx',1)''') print 'Commiting.' self.conn.commit() print 'Vacuuming message.dat. You might notice that the file size gets much smaller.' @@ -5558,6 +5558,7 @@ class MyForm(QtGui.QMainWindow): def reloadBroadcastSendersForWhichImWatching(self): broadcastSendersForWhichImWatching.clear() + MyECSubscriptionCryptorObjects.clear() sqlLock.acquire() sqlSubmitQueue.put('SELECT address FROM subscriptions where enabled=1') sqlSubmitQueue.put('') diff --git a/src/specialaddressbehavior.py b/src/specialaddressbehavior.py index 828ba070..78ff890d 100644 --- a/src/specialaddressbehavior.py +++ b/src/specialaddressbehavior.py @@ -2,7 +2,7 @@ # Form implementation generated from reading ui file 'specialaddressbehavior.ui' # -# Created: Fri Mar 29 15:02:24 2013 +# Created: Fri Apr 26 17:43:31 2013 # by: PyQt4 UI code generator 4.9.4 # # WARNING! All changes made in this file will be lost! @@ -59,6 +59,6 @@ class Ui_SpecialAddressBehaviorDialog(object): SpecialAddressBehaviorDialog.setWindowTitle(QtGui.QApplication.translate("SpecialAddressBehaviorDialog", "Special Address Behavior", None, QtGui.QApplication.UnicodeUTF8)) self.radioButtonBehaveNormalAddress.setText(QtGui.QApplication.translate("SpecialAddressBehaviorDialog", "Behave as a normal address", None, QtGui.QApplication.UnicodeUTF8)) self.radioButtonBehaviorMailingList.setText(QtGui.QApplication.translate("SpecialAddressBehaviorDialog", "Behave as a pseudo-mailing-list address", None, QtGui.QApplication.UnicodeUTF8)) - self.label.setText(QtGui.QApplication.translate("SpecialAddressBehaviorDialog", "Mail received to a pseudo-mailing-list address will be automatically broadcast to subscribers (and thus will be unencrypted and public).", None, QtGui.QApplication.UnicodeUTF8)) + self.label.setText(QtGui.QApplication.translate("SpecialAddressBehaviorDialog", "Mail received to a pseudo-mailing-list address will be automatically broadcast to subscribers (and thus will be public).", None, QtGui.QApplication.UnicodeUTF8)) self.label_2.setText(QtGui.QApplication.translate("SpecialAddressBehaviorDialog", "Name of the pseudo-mailing-list:", None, QtGui.QApplication.UnicodeUTF8)) diff --git a/src/specialaddressbehavior.ui b/src/specialaddressbehavior.ui index 89402639..eddc1184 100644 --- a/src/specialaddressbehavior.ui +++ b/src/specialaddressbehavior.ui @@ -34,7 +34,7 @@ - Mail received to a pseudo-mailing-list address will be automatically broadcast to subscribers (and thus will be unencrypted and public). + Mail received to a pseudo-mailing-list address will be automatically broadcast to subscribers (and thus will be public). true