# What E means in Diffie Hellman protocol?

I was looking for an example of protocol to verify user's identity using Diffie Hellman which works like this:

• client sends: $g^x$, ID-Number
• server responds with: $g^y$, $E_H_{pwd} challenge$
• client responds with: challenge

I understand that g^x, g^y are Diffie Hellman keys, plus it's given that H is a hash function and pwd is the user's password but what does E mean here?

• I think it's encryption function but what do they mean by giving it H(pwd)?
– Algo
May 29, 2022 at 19:37
• where did you get that screenshot from? May 29, 2022 at 19:55
• You should tell us where did you get this. You might be right about encryption since it is common to write the key as sub index. May 29, 2022 at 20:08
• Could you provide a link to the source of the image ( It is better to be a paper) by editing your question? May 30, 2022 at 12:10

$$E_{H_{\text{pwd}}} (\text{challenge})$$

This is a symmetric encryption of the challenge, using a hash of the password as the key.

That said, this protocol isn't that great if the password has weak entropy (which human entered passwords tend to have). If there is an eavesdropper, he will hear both the plainext $$\text{challenge}$$ and the corresponding ciphertext $$E_{H_{\text{pwd}}} (\text{challenge})$$; what he can do is go through his dictionary of passwords, and for each one, hash it, attempt to decrypt the ciphertext, and see if he gets the known plaintext.

• How did you know that it's symmetric? it could be non-symmetric as well...
– Omer
May 30, 2022 at 4:44
• @Omer. In non symmetric settings $H({pwd})$ would be the public key whose private key is only known by the owner. Unless for Identity Based Encryption in which you define $H$ as the function that obtains someone''s public key from the identity and $pwd$ as the said identity, I cannot see how it can be non symmetric May 30, 2022 at 5:06

$$E$$ is a keyed symmetric encryption function such as AES or CHACHA. The hash of the password is being used as the key of the encryption function and "challenge" is being used as the plaintext. The client can recover the challenge value because they know their password and can hash it to retrieve the symmetric key and decrypt. This would be hard for anybody that does not know (or cannot work out) the hash of the client's password.

• How did you know that it's symmetric? it could be non-symmetric as well...
– Omer
May 30, 2022 at 4:44