$24
Part 1: Written Problems
= −1⨁ ( , −1)
Recall the complementarity property of DES (Problem 3.14): If Y = E(K, X), then Y′ = E(K ′,X′). Use this property to show how a message consisting of blocks 1, 2, … , can be altered without altering its hash code.
= ⨁ ( −1, )
RSAH(B1, B2) = RSA(RSA(B1) ⊕ B2)
Given an arbitrary block C1, choose C2 so that RSAH(C1,C2) = RSAH(B1,B2).
Thus, the hash function does not satisfy weak collision resistance.
1
(H)
as follows. To sign an n-bit message, the sender randomly generates
in advance 2n 64-bit cryptographic keys: 1,
2,
… , , 1′,
2′,
… , ′
, which are kept private. The sender generates the following two sets
of validation parameters which are made public.
The
user sends the appropriate
or
′
according
to whetheris 0 or 1 respectively.
For example, if the first 3-bits of the message are 011, then the first three keys of the signature are 1, 2′, 3′
Part 2: Programming Problem
This programming problem is to simulate the bitcoin mining. Note that this is not the real bitcoin mining. It only verifies the difficulty of finding hash values with many leading zeros. You can use either OpenSSL or Crypto++. Nevertheless, using Crypto++ in Visual Studio is preferred. Please find the related library information and examples on the Internet.
B4056DF6691F8DC72E56302DDAD345D65FEAD3EAD9299609A826E2344EB63AA4
# of leading |
Preimage = Previous hash (in Hex)+ |
Hash value (in Hex), with the specified |
zeros |
Nonce (32 bits, in Hex) |
leading zeros |
0 |
B4056DF6691F8DC72E56302DDAD345D6 |
2767667C2AF3BE01EFAC4FB387EC27C1 |
|
5FEAD3EAD9299609A826E2344EB63AA4 |
0B9D3BEE9C5D48CFF4CFB9F523560B24 |
|
00000000 |
|
|
|
|
1 |
2767667C2AF3BE01EFAC4FB387EC27C1 |
0DE32E85C2AC9D96659D42C8A3EA3D2C |
|
0B9D3BEE9C5D48CFF4CFB9F523560B24 |
05FDE384B468E6EFE062B6E21288CBCA |
|
0000000A |
|
|
|
|
2 |
? |
? |
3 |
? |
? |
… |
? |
? |
2
0
B4056DF6691F8DC72E56302DDAD345D65FEAD3EAD9299609A826E2344EB63AA4
00000000
2767667C2AF3BE01EFAC4FB387EC27C10B9D3BEE9C5D48CFF4CFB9F523560B24
1
2767667C2AF3BE01EFAC4FB387EC27C10B9D3BEE9C5D48CFF4CFB9F523560B24
0000000A
0DE32E85C2AC9D96659D42C8A3EA3D2C05FDE384B468E6EFE062B6E21288CBCA
…