Which attacks are possible concerning my security layer concept?

前端 未结 7 1241
一个人的身影
一个人的身影 2020-12-06 05:11

Despite all the advices to use SSL/https/etc. I decided to implement my own security layer on top of http for my application... The concept works as follows:



        
7条回答
  •  遥遥无期
    2020-12-06 05:55

    It looks like you've made more complexity than is needed, as far as "home-grown" is concerned. Specifically, I see no need to involve assymetric keys. If the server already knows the user's hashed password, then just have the client generate a session id rolled into a message digest (symmetrically) encrypted via the client's hashed password.

    The best an attacker might do is sniff that initial traffic, and attempt a reply attack...but the attacker would not understand the server's response.

    Keep in mind, if you don't use TLS/SSL, then you won't get hardware-accelerated encryption (it will be slower, probably noticeably so).

    You should also consider using HMAC, with the twist of simply using the user's password as the crypto key.

提交回复
热议问题