尽管有使用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 …Run Code Online (Sandbox Code Playgroud)