230
12 Cryptocurrencies
quantum computers become available in the future, Alice and Bob can always use
entangled states to agree on a secret key that even quantum computers cannot figure
out.
Exercises
1. Show that for p i = 1/n for i = 1, . . . , n, (12.2) reverts to (12.1).
2. Determine the probabilities p x (x i ) and p y (y j ), the joint probabilities p xy (x i , y j ),
as well as the conditional probabilities p xy (x i |y j ) for the binary channel depicted
in Fig. 12.2.
3. Determine H [x], H [y], H [x, y], and H [y|x] for the binary channel from Fig. 12.2.
4. If x i and y j are statistically independent, the joint probability distribution function factorizes and can be written as p xy (x i , y j ) = p x (x i ) p y (y j ). Show that this
implies H [x, y] = H [x] + H [y].
5. Show that H [y|x] = H [y] if x i and y j are statistically independent.
6. Alice and Bob agree to use the Diffie-Hellman key exchange mechanism with
p = 9967 and g = 33. Alice sends her public number A = 7025 to Bob, who has
private key b = 557. He now wants to send a single number, the hour 1 < h < 24
when to meet Alice, in encrypted form to her. (a) Determine the Diffie-Hellman
encryption key k that Bob then uses to produce the ciphertext c = xor(k, h). (b)
Alice receives the ciphertext c = 4148. When will they meet? Hint: In MATLAB
you can use the powermod() and bitxor() functions.
7. Alice and Bob agree to use the RSA algorithm with the public key (n, e) =
(5561, 5). Alice wants to meet Bob and sends the hour, encoded with her private
key, which turns out to be c = 5343. Eve desperately wants to know the time they
meet and intercepts the message such that she also knows c. She realizes that
the number n in the public key is rather small, which allows her to determine the
decryption key d. Help Eve to find out when Alice and Bob meet? Hint: MATLAB
has a built-in command factor().
8. Alice and Bob agree to use ECDSA with a hashing function where they xor the
numerical values of the ASCII codes of the characters in a message. For example,
the code of the letter “A” is 65. Moreover, they use the elliptic curve y
2
= x
3
+ 7,
an integer field based on p = 113, and the generator point G = (15, 52), the same
one used to prepare the curve on the right-hand side in Fig. 12.7. Alice, also known
by her public point P = (93, 16), sends the message “YES” to an invitation and
signs the message with (r, s) = (66, 11). Please help Bob to verify whether her
message is authentic. Hint: check out the MATLAB code in Appendix B.11.
9. Show that U |u s = e
2πis/r
|u s , where |u s is defined in (12.41) and U is defined
just before.
12 Cryptocurrencies
quantum computers become available in the future, Alice and Bob can always use
entangled states to agree on a secret key that even quantum computers cannot figure
out.
Exercises
1. Show that for p i = 1/n for i = 1, . . . , n, (12.2) reverts to (12.1).
2. Determine the probabilities p x (x i ) and p y (y j ), the joint probabilities p xy (x i , y j ),
as well as the conditional probabilities p xy (x i |y j ) for the binary channel depicted
in Fig. 12.2.
3. Determine H [x], H [y], H [x, y], and H [y|x] for the binary channel from Fig. 12.2.
4. If x i and y j are statistically independent, the joint probability distribution function factorizes and can be written as p xy (x i , y j ) = p x (x i ) p y (y j ). Show that this
implies H [x, y] = H [x] + H [y].
5. Show that H [y|x] = H [y] if x i and y j are statistically independent.
6. Alice and Bob agree to use the Diffie-Hellman key exchange mechanism with
p = 9967 and g = 33. Alice sends her public number A = 7025 to Bob, who has
private key b = 557. He now wants to send a single number, the hour 1 < h < 24
when to meet Alice, in encrypted form to her. (a) Determine the Diffie-Hellman
encryption key k that Bob then uses to produce the ciphertext c = xor(k, h). (b)
Alice receives the ciphertext c = 4148. When will they meet? Hint: In MATLAB
you can use the powermod() and bitxor() functions.
7. Alice and Bob agree to use the RSA algorithm with the public key (n, e) =
(5561, 5). Alice wants to meet Bob and sends the hour, encoded with her private
key, which turns out to be c = 5343. Eve desperately wants to know the time they
meet and intercepts the message such that she also knows c. She realizes that
the number n in the public key is rather small, which allows her to determine the
decryption key d. Help Eve to find out when Alice and Bob meet? Hint: MATLAB
has a built-in command factor().
8. Alice and Bob agree to use ECDSA with a hashing function where they xor the
numerical values of the ASCII codes of the characters in a message. For example,
the code of the letter “A” is 65. Moreover, they use the elliptic curve y
2
= x
3
+ 7,
an integer field based on p = 113, and the generator point G = (15, 52), the same
one used to prepare the curve on the right-hand side in Fig. 12.7. Alice, also known
by her public point P = (93, 16), sends the message “YES” to an invitation and
signs the message with (r, s) = (66, 11). Please help Bob to verify whether her
message is authentic. Hint: check out the MATLAB code in Appendix B.11.
9. Show that U |u s = e
2πis/r
|u s , where |u s is defined in (12.41) and U is defined
just before.
