removed randomness beacon stuff

This commit is contained in:
Kevin Froman 2018-12-14 11:23:56 -06:00
parent c0bfe102d5
commit 302f696475
4 changed files with 0 additions and 25 deletions

0
.gitmodules vendored Normal file
View File

View File

@ -82,7 +82,6 @@ class OnionrCommunicatorDaemon:
# daemon tools are misc daemon functions, e.g. announce to online peers
# intended only for use by OnionrCommunicatorDaemon
#self.daemonTools = onionrdaemontools.DaemonTools(self)
self.daemonTools = onionrdaemontools.DaemonTools(self)
self._chat = onionrchat.OnionrChat(self)

View File

@ -678,7 +678,6 @@ class Core:
'''
retData = False
# check nonce
dataNonce = self._utils.bytesToStr(self._crypto.sha3Hash(data))
try:

View File

@ -23,7 +23,6 @@ import nacl.signing, nacl.encoding
from onionrblockapi import Block
import onionrexceptions
from onionr import API_VERSION
from defusedxml import minidom
import onionrevents
import pgpwords, onionrusers, storagecounter
if sys.version_info < (3, 6):
@ -653,28 +652,6 @@ class OnionrUtils:
retData = False
return retData
def getNistBeaconSalt(self, torPort=0, rounding=3600):
'''
Get the token for the current hour from the NIST randomness beacon
'''
if torPort == 0:
try:
sys.argv[2]
except IndexError:
raise onionrexceptions.MissingPort('Missing Tor socks port')
retData = ''
curTime = self.getRoundedEpoch(rounding)
self.nistSaltTimestamp = curTime
data = self.doGetRequest('https://beacon.nist.gov/rest/record/' + str(curTime), port = torPort)
dataXML = minidom.parseString(data, forbid_dtd = True, forbid_entities = True, forbid_external = True)
try:
retData = dataXML.getElementsByTagName('outputValue')[0].childNodes[0].data
except ValueError:
logger.warn('Failed to get the NIST beacon value.')
else:
self.powSalt = retData
return retData
def strToBytes(self, data):
try:
data = data.encode()