rookiejin 最近的时间轴更新
rookiejin

rookiejin

V2EX 第 271057 号会员,加入于 2017-11-29 14:36:17 +08:00
rookiejin 最近回复了
2019-08-28 09:49:29 +08:00
回复了 NoKey 创建的主题 程序员 在没有 https 的情况下,如何确保用户登录安全
这还是不安全的,
https 是在握手的时候把公钥下发,客户端拿着公钥签名了,中间人获取到内容也看不到真实的东西,

以你的例子来说,其实是不想把密码以明文的方式提交到服务器,
其实可以做成 rsa 加密一下(跟 https 差不多)

服务器存私钥,客户端放公钥,

客户端公钥加密数据,服务器私钥解密数据

提交的数据如下:


加密内容:

password=123465


加密后:

{"sign":"xxxxxxxxxxxxxxxxxxx"}


服务器解出 sign 就行了。
关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   3343 人在线   最高记录 6543   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 11ms · UTC 13:26 · PVG 21:26 · LAX 06:26 · JFK 09:26
Developed with CodeLauncher
♥ Do have faith in what you're doing.