Lines Matching refs:proof
166 def chain_border_right(seed, proof):
171 proof: A list of bytearrays representing the hashes in the inclusion proof.
176 for h in proof:
181 def chain_inner(seed, proof, leaf_index):
186 proof: A list of bytearrays representing the hashes in the inclusion proof.
192 for i, h in enumerate(proof):
200 def root_from_icp(leaf_index, tree_size, proof, leaf_hash):
206 proof: A list of bytearrays containing the inclusion proof.
222 if proof is None:
223 raise AftlError('Inclusion proof not provided.')
226 # Calculate the point to split the proof into two parts.
229 result = chain_inner(leaf_hash, proof[:inner], leaf_index)
230 result = chain_border_right(result, proof[inner:])
249 'H') # number of inclusion proof entries.
342 """A class for the transparency log inclusion proof entries.
346 SignedLogRoot, and inclusion proof hashes.
355 proof_hash_count: Number of hashes comprising the inclusion proof.
356 inc_proof_size: The total size of the inclusion proof, in bytes.
358 proof.
363 proofs: The hashes comprising the inclusion proof.
372 'B' # number of hashes in the inclusion proof
373 'L') # size of the inclusion proof in bytes
425 proof = proof_bytes[proof_idx:(proof_idx+hash_size)]
426 self.proofs.append(proof)
468 """Gets the number of proof hashes."""
475 """Gets the total size of the proof hashes in bytes."""
478 for proof in self.proofs:
479 result += len(proof)
484 """Verifies the contained inclusion proof given the public log key.
509 """Verify the inclusion proof for the given VBMeta image.
517 True if the inclusion proof validates and the vbmeta hash of the given
526 # Validates the inclusion proof and then compare the calculated vbmeta_hash
527 # against the one in the inclusion proof.
552 for proof in self.proofs:
553 proof_bytes.extend(proof)
575 proof = avbm_response.annotation_proof
576 self.leaf_index = proof.proof.leaf_index
577 self.log_root_descriptor = TrillianLogRootDescriptor(proof.sth.log_root)
580 self.log_root_signature = proof.sth.log_root_signature
581 self.proofs = proof.proof.hashes
1310 validate an inclusion proof.
1367 """Verifies the contained inclusion proof given the public log key.
1371 inclusion proof.
1503 sys.stdout.write('Preparing to request inclusion proof from {}. This could '
1658 True if for the given image the inclusion proof validates; otherwise
1693 An AftlIcpEntry with the inclusion proof for the log entry.
1743 """Generates a vbmeta image with inclusion proof given a vbmeta image.
1746 proof for a specific vbmeta image. It consists of a header (struct
1748 that contain the vbmeta leaf hash, tree size, root hash, inclusion proof
1754 An inclusion proof is calculated and returned. This inclusion proof is
1757 output. Validation of the inclusion proof does not require
1793 sys.stderr.write('The inclusion proof from {} could not be verified.'
1797 # The inclusion proof request failed. Continue and see if others will.
1798 sys.stderr.write('Requesting inclusion proof failed: {}.\n'.format(e))
1850 an inclusion proof.
1903 inclusion proof.