[Solved] Blockchain-Homework 1

$25

File Name: Blockchain-Homework_1.zip
File Size: 197.82 KB

SKU: [Solved] Blockchain-Homework 1 Category: Tag:
5/5 - (1 vote)
  1. Find a collision in each of the hash functions below:
    1. H(x) = x mod 712, where x can be any integer
    2. H(x) = number of 1-bits in x, where x can be any bit string
    3. H(x) = the three least significant bits of x, where x can be any bit string
  2. Prove the statement: In a class of 500 students, there must be two students with the same birthday.
  3. Find an x such that H (x id) Y where
    1. H = SHA-256
    2. id = 0xED00AF5F774E4135E7746419FEB65DE8AE17D6950C95CEC3891070FBB5B03C77
    3. Y is the set of all 256 bit values that have some byte with the value 0x1D.

Assume SHA-256 is puzzle-friendly. Your answer for x must be in hexadecimal. You may provide your code for partial credit, if your x value is incorrect. You may use the accompanying CryptoReference1.java file to help you with this question. Submit both your code and your value of x.

Notes:

  • The notation x id means the byte array x concatenated with the byte array id. For example, 11110000 10101010 is the byte array 1111000010101010.
  • The following two code segments are not equivalent:
Segment 1 String val = 0x1D253A2F; if (val.contains(1D)) return true; Segment 2byte[] val = new byte[]{0x1D,0x25,0x3A,0x2F} for (byte b : val) if (b == 0x1D) return true;
The second code segment above is the correct way to check whether 0x1D is a byte in 0x1D253A2F.

Remember that hex format is only a way to represent a byte sequence in a human readable format. You should not be performing operations directly on hex-string representations. Instead, you should first convert hex-strings into byte arrays, then perform operations on the byte arrays directly, and then convert the final byte array into a hex format when giving your answer. Performing operations directly on the hex strings is incorrect.

  1. Alice and Bob want to play a game over SMS text where Alice chooses a number between 1 and 10 in her head, and then Bob tries to guess that number. If Bob guesses correctly, he wins. Otherwise, Alice wins. However, Bob complains that the game isnt fair, because even if Bob guessed correctly, Alice could lie and claim that she chose a different number than what she initially chose. What can Alice do to prove that she didnt change the number she initially chose? Devise a mechanism to address Bobs concern. Provide a detailed explanation of the mechanism and why it works. An answer with insufficient detail will not receive credit.

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[Solved] Blockchain-Homework 1
$25