def verify_dnssec(self, pr, contacts): sig = pr.signature alias = pr.pki_data info = contacts.resolve(alias) if info.get('validated') is not True: self.error = "Alias verification failed (DNSSEC)" return False if pr.pki_type == "dnssec+btc": self.requestor = alias address = info.get('address') pr.signature = '' message = pr.SerializeToString() if bitcoin.verify_message(address, sig, message): self.error = 'Verified with DNSSEC' return True else: self.error = "verify failed" return False else: self.error = "unknown algo" return False
def verifymessage(self, address, signature, message): """Verify a signature.""" sig = base64.b64decode(signature) return bitcoin.verify_message(address, sig, message)
def verify(self, addr=None): """Verify that our sig is signed with addr's key.""" if not addr: addr = bitcoin.public_key_to_p2pkh( self.collateral_key.decode('hex')) return bitcoin.verify_message(addr, self.sig, self.serialize_for_sig())
def verifymessage(self, address, signature, message): return bitcoin.verify_message(address, signature, message)
def verifymessage(self, address, signature, message): """Verify a signature.""" return bitcoin.verify_message(address, signature, message)
def get(self, nonce, btcaddress, signature): return { 'result': bitcoin.verify_message(btcaddress, urllib.parse.unquote(signature), str(nonce)) }