Несмотря на все советы по использованию SSL/https/etc. Я решил реализовать свой собственный уровень безопасности поверх 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 содержать конфиденциальную информацию)... но я предвзятый, поэтому я спрашиваю - обеспечивает ли моя реализация безопасности... безопасность?