Given the following Merkle tree what information is required to search whether "C" is a part of this Merkle tree HAB HABCD Hcp HABCDEFEF HEFEF HEF HEF HA HB Hc HD HE HF A B C D E F
Added by Robert C.
Close
Step 1
Step 1: To determine whether "C" is part of the Merkle tree, we need to trace the path from "C" to the root of the tree. Show more…
Show all steps
Your feedback will help us improve your experience
Akash M and 83 other AP CS educators are ready to help you.
Ask a new question
Labs
Want to see this concept in action?
Explore this concept interactively to see how it behaves as you change inputs.
Key Concepts
Recommended Videos
Akash M.
Problem #1. Tree-Based Hash Function (30 pts.) For this problem, we will consider an alternative construction of a hash function based on a Merkle tree. Let h(x1,x2) be a collision-resistant compression function that takes two inputs of size s bits and has one output of size s bits. Given a message m, break it up into N blocks of size s. If the message is not a multiple of s bits long, pad it by adding sufficiently many 0s on the end to make the length equal to exactly Ns. The ith block of the message is mi, i = 1,...,N. Let n be the smallest integer such that N < 2^n and let a = 2N - 2^n and b = 2^n - N. Then we will form a binary tree with a leaves at depth n and b leaves at depth n - 1, with each leaf corresponding to a message block mi. For 0 < i ≤ a/2, let hi = h(m2i-1, m2i) (1) and for a/2 < i ≤ 2^(n-1), let hi = mi+a/2 (2) Then let the tree entries at depth n - d from the root (1 < d < n) be h2^(d-1)(i-1)+1,...,2^(d-1)i = h(h2^(d-2)(i-1)+1,...,2^(d-2)i, h2^(d-2)i+1,...,2^(d-2)(i+1)) (3) for 1 ≤ i ≤ 2^(n-d). This gives us the Merkle tree construction. Then H(m) = h1,...,2^(n-1). (4) The function h(x1,x2) is collision resistant in the sense that it is computationally hard to find two input pairs (x1,x2) and (x'1,x'2) such that h(x1,x2) = h(x'1,x'2) with x1 ≠ x'1 or x2 ≠ x'2 (or both x1 ≠ x'1 and x2 ≠ x'2). We say that H(x) is collision resistant for pairs of messages both of length N if it is hard to find x, x', both of length N blocks, with x ≠ x' but H(x) = H(x'). a) (10 points) Explain how to quickly find a collision between a message of length N1 blocks and one of length N2 blocks with N1 < N2. N1 and N2 are given to you, but you may choose both messages. b) (5 points) Prove that if h(x1,x2) is collision resistant, then H(m) is collision resistant for pairs of messages both of length N = 2 blocks. c) (5 points) Prove that if h(x1,x2) is collision resistant and H(m) is collision resistant for pairs of messages both of length N, then H(m) is collision resistant for pairs of messages both of length N + 1. d) (5 points) Use induction and parts b and c to prove that if h(x1,x2) is collision resistant, H(m) is collision resistant for pairs of messages both of N, provided N is at most a polynomial function of s. e) (5 points) Suggest an alternative padding technique to make it hard to find collisions between messages of different lengths. You do not have to prove that your technique works, but there should be no straightforward attacks.
If EB = 5, find the value of CD. CD = [ ? ]
Sikandar B.
Recommended Textbooks
Computer Science and Information Technology
Introduction to Programming Using Python
Computer Science - An Overview
Transcript
18,000,000+
Students on Numerade
Trusted by students at 8,000+ universities
Watch the video solution with this free unlock.
EMAIL
PASSWORD