removed randomness beacon stuff
This commit is contained in:
		
							parent
							
								
									c0bfe102d5
								
							
						
					
					
						commit
						302f696475
					
				
					 4 changed files with 0 additions and 25 deletions
				
			
		
							
								
								
									
										0
									
								
								.gitmodules
									
										
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										0
									
								
								.gitmodules
									
										
									
									
										vendored
									
									
										Normal file
									
								
							|  | @ -82,7 +82,6 @@ class OnionrCommunicatorDaemon: | ||||||
| 
 | 
 | ||||||
|         # daemon tools are misc daemon functions, e.g. announce to online peers |         # daemon tools are misc daemon functions, e.g. announce to online peers | ||||||
|         # intended only for use by OnionrCommunicatorDaemon |         # intended only for use by OnionrCommunicatorDaemon | ||||||
|         #self.daemonTools = onionrdaemontools.DaemonTools(self) |  | ||||||
|         self.daemonTools = onionrdaemontools.DaemonTools(self) |         self.daemonTools = onionrdaemontools.DaemonTools(self) | ||||||
| 
 | 
 | ||||||
|         self._chat = onionrchat.OnionrChat(self) |         self._chat = onionrchat.OnionrChat(self) | ||||||
|  |  | ||||||
|  | @ -678,7 +678,6 @@ class Core: | ||||||
|         ''' |         ''' | ||||||
| 
 | 
 | ||||||
|         retData = False |         retData = False | ||||||
| 
 |  | ||||||
|         # check nonce |         # check nonce | ||||||
|         dataNonce = self._utils.bytesToStr(self._crypto.sha3Hash(data)) |         dataNonce = self._utils.bytesToStr(self._crypto.sha3Hash(data)) | ||||||
|         try: |         try: | ||||||
|  |  | ||||||
|  | @ -23,7 +23,6 @@ import nacl.signing, nacl.encoding | ||||||
| from onionrblockapi import Block | from onionrblockapi import Block | ||||||
| import onionrexceptions | import onionrexceptions | ||||||
| from onionr import API_VERSION | from onionr import API_VERSION | ||||||
| from defusedxml import minidom |  | ||||||
| import onionrevents | import onionrevents | ||||||
| import pgpwords, onionrusers, storagecounter | import pgpwords, onionrusers, storagecounter | ||||||
| if sys.version_info < (3, 6): | if sys.version_info < (3, 6): | ||||||
|  | @ -653,28 +652,6 @@ class OnionrUtils: | ||||||
|             retData = False |             retData = False | ||||||
|         return retData |         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): |     def strToBytes(self, data): | ||||||
|         try: |         try: | ||||||
|             data = data.encode() |             data = data.encode() | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue