Security questions

Security questions

par Ilias Marwane Merigh,
Number of replies: 1

Hello,

I have some questions :

1) Homework 7, "Security With security fixes", question 1.

Is it corrected if A sends K{m}, H{K, m} ? So B will decrypt K{K{m}} = m and then compare by applying H{K, m}. In other words, why do we also encrypt the hash ?

2) Homework 7, "The role of sequence numbers", question 3.

Why the solution is not only to send an integer number that increases at each send. So if a send is delayed or deleted, the receiver could verify with this integer (instead of resending all the previous messages).

So Alice could send : KB+{mi, KA−{H(nB, mi, counter)}}

Moreover, in the solution proposed there is written : "[...] at the end of their communication.". Why do they have to wait until the end of the communication ? Doesn't that imply that they will do the verification too late ?


3) Finally, I just want to make sure that the notations K{x, y} and H(x, y) means a tuple, right ?

In reply to Ilias Marwane Merigh

Re: Security questions

par Konstantinos Prasopoulos,
Hi,
1) What can an attacker do by being able to see H{K, m} because it is not encrypted? In my understanding (not at all an expert), they shouldn't be able to do much more if the hashing function is good since it won't reveal information. However, I don't see why to remove an obstacle. If in the future, an exploit is found for H, at least the hash will not have been sent as plaintext.

2) Elaborating on your proposal: Alice sends KB+{mi, KA−{H(nB, mi, counter)}} as you say. Bob decrypts using KB-, and then using KA+. Bob then does H(nB, mi, local_counter) where local_counter was set to 0 at the beginning of the communication. Therefore if msg 5 of sent by A is not received after msg 4 by B then the hashes won't match. So I'd say this should work.
I am not sure if your solution violates this part of the description "but do not modify the existing ones." but it doesn't really matter.
"Doesn't that imply that they will do the verification too late " - that depends on how the rest of the program is implemented. It could wait for the order validation step before using the data.

3) It abstractly means that x and y are fed to symmetric encryption or a hash function.