OpenID中dh_modulus和dh_gen的值
在OpenID过程的关联阶段,使用Diffie-Hellman对OpenID.session_type值进行加密。为了使用 diffie-hellman,我们必须生成 dh_modulus(p) 和 dh_gen(g) 值。我的问题是,每次向 OpenID 提供商发送 OpenID 请求时,还是仅在发送新关联时,是否必须生成 p 和 g 值。
In the association stage of the OpenID process, Diffie-Hellman is used to encrypt the OpenID.session_type value. For using diffie-hellman, we have to generate the value of dh_modulus(p) and dh_gen(g) values. My question is, do I have to generate p and g values each time I send a OpenID request to an OpenID Provider or only during those times when I send a new association.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你根本不需要生成它,因为你可以使用默认的模数和dh_gen。
如果您仍然愿意,它仅在关联期间发送,因为它仅用于传输共享秘密。在所有后续请求中,仅传输关联句柄。
至于生成方法,我建议查看Diffie-Hellman Key Exchange rfc。
You don't need to generate it at all, because you can use the default modulus and dh_gen.
And if you still want to, it's sent only during an association, because it's used only to transmit a shared secret. In all subsequent requests, only the association handle is transmitted.
As for generation method, i suggest looking at the Diffie-Hellman Key Exchange rfc.