使用javascript加密解密足够安全

发布于 2024-10-09 12:15:19 字数 457 浏览 0 评论 0原文

这是 javascript 库: jsencryption.js

我想用它来:

  1. 加密数据我网站中的用户,然后发送到数据库服务器。
  2. 将加密数据从数据库发送到浏览器客户端,用户输入密钥,然后

显示原始数据。

3.数据库不保存密钥,因此更安全。

我想知道这条路是否足够安全,http://www.passpack.com/ 怎么样? en/home/

passpack.com 如何保存密码。

谢谢

this is the javascript library: jsencryption.js

i want to use it to :

  1. Encryption the data of users in my site ,and then send to the database server .
  2. send the Encrypted data from database to browser-client , the user put the key, and

then show the raw data .

3 . the databse not save the key , so it is more safe .

i want to know the way is or not safe enough , what about http://www.passpack.com/en/home/

and How the passpack.com save the password .

thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

ゞ花落谁相伴 2024-10-16 12:15:19

您链接到的 jsencryption.js 库声明以下内容

  • 使用的加密是 256 位 AES ,美国政府使用的标准
  • 与常规密码保护不同,一切都是使用 JavaScript 在浏览器本地完成的,因此您的未加密信息永远不会出现在互联网上,甚至不会出现在服务器上!
  • 只要您保密密钥,加密文本就是安全的。不要丢失钥匙。如果你这样做,没有人可以帮助你!

所以,是的,如果密码足够强,这看起来非常安全(除非有人弄乱用户的浏览器或计算机,例如键盘记录器或恶意 Firefox 插件或网站本身破坏脚本)。

The jsencryption.js library you link to claims the following

  • The encryption used is 256-bit AES, the standard used by the US Government
  • Unlike regular password protection, everything is done locally in the browser using JavaScript, so your unencrypted information is never on the internet, not even on the server!
  • The encrypted text is safe as long as you keep the key secret. Do not lose the key. If you do, no one can help you!

So, yes, if the password is strong enough this looks to be very secure (unless someone messes with the user's browser or computer, think keylogger or malicious firefox plugin or the site itself undermining the script).

<逆流佳人身旁 2024-10-16 12:15:19

似乎有几种 JavaScript AES-256 加密实现,包括:

在使用其中任何一个之前,您应该使用 AES 测试向量对其进行测试。 hanewin.net 的实现[声称这样做][1]。

[1]: - http://www.hanewin.net/encrypt/aes/aes。 htm

但是,我对您的底层设计有一些疑问。你的威胁模型是什么?很多人都考虑过在浏览器中完成加密/解密。但这并不一定更安全,就好像有人闯入服务器一样,他们可以在浏览器的 JavaScript 中设置陷阱。当然,这可以防止有人破坏您的数据库服务器并下载表,但服务器端加密也可以做到这一点。服务器端加密的一大优势是您可以使用 OpenSSL 等受信任的模块,而不必担心 JavaScript 实现的质量。

It seems that there are several JavaScript AES-256 encryption implementations around, including:

Before you use any of these, you should test them with the AES test vectors. The implementation from hanewin.net [claims to do so][1].

[1]: - http://www.hanewin.net/encrypt/aes/aes.htm

However, I have some questions about your underlying design. What's your threat model? Lots of people have looked at having encryption/decryption done in the browser. But that's not necessarily more secure, as if somebody breaks in to the server they can booby-trap the browser's JavaScript. Certainly this will keep you protected against somebody compromising your database server and downloading the tables, but server-side encryption would do that as well. And the big advantage of server-side encryption is that you can use trusted modules like OpenSSL and not have to worry about the quality of the JavaScript implementations.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文