尽管所有人都建议使用SSL/https/等,但我还是决定在http之上为我的应用程序实现自己的安全层……该概念的工作原理如下:
User registers -> a new RSA Keypair is generated
the Private Key gets encrypted with AES using the users login Password
(which the server doesnt know - it has only the sha256 for authentication...)
Server stores the hash of the users password
and the Encrypted Private Key and Public Key
User logs in -> authenticates with nickname+password hash
(normal nick/password -> IP-bound sessionid authentication)
Server replies: sessionid, the Encrypted RSA Private Key
and an Encrypted randomly generated Session Communication Password
Client decrypts the RSA Private Key with the users Password
Client decrypts the Session Communication Password with the RSA Private Key
---> From this point on the whole traffic gets AES-encrypted
using that Session Password
我在链中没有发现漏洞-私钥和登录密码都不会以明文形式发送到服务器(我没有使用Cookie,以排除HTTP Cookie报头包含敏感信息的可能性)……但我是有偏见的,所以我问-我的安全实现是否提供了足够的……保安?
https://stackoverflow.com/questions/3604582
复制相似问题