cryptography - Is it common to negotiate which DH group is used during a Diffie-Hellman key exchange? -


when read descriptions how dh key exchange works, there's no mention of how key-exchangers came agreement on "group" (the p , g parameters) should used compute public , private values. looking @ rfc 5114, seems there quite few choices.

i'd know if negotiation typically done during exchange itself, , if not, if there's description somewhere regarding how algorithm different if included step.

thanks reading.

the p , g values safe pass unencrypted. if client/server on network, either client or server generates p/g values , passes them via network sockets. long secret number each client/server kept secret (duh..) diffie-hellman exchange can said safe attacker have compute g^(ab) mod p = g^(ba) mod p (which leads infinite amount of solutions infeasible compute given p value big enough).

essentially basic d-h exchange goes follows:

party generates p, g, values. g base/generator, p prime modulo, secret power.

party b (concurrently) generates secret value b.

party computes g^a mod p (we call value thereafter a)

party , sends p, g , across transmission medium.

party b receives p, g, a.

party b computes g^b mod p (we call value thereafter b).

party b sends b across transmission medium.

party receives b.

party computes b^a mod p , obtains shared secret.

party b (concurrently) computes a^b mod p , obtains shared secret.

note: if p value small, may computational cheaper iterate through 0 p - 1 depends on after generate common secret.


Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

css - Firefox for ubuntu renders wrong colors -