COMP2300_Week10quiz
.pdf
keyboard_arrow_up
School
Macquarie University *
*We aren’t endorsed by this school
Course
2300
Subject
Computer Science
Date
May 8, 2024
Type
Pages
2
Uploaded by DrNightingale4112 on coursehero.com
COMP 2300 Applied Cryptography
Week 10 Quiz
Q1. The blockchain in Bitcoin solves the double spend problem because:
a. We can check if there is a past transaction in the blockchain consuming the coin
b. There is a central authority maintaining the blockchain
c. Every node has a local copy of all transactions added to the blockchain so far.
Ans: (a) We can check if there is a past transaction in the blockchain consuming the coin
Q2. A malicious Alice cannot deny service to Bob by not adding any of his transactions to the block proposed by her, because:
a. Some other honest nodes in a later round will add Bob's transactions into their proposed block
b. Alice cannot forge Bob's signature
Ans: (a) Some other honest nodes in a later round will add Bob's transactions into their proposed block
Q3. Double spending attack is hard to carry out on cash-based fiat currencies because:
a. There is a serial number attached to every note
b. There is a blockchain recording every cash transaction
c. It is hard to counterfeit notes without getting caught
Ans: (c) It is hard to counterfeit notes without getting caught
Q4. The two mechanisms to incentivize honest behavior in Bitcoin are:
a. Transaction fees
b. Rewarding 100 Bitcoins
c. Block reward
d. Penalizing malicious behavior
Ans: (a) Transaction fees & (c) Block reward
Q5. Suppose we have two coins with outcomes heads or tails. Coin A comes out head with probability 0.5. Coin B comes out head with probability 0.4. Which coin has higher min-
entropy?
a. Coin B
b. Coin A
Ans: (b) Coin A
Q6. Let X be a random variable denoting the outcomes of a fair dice. What is the min-
entropy of X?
Ans: (2.5489)
Q7. In blind signatures, the signer can sign messages without knowing the contents of the message. Select one: TRUE or FALSE
Ans: (True) Q8. One can always check by verifying signatures if one of the two transactions in a double-
spend attack is a double-spend transaction. Select one: TRUE or FALSE Ans: (False)
Q9. In a Sybil attack, the attacker creates a single node with high computing power for Bitcoin mining. Select one: TRUE or FALSE
Ans: (False)
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
Related Questions
The message M is converted to message digest using the hash function H(). The sender A sends the encrypted message digest to the receiver B and the receiver decrypts the message to authenticate the sender. The private key is called Pr and the public key is called Py respectively. The message received by the receiver is?
arrow_forward
Network Security problem
Q1] Consider the RSA encryption algorithm. Suppose that a malicious user
intercepts the ciphertext C = 18 that is being sent to Alice. If Alice's public key
PUa = {5,35) is known by the malicious user, show how the malicious user will
recover the plaintext M?
[Hint: find M=?]
Note: C stands for Ciphertext,
M stands for Message (Plaintext),
PUa stand for Alice's public key.
arrow_forward
This question relates to hash functions for block ciphers
Block size = 4 bits
Hash size = 4 bits
Encryption function: Divide the key into two halves: LK and RK; Divide the plaintext into two halves: LT and RT; Then ciphertext= LC||RC where LC=LK XOR RT; and RC = RK XOR LT; where LC, RC, LT, and RT are each 2 bits; Plaintext and ciphertext are each 4 bits.
g(H) = a 4-bit string that is equal to the complement of bits in H; For example, if H=A (Hexa) = 1010 (binary); then g(H)= 0101
H0 = Initial hash = C (in Hexa)
Given message M: D9 (in Hexa);
a. Determine the hash (in hexadecimal) of the message M using Martyas-Meyer-Oseas hash function
b. Determine the hash (in hexadecimal) of the message M using Davis-Meyer hash function
c. Determine the hash (in hexadecimal) of the message M using Migayuchi-Preneel hash function
arrow_forward
Suppose Alice used a Hash function HA to encrypted her sensitive data. Everyone in the public can access her encrypted data.
Group of answer choices
She must keep HA secret and should not share it with others.
She can share HA with other users.
She must keep HA secret but can share it with others after encryption.
None of the above.
arrow_forward
Consider to use RSA with a known key IK to construct a cryptographic hash function H as follow:
Encrypt the first block, XOR the result with the second block and encrypt again, etc. Then, the last
ciphertext block is the hash value. For example,
H(M,M2) = Enc(IK, Enc(IK, M,) O M2) = h.
Show that this H does not satisfy the property of second image resistance. That is, we can find N1 and
N2 such that H(N,N2)=h.
arrow_forward
1. Let (01, 02, 03,..., 026!} be the set of permutations of the alphabet
A = {A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z},
and consider the simple substitution cryptosystem with
ok =
A B C D E F G H I J K L M
X MTAK ZQB NO LES
N O P Q R S T U V W X Y Z
IF G R V JH CY UDP W
and key k.
(a) Compute C = e(AUBUR NUNIV ERSIT YATMO NTGOM ERY, k).
(b) Compute M = d(NIZFV SXHNF IHBKF VPXIA KIHVF GP, k).
arrow_forward
a) In our lecture we discussed how Alice can use a binary Merkle tree to commit to a set of
messages S = {m₁, M₂, M3,..., mg} by providing Bob with one commitment value which is
the Merkle root. Later she can prove to Bob that some m, is in S by sending him an
authentication path containing at most [log₂ n] values. Now consider that Alice decided to
do the same but using ternary Merkle trees where every non-leaf node has three children
(instead of 2). The hash value for every non-leaf node is computed as the hash of the
concatenation of the values of its children.
i)
ii)
Suppose S = {m₁, M₂, M3, ..., mg}. Explain how Alice computes a one commitment
value to all the messages in S using the above described ternary Merkle tree. You
may use pictorial illustration.
Explain how Alice later proves to Bob that m4 is in the set S which is committed to
in the previous step.
iii)
iv)
Consider generalizing the problem of accumulator commitments using ternary
Merkle trees where S contains n…
arrow_forward
Alice computes the Secret prefix MAC (page 322: secret prefix MAC(x) = h(key || x)) for the message ”GD” (in ASCII) with key “H” (in ASCII) that both Alice and Bob know. The hash function that is used is h(x1x2x3)= g(g(x1 XOR x2) XOR x3 ) where each xi is a character represented as 8 bits, and g(x) is a 8-bit string that is equal to the complement of bits in x. For example, g(10110011) = 01001100. The MAC is 8 bits. (8-bit ASCII representation of characters is available at https://www.asciitable.com/ Take the Hexa equivalent and convert it to 8 bits each. For example character "A" is hexa 41 or 0100 0001 in bits)
What is the Secret prefix MAC computed by Alice? Show the MAC as the single character.
What information is sent by Alice to Bob?
arrow_forward
python
In simple uniform hashing, each key is assumed to have equal probability to map to any ofthe hashes in a given table of size m. Given an open-address table of size 100 and 2random keys, what is the probability that they hash to the same value? What is theprobability that they hash to different values?
arrow_forward
8.
A security system is used to encrypt the password of a cryptocurrency wallet (crypto wallet) and generate 10 different codes that the owner of the wallet can copy on 10 papers that he will hide with great care. So if a thief finds 1 of these hidden papers, he will not be able to unlock the wallet. Indeed it would be necessary to have at least 6 (any 6) codes to reconstitute the secret passphrase and unlock the wallet. How is it possible ?
arrow_forward
a. What characteristics are needed in a secure hash function?
b. What is the role of a compression function in a hash function?
c. Suppose H(m) is a collision-resistant hash function that maps a message of arbitrary bit length into an n-bit hash value. Is it true that, for all messages x, x’ with x ≠ x’, we have H(x) ≠ H(x’)? Explain your answer.
arrow_forward
Msg3. B→A : B, N1, Ks, Message2, h(B, N1, Message2)
Whereas:
h(m) represents the digest of the message (m).
{m}{K} represents the encryption of message (m) using the key (K)
PK is public key
N1 is a random number.
1. What are the main problems in Msg3?
arrow_forward
Question 1. Understand the following problem scenarios and draw their structural diagrams. a) It is possible to use a hash function but no encryption for message authentication. The technique assumes that the two communicating parties (A and B) share a common secret value S (Salt). A computes the hash value over the concatenation of M and S and appends the resulting hash value to M. Because B possesses, it can recomputed the hash value to verify. Because the secret value itself is not sent, an adversary cannot modify an intercepted message and cannot generate a false message.
b) Only the hash code is encrypted, using symmetric encryption. This reduces the processing burden for those applications that do not require confidentiality.
please give me a good
arrow_forward
Question 1. Understand the following problem scenarios and draw their structural diagrams. a) It is possible to use a hash function but no encryption for message authentication. The technique assumes that the two communicating parties (A and B) share a common secret value S (Salt). A computes the hash value over the concatenation of M and S and appends the resulting hash value to M. Because B possesses, it can recomputed the hash value to verify. Because the secret value itself is not sent, an adversary cannot modify an intercepted message and cannot generate a false message.
arrow_forward
10. Consider a hash table that uses the linear probing technique with the following hash
function f(x) = (5x+4)%11. (The hash table is of size 11). If we insert the values 3, 9, 2, 1,
14, 6, and 25 into the table, in that order, show where these values would end up in the
table?
Show all the calculations and actions that needs to perform for the values to be stored.
index 0
1
2
3
4
5
8
9
10
value
arrow_forward
1. Bob has uploaded a very large file in his online file storage. Later, he needs to download the file and verify whether the file has been modified.
A. If a cryptographic hash function can be applied, briefly describe how to use a hash function to file integrity checking?
B. Why doesn't Bob save the whole big file locally and directly compare it to the file he downloads?
arrow_forward
What is the security requirement on password hashing?
Given a password w, its hash is calculated as . This question is about the security requirement on function h.
(a) Can we use any function as h for password hashing? For example, can we use the "mod 100" function, which is a common computer science function?
(Given any integer value x, "mod 100" function works by "x mod 100," which is a value between [0, 99]; for example, if x = 105, x mod 100 = 5; x = 1000000, x mod 100 = 0;)
(b) If not, what is the security requirement on h?
arrow_forward
Question 15
For Questions 15.1 - 15.2 consider the following integers: In a RSA cryptosystem with public-
key (3233, 59), compute:
15.1 the private-key and give you final answer as an ordered pair (n, d).
arrow_forward
Question 1. Understand the following problem scenarios and draw their structural diagrams. a) It is possible to use a hash function but no encryption for message authentication. The technique assumes that the two communicating parties (A and B) share a common secret value S (Salt). A computes the hash value over the concatenation of M and S and appends the resulting hash value to M. Because B possesses, it can recomputed the hash value to verify. Because the secret value itself is not sent, an adversary cannot modify an intercepted message and cannot generate a false message.
B) Only the hash code is encrypted, using symmetric encryption. This reduces the processing burden for those applications that do not require confidentiality.
arrow_forward
2. Suppose you have the following hash table, implemented using linear
probing. The hash function we are using is the identity function, h(x) = x.
0
9
1
A
B
с
D
E
18
2
3 4
S
12 3 14
7 8
a) In which order could the elements have been added to the hash table?
There are several correct answers, and you should give all of them.
Assume that the hash table has never been resized, and no elements have
been deleted yet.
12, 14, 3, 9, 4, 18, 21
12, 9, 18, 3, 14, 21,4
12, 3, 14, 18, 4, 9, 21
9, 12, 14, 3, 4, 21, 18
9, 14, 4, 18, 12, 3, 21
6
4 21
arrow_forward
6. In a Rivest, Shamir and Adleman (RSA) cryptosystem, a particular user uses two prime
numbers P and Q to generate the public key and the private key. If P is 23 and Q is 29,
using RSA algorithm, find the following:
a) n
b) Ø(n)
c) e
d) d
arrow_forward
1. Assume user A and B are communicating with each other. They are in need to verify
the integrity of the message using hash function. User A encrypts only the hash code
that was generated by him and sends it to user B. Show how could this be done and
communication happen.
2. Now user A has decided to provide confidentiality along with the services offered in
Question 1. Illustrate the scenario in all the possible ways.
3. Alice and Bob need to share a secret key for further communication. Show how the key
can be shared using symmetric and asymmetric pattern.
4. Show the key distribution scheme in which there is high chance of man-in-the-middle
attack with suitable illustrations.
5. Explain what a nonce is and the reason for using a nonce. Discuss how certificates are
obtained from certificate authority and the certificates are exchanged between the user.
arrow_forward
1. Explain the Merkle-Damgard construction method for hash algorithms, with the help of a simple diagram.
2. If Bob happens to find two different messages M1 and M2 (each has 64 bytes), such that SHA256(M1) = SHA256(M2). Can you find another pair M3 and M4, such that SHA256(M3) = SHA256(M4)?
arrow_forward
CryptographyAn encryption function is given as f(p) = (2p + 1) mod 26 where p is the position of the input letter in English alphabets and f(p) is the position of the encrypted alphabet. Find the encrypted representation of “CS DEPT”.
Hash functionJohn, Bob, and David want to store their valuable data into storage that has 245 memory locations. Their T-numbers are 3488, 5605, and 9088, respectively. Using a hash function, identify their memory locations. Do you see any collision in this example?
arrow_forward
Problem 4
). This problem is about linear probing method we discussed in the class.
Consider a hash table of size N = 11. Suppose that you insert the following sequence of keys to
an initially empty hash table. Show, step by step, the content of the hash table.
Sequence of keys to be inserted:
arrow_forward
code in python attached please
Define a hash table with an associated hash function ℎ(?)h(k) mapping keys ?k to their associated hash value.
b) In simple uniform hashing, each key is assumed to have equal probability to map to any of the hashes in a given table of size m. Given an open-address table of size 500500 and 22 random keys, what is the probability that they hash to the same value? What is the probability that they hash to different values?
arrow_forward
2. Let (M, C, e, d, K) denote the simple substitution cryptosystem with Σ =
{0, 1, 2, 3, 4), M = C = * = {0, 1, 2, 3, 4}*, and
-(01234).
ők =
(a) Compute C= e(240014, k).
(b) Compute M = d(4130, k).
arrow_forward
11.
The deadlock in a set of transaction can be determined by
a.
Read-only graph
b.
Wait graph
c.
Wait-for graph
d.
All of the mentioned
arrow_forward
Find the greatest common divisor of 26 and 5 using Euclidean algorithm.
An encryption function is provided by an affine cipher ?:? → ?, ?(?) ≡ (5? + 8)??? 26, ? = {1,2, … , 26}Find the decryption key for the above affine cipher. Encrypt the message with the code 15and 19.
arrow_forward
SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education
Related Questions
- The message M is converted to message digest using the hash function H(). The sender A sends the encrypted message digest to the receiver B and the receiver decrypts the message to authenticate the sender. The private key is called Pr and the public key is called Py respectively. The message received by the receiver is?arrow_forwardNetwork Security problem Q1] Consider the RSA encryption algorithm. Suppose that a malicious user intercepts the ciphertext C = 18 that is being sent to Alice. If Alice's public key PUa = {5,35) is known by the malicious user, show how the malicious user will recover the plaintext M? [Hint: find M=?] Note: C stands for Ciphertext, M stands for Message (Plaintext), PUa stand for Alice's public key.arrow_forwardThis question relates to hash functions for block ciphers Block size = 4 bits Hash size = 4 bits Encryption function: Divide the key into two halves: LK and RK; Divide the plaintext into two halves: LT and RT; Then ciphertext= LC||RC where LC=LK XOR RT; and RC = RK XOR LT; where LC, RC, LT, and RT are each 2 bits; Plaintext and ciphertext are each 4 bits. g(H) = a 4-bit string that is equal to the complement of bits in H; For example, if H=A (Hexa) = 1010 (binary); then g(H)= 0101 H0 = Initial hash = C (in Hexa) Given message M: D9 (in Hexa); a. Determine the hash (in hexadecimal) of the message M using Martyas-Meyer-Oseas hash function b. Determine the hash (in hexadecimal) of the message M using Davis-Meyer hash function c. Determine the hash (in hexadecimal) of the message M using Migayuchi-Preneel hash functionarrow_forward
- Suppose Alice used a Hash function HA to encrypted her sensitive data. Everyone in the public can access her encrypted data. Group of answer choices She must keep HA secret and should not share it with others. She can share HA with other users. She must keep HA secret but can share it with others after encryption. None of the above.arrow_forwardConsider to use RSA with a known key IK to construct a cryptographic hash function H as follow: Encrypt the first block, XOR the result with the second block and encrypt again, etc. Then, the last ciphertext block is the hash value. For example, H(M,M2) = Enc(IK, Enc(IK, M,) O M2) = h. Show that this H does not satisfy the property of second image resistance. That is, we can find N1 and N2 such that H(N,N2)=h.arrow_forward1. Let (01, 02, 03,..., 026!} be the set of permutations of the alphabet A = {A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z}, and consider the simple substitution cryptosystem with ok = A B C D E F G H I J K L M X MTAK ZQB NO LES N O P Q R S T U V W X Y Z IF G R V JH CY UDP W and key k. (a) Compute C = e(AUBUR NUNIV ERSIT YATMO NTGOM ERY, k). (b) Compute M = d(NIZFV SXHNF IHBKF VPXIA KIHVF GP, k).arrow_forward
- a) In our lecture we discussed how Alice can use a binary Merkle tree to commit to a set of messages S = {m₁, M₂, M3,..., mg} by providing Bob with one commitment value which is the Merkle root. Later she can prove to Bob that some m, is in S by sending him an authentication path containing at most [log₂ n] values. Now consider that Alice decided to do the same but using ternary Merkle trees where every non-leaf node has three children (instead of 2). The hash value for every non-leaf node is computed as the hash of the concatenation of the values of its children. i) ii) Suppose S = {m₁, M₂, M3, ..., mg}. Explain how Alice computes a one commitment value to all the messages in S using the above described ternary Merkle tree. You may use pictorial illustration. Explain how Alice later proves to Bob that m4 is in the set S which is committed to in the previous step. iii) iv) Consider generalizing the problem of accumulator commitments using ternary Merkle trees where S contains n…arrow_forwardAlice computes the Secret prefix MAC (page 322: secret prefix MAC(x) = h(key || x)) for the message ”GD” (in ASCII) with key “H” (in ASCII) that both Alice and Bob know. The hash function that is used is h(x1x2x3)= g(g(x1 XOR x2) XOR x3 ) where each xi is a character represented as 8 bits, and g(x) is a 8-bit string that is equal to the complement of bits in x. For example, g(10110011) = 01001100. The MAC is 8 bits. (8-bit ASCII representation of characters is available at https://www.asciitable.com/ Take the Hexa equivalent and convert it to 8 bits each. For example character "A" is hexa 41 or 0100 0001 in bits) What is the Secret prefix MAC computed by Alice? Show the MAC as the single character. What information is sent by Alice to Bob?arrow_forwardpython In simple uniform hashing, each key is assumed to have equal probability to map to any ofthe hashes in a given table of size m. Given an open-address table of size 100 and 2random keys, what is the probability that they hash to the same value? What is theprobability that they hash to different values?arrow_forward
- 8. A security system is used to encrypt the password of a cryptocurrency wallet (crypto wallet) and generate 10 different codes that the owner of the wallet can copy on 10 papers that he will hide with great care. So if a thief finds 1 of these hidden papers, he will not be able to unlock the wallet. Indeed it would be necessary to have at least 6 (any 6) codes to reconstitute the secret passphrase and unlock the wallet. How is it possible ?arrow_forwarda. What characteristics are needed in a secure hash function? b. What is the role of a compression function in a hash function? c. Suppose H(m) is a collision-resistant hash function that maps a message of arbitrary bit length into an n-bit hash value. Is it true that, for all messages x, x’ with x ≠ x’, we have H(x) ≠ H(x’)? Explain your answer.arrow_forwardMsg3. B→A : B, N1, Ks, Message2, h(B, N1, Message2) Whereas: h(m) represents the digest of the message (m). {m}{K} represents the encryption of message (m) using the key (K) PK is public key N1 is a random number. 1. What are the main problems in Msg3?arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education