Bmng dev master #687

Merged
Atheros1 merged 12 commits from bmng-dev-master into master 2014-07-15 01:42:36 +02:00
Showing only changes of commit b1261a6c0e - Show all commits

View File

@ -8,7 +8,6 @@ from addresses import *
import highlevelcrypto import highlevelcrypto
import proofofwork import proofofwork
import sys import sys
from class_addressGenerator import pointMult
import tr import tr
from debug import logger from debug import logger
from helper_sql import * from helper_sql import *
@ -304,7 +303,7 @@ class singleWorker(threading.Thread):
addressVersionNumber) + encodeVarint(streamNumber) + hash).digest()).digest() addressVersionNumber) + encodeVarint(streamNumber) + hash).digest()).digest()
payload += doubleHashOfAddressData[32:] # the tag payload += doubleHashOfAddressData[32:] # the tag
privEncryptionKey = doubleHashOfAddressData[:32] privEncryptionKey = doubleHashOfAddressData[:32]
pubEncryptionKey = pointMult(privEncryptionKey) pubEncryptionKey = highlevelcrypto.pointMult(privEncryptionKey)
payload += highlevelcrypto.encrypt( payload += highlevelcrypto.encrypt(
dataToEncrypt, pubEncryptionKey.encode('hex')) dataToEncrypt, pubEncryptionKey.encode('hex'))
@ -415,7 +414,7 @@ class singleWorker(threading.Thread):
else: else:
privEncryptionKey = doubleHashOfAddressData[:32] privEncryptionKey = doubleHashOfAddressData[:32]
pubEncryptionKey = pointMult(privEncryptionKey) pubEncryptionKey = highlevelcrypto.pointMult(privEncryptionKey)
payload += highlevelcrypto.encrypt( payload += highlevelcrypto.encrypt(
dataToEncrypt, pubEncryptionKey.encode('hex')) dataToEncrypt, pubEncryptionKey.encode('hex'))