duanruinong0619 2011-11-26 04:13
浏览 90
已采纳

安全登录页面:javascript md5 function vs SSL,如果登录块在主页面上

I'm thinking of increasing security when transfer login and password from sign in page. I've found a javascript md5 function in the Internet so the first way to send password is to send md5 hash instead of the password using POST method. As I understand there are still many problems with that and that method should be improved. Passwords in the database are not stored, only md5 hash (with some other functions are also used to complicate it a bit) stored. But, my question is: does it all make sense or better to prefer ssl encryption from hosting provider? It costs about $100 per year (let's suppose that a good price regarding my question) instead of reinventing the wheel. The minus of ssl (if I'm not wrong) is: if login part is on the main page, the main page will load slower (although Yahoo! login page with https loads pretty fast) and any user will see https in the browser string (that's not bad, but is it good?)

How is the idea to use (no SSL): 1)wher user logs in, md5(password) is sent instead of his real password 2)server receives md5(password), makes it md5(md5(password)+'kjhgkjhg') and compares with a hash that is stored in the db. db stores md5(md5(password)+'kjhgkjhg') hashes for all users. As result, if md5(password) is sniffed, it will not help to get md5(md5(password)+'kjhgkjhg') because 'kjhgkjhg' is not known. Is it good a good enough way to make the login page secured?

Thank you.

  • 写回答

2条回答 默认 最新

  • dpmopn8542 2011-11-26 08:59
    关注

    You would need to get browser to create hash MD5(password + random()) and send that instead of MD5(password) so that no one could use the hash in the future. Then you would need to have the clear text or two-way crypted password in the server and do the same in the server end and compare the results. You will need to save the random string sent to browser in the server so that same random cannot be used again. This would work, but.

    • Someone could hijack the session in the middle. Just capture the cookies and use same IP and server is all defenseless.
    • Without SSL user has no way of knowing he/she has contacted the correct server and the content is unaltered.
    • The user's website address and traffic can still be read by man in the middle or trojans on his/her computer.
    • Usually the browser password saving fails.

    But yes. SSL tends to be slow and those darn certificates expire and break everything.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度
  • ¥30 关于#r语言#的问题:如何对R语言中mfgarch包中构建的garch-midas模型进行样本内长期波动率预测和样本外长期波动率预测
  • ¥15 ETLCloud 处理json多层级问题
  • ¥15 matlab中使用gurobi时报错
  • ¥15 这个主板怎么能扩出一两个sata口
  • ¥15 不是,这到底错哪儿了😭
  • ¥15 2020长安杯与连接网探
  • ¥15 关于#matlab#的问题:在模糊控制器中选出线路信息,在simulink中根据线路信息生成速度时间目标曲线(初速度为20m/s,15秒后减为0的速度时间图像)我想问线路信息是什么