久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

SSL 替代 - 使用 JavaScript 加密密碼提交給 PHP 進行

SSL Alternative - encrypt password with JavaScript submit to PHP to decrypt(SSL 替代 - 使用 JavaScript 加密密碼提交給 PHP 進行解密)
本文介紹了SSL 替代 - 使用 JavaScript 加密密碼提交給 PHP 進行解密的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

我正在建立一個網站,我的付款方式將是 Google Checkout 和 Paypal.將有鏈接/按鈕將用戶重定向到安全的 Google/Paypal 站點以處理付款.這意味著我不需要為我的網站安裝 SSL 證書每年 150 美元的額外費用和復雜性.

I'm building a website and my payment methods will be Google Checkout and Paypal. There will be links/buttons which will redirect the user to the secure Google/Paypal sites for processing the payments. This means I do not need the $150/year added expense and complexity of installing SSL certificates for my site.

但是,我想在用戶登錄時加密他們的密碼,這樣如果他們在網絡上,一些運行 FireSheep 等的惡意人員就無法讀取用戶的實際密碼,因為它被發送到服務器.網站的其余部分不需要加密,因為它不是真正的敏感數據,可能會顯著降低用戶體驗.

However I would like to encrypt user's passwords as they are logging in so that if they are on a network some malicious person running FireSheep etc can't read the user's actual password as it is being sent to the server. The rest of the site doesn't need encryption as it's not really sensitive data and would probably slow the user experience down significantly.

我的想法是這可以用公鑰加密來實現.假設這個過程是這樣的:

My thoughts are this could be implemented with public key cryptography. Lets say the process goes something like this:

  1. 公鑰在 JavaScript 外部文件中,私鑰在服務器上的 PHP 中
  2. 用戶在表單中輸入他們的用戶名和密碼,然后點擊提交
  3. JavaScript 運行并加密密碼,將其存儲回文本字段
  4. 表單提交到服務器,密碼用PHP解密
  5. PHP 中的純文本密碼是加鹽的 &散列然后與數據庫中的散列進行比較.
  6. 注冊/更改密碼功能的可能流程類似.

我認為 RSA 之類的東西可以解決問題.但是我已經在網上尋找一個可用的 JavaScript 庫來完成它,但似乎沒有一個與可用的 PHP 庫兼容.無論如何,它需要生成一組與 JavaScript 和 PHP 兼容的密鑰.

I'm thinking something like RSA would do the trick. But I've hunted around the net for a working JavaScript library to do it but none seem to be compatible with the PHP libraries available. At any rate it needs to generate a set of keys that are compatible with the JavaScript and PHP.

有誰知道實際可行的解決方案嗎?如果不是我們寫一個然后開源它怎么樣.不幸的是,編寫加密/解密代碼非常復雜,所以我真的不知道現有庫在做什么以及如何修改它們以使其工作.我已經有了會話固定/劫持的保護,所以我對此不感興趣.只是對在數據到達網絡服務器之前加密數據感興趣.

Anyone know of an actual working solution for this? If not how about we write one then open source it. Unfortunately writing encryption/decryption code is pretty complex so I don't really know exactly what the existing libraries are doing and how to modify them to make it work. I already have protection for session fixation/hijacking so I'm not interested in that. Just interested in encrypting the data before it gets to the web server.

注意:請不要發布一堆指向獨立 Javascript 或 PHP 加密庫的鏈接,我已經在 Google 上找到了這些鏈接.這實際上沒有用.我需要的是 JavaScript 加密和 PHP 解密代碼,它們實際上可以和諧地協同工作以產生上述預期結果.

另外,如果您可以避免發布諸如僅使用 SSL"之類的評論.我實際上想要一個解決這個確切問題的方法,即使它不是最佳實踐,但它仍然很有趣.

非常感謝!

推薦答案

http://www.jcryption.org/ -- 是你要找的組合.

http://www.jcryption.org/ -- Is the combination you are looking for.

這篇關于SSL 替代 - 使用 JavaScript 加密密碼提交給 PHP 進行解密的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

相關文檔推薦

Joining 2 tables in SELECT(MYSQL/PHP)(在 SELECT(MYSQL/PHP) 中加入 2 個表)
How to make lt;option selected=quot;selectedquot;gt; set by MySQL and PHP?(如何使lt;option selected=“selectedgt;由 MySQL 和 PHP 設置?)
Auto populate a select box using an array in PHP(使用 PHP 中的數組自動填充選擇框)
PHP SQL SELECT where like search item with multiple words(PHP SQL SELECT where like search item with multiple words)
json_encode produce JSON_ERROR_UTF8 from MSSQL-SELECT(json_encode 從 MSSQL-SELECT 產生 JSON_ERROR_UTF8)
MySQL ORDER BY rand(), name ASC(MySQL ORDER BY rand(),名稱 ASC)
主站蜘蛛池模板: 色综合久 | 免费日本视频 | 日本精品一区二区三区视频 | 免费毛片www com cn | 中文字幕欧美一区二区 | 亚洲午夜小视频 | 狠狠干综合视频 | 欧美性a视频 | 久草欧美视频 | 亚洲成人av在线播放 | 久久精品国产久精国产 | 狠狠做深爱婷婷综合一区 | 久久精品免费观看 | 999免费视频 | 国产一区二区在线免费观看 | 综合激情网 | 成人国内精品久久久久一区 | 中文字幕第二十页 | 亚洲精品久久久久中文字幕欢迎你 | 色噜噜亚洲男人的天堂 | 亚洲精品国产一区 | 日产精品久久久一区二区福利 | 国产精品美女久久久久久久网站 | 99热热99| 久久亚洲一区二区三区四区 | 操网站| 国产成人精品免高潮在线观看 | 成人综合视频在线 | 天堂精品视频 | 欧美成人免费电影 | 涩涩视频在线观看 | www.国产.com| 91精品国产综合久久福利软件 | 成人亚洲精品久久久久软件 | 成人h视频在线观看 | 久久综合一区二区 | 亚洲国产18 | 国产亚洲精品成人av久久ww | 成人在线一区二区 | 99在线观看视频 | 国产精品久久久久久久久久久久午夜片 |