本地网络服务器上的双向加密可能被盗

发布于 2024-09-27 07:40:48 字数 236 浏览 4 评论 0原文

我有一台离线信息亭计算机,它将运行 LAMP Web 服务器并托管表格供人们填写。他们提交的数据将被加密并存储在 MySQL 数据库中(全部存储在该机器本地)。

令人担忧的是,如果整个盒子被盗,有人可能能够进入代码、查看加密密钥并解密数据。

有没有什么方法可以完成此设置,即使整台机器被盗,加密数据也毫无用处? (即,加密密码保存在其他地方,但仍然允许在使用信息亭时对新输入的表单数据进行加密和存储)?

谢谢。

I have an offline kiosk computer that will be running a LAMP web server and hosting a form for people to walk up and fill out. The data they submit will be encrypted and stored in a MySQL database (all stored locally on that machine).

The concern is that if the entire box was stolen, someone would potentially be able to get into the code, see the encryption keys and decrypt the data.

Is there any way to accomplish this set up in a way renders the encrypted data useless even if the entire machine is stolen? (i.e. an encryption password that is kept elsewhere, but still allows the newly entered form data to be encrypted and stored while the kiosk is in use)?

Thanks.

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

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

发布评论

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

评论(3

听风念你 2024-10-04 07:40:48

你的“攻击者”有多聪明?

你可以,但钥匙在内存中,这样当机器断电时它就会(有点)消失。为此,您可以安装一些 ram 作为分区(ramdisk),并让代码从那里加载密钥。

但是,防止密钥永远接触磁盘可能很困难。例如,操作系统可以将其交换。

编辑:

聪明的攻击者可以通过以下任一方式规避此问题:

  1. 在窃取盒子之前复制密钥
  2. 在磁盘周围挖掘以找到密钥..或者可能是其中的一部分并暴力破解其余部分。正如我所说,防止密钥接触磁盘可能很困难。

您还可以进行一些轻微的反逆向工程,并将代码拼凑在一起。这样,读出它就不会那么简单(但也不是那么困难)。

How smart are your "attackers"?

You could but the key in ram, that way it would (kind of) disappear when the machine looses power. To do this you can mount some ram as a partition (ramdisk) and let the code load the key from there.

But, keeping the key from ever touching the disk can be difficult. The OS can, for example, swap it out.

Edit:

Smart attackers could circumvent this by either:

  1. Copying the key before they steal the box
  2. Dig around the disk in order to find the key.. or maybe parts of it and brute force the rest. As I said, keeping the key from ever touching the disk can be difficult ..

You could also do some light anti reverse-engineering and piece the code together in the code. That way, it would not be trivial (but not that hard either) to read it out.

〃安静 2024-10-04 07:40:48

您可以使用非对称加密算法(例如 RSA)来实现此目的。有了这个,你将拥有一对密钥,一个私钥和一个公钥。顾名思义,公钥将对每个人都可用,因此可以使用该公钥对用户数据进行加密,而加密的数据只能使用相应的私钥进行解密,而私钥在旅游箱中机器所有者将保留。因此,即使有人窃取了您的机器,人们也很难解密数据。

You can use the Asymmetric encryption algorithms (Ex. RSA) to achieve this. With that you will be having a pair of keys, a private and a public. And as the name suggest , the public key will be available to everyone, so the user data can be encrypted with this public key, and the encrypted data is only decrypted using the corresponding private key, which in tour case machine owner will keep. Thus Even in case someone steal your machine, it will be very difficult for person to decrypt the data.

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