我可以对计算机系统给予多少信任? 如何衡量信任?

发布于 2024-07-17 14:51:01 字数 214 浏览 11 评论 0原文

我对运行 Windows 的标准计算机有多少信任? 我能在多大程度上确定它会按照我编写的方式运行我的代码? 我如何确定如果我声明类似“int j = 5;”的内容,j 将始终为 5? 有没有办法衡量标准 x86 计算机系统中的信任度? 有什么样的保护措施来确保 j = 5?

我正在考虑关键系统,其中任何东西都不能有哪怕一点点的偏差,并且一切都必须完全按照其编写的运行方式运行。

How much trust can I put in a standard computer running windows? To what certainty can I be sure it will run my code the way I wrote it? How can I be sure that if I declare something like "int j = 5;", j will alway be 5? Is there a way to measure trust in a standard x86 computer system? What kind of protections are there to make sure that j = 5?

I'm thinking about critical systems where nothing can be off even by one bit and everything must run exactly the way it was written to run.

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

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

发布评论

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

评论(4

榕城若虚 2024-07-24 14:51:01

如果“任何事情都不能有一丝一毫的偏差”,那么一般来说,唯一的方法就是拥有三台计算机:

  • 都必须使用不同的硬件,
  • 都必须使用不同的操作系统;
  • 编写
  • 应用软件必须由不同的人 应用程序必须使用不同的编译器进行编译

所有三台计算机都被给予相同的输入并计算输出。 如果两个或多个输出相同,则接受,否则标记错误条件。

您可能会看到,尽管在航空电子设备和类似的关键系统中使用了变体,但这个完整的系统从未在实践中使用过。

If "nothing can be off by even a single bit", the only way in general to do this is to have three computers:

  • all must use different hardware
  • all must use different OS;s
  • the application software must have been written by different people
  • the application must be compiled using different compilers

All three computers are given the same inputs and calculate the output. If two or more outputs are the same, this is accepted, otherwise an error condition is flagged.

You can probably see that this full system is never used in practice, althogh variants are used in avionics and similar critical systems.

隔纱相望 2024-07-24 14:51:01

这是关于有人恶意更改您的代码以执行您未编程执行的操作的可能性吗? 或者是随机错误可能会扰乱你的计算? 在后一种情况下,您可能不必担心,因为现代计算机上的错误率约为 10^17 中的 1 - 每个处理器每年不到一个,如果即使这是无法忍受的,您也可以使用纠错根据需要将有效错误率降低到接近于零的算法(代价是需要更多时间来完成给定的计算)。

不过,如果您担心的是黑客……那么实际上根本就没有安全性的期望。 原则上,对计算机进行物理控制的人可以对其进行修改,以完成计算机可以完成的任何事情。 如果他们愿意,他们可以反汇编您的代码并随意更改汇编指令,以使您的程序按照他们想要的方式运行。 不过,在实践中我们通常不会担心这一点,因为我们大多数人都没有编写任何值得花精力去破解的东西。 那些设计军事加密硬件或核导弹控制芯片的程序员可以依靠防篡改硬件,这使得更改代码变得极其困难。 (不过,这些东西可能很贵)

您可能想看一下罗斯·安德森(Ross Anderson)写的一本名为“安全工程”的书,其中描述了一些这种防篡改硬件,以及一般来说人们如何真正 需要保护他们的代码可以这样做。

Is this about the possibility of someone malicious altering your code to do something you didn't program it to do? Or is it about the possibility of random errors messing up your computation? In the latter case, you probably don't have to worry because the error rates on modern computers are something like 1 in 10^17 - that's less than one per processor per year, and if even that is intolerable you can use error-correcting algorithms to reduce the effective error rate as close to zero as you want (at the cost of needing more time to do a given computation).

If it's hackers you're worried about, though... there's really no expectation of security at all. Someone in physical control of a computer can, in principle, modify it to do absolutely anything that can conceivably be done by a computer. They could disassemble your code and alter assembly instructions at will, if they want, to make your program behave however they want it to. We don't usually worry about this in practice, though, because most of us aren't writing anything worth the effort to hack. Those who are, e.g. programmers designing military encryption hardware or nuclear missile control chips, can fall back on tamper-resistant hardware which makes it extremely difficult to alter the code. (That stuff can be expensive, though)

You might want to take a look at a book called "Security Engineering" by Ross Anderson, which describes some of this tamper-resistant hardware, and in general how people who really need to secure their code can do so.

南烟 2024-07-24 14:51:01

本质上,没有。 您应该阅读这篇文章,并考虑重新评估您的信任概念。 :-)

Essentially, none. You should read this article, and consider reevaluating your concept of trust. :-)

淡写薰衣草的香 2024-07-24 14:51:01

像“j=5”这样简单的东西不能绝对可信。

有很多方法可能会导致一位错误:

  • CPU 确实有勘误表。
  • 硬盘驱动器随着老化可能会返回错误
  • 内存可能会被宇宙射线损坏
  • 松动/脏污等。 系统中任意位置的连接。
  • 驱动程序会损坏内存(包括代码页)。

Something as simple as "j=5" cannot be absolutely trusted.

There are so many ways you could have a single bit error:

  • CPU's do have errata.
  • Hard drives could return errors as they age
  • Memory can be corrupted by cosmic rays
  • Loose/dirty/etc. connections anywhere in the system.
  • Drivers do corrupt memory (including code pages).
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文