Live data from Hacker News

X86 is a high-level language

blog.erratasec.com

11–20 of 125 posts

Re: X86 is a high-level language

#11

I'm not sure what the takeaway from this is. Don't implement crypto in software, only hardware? Does that cut out algorithm-writers who won't have FPGAs and fabrication available to them?...

The takeaway is that it is extremely difficult to implement constant time calculations. It might be extended to mean that in order to have constant time crypto, you need to have a set of instructions specifically designed to be constant and predictable time.

Re: X86 is a high-level language

#12
post #6

I wonder if introducing a sleep that is longer than the computation could conceivably take would work to solve (or at least make it a lot harder to defeat) the actual problem. The failure case where the computation actually is slow enough to matter could be detected and thrown away. This of course would require a fully async crypto lib..

How about random sleeps distributed so that the mean sleep time is always the same for every computation? (and much longer than any likely computation).

timer.start();

computation();

time = timer.stop();

sleep(random_centered_on(mean-time));

Re: X86 is a high-level language

#13
post #2

[deleted]

Linking to an earlier post doesn't really do anything except fragment any conversation across two different posts. I'm sure the original poster won't take it personally that his post didn't make the front page and this one did.

Re: X86 is a high-level language

#14
post #6

I wonder if introducing a sleep that is longer than the computation could conceivably take would work to solve (or at least make it a lot harder to defeat) the actual problem. The failure case where the computation actually is slow enough to matter could be detected and thrown away. This of course would require a fully async crypto lib..

This is only if the channel is a purely-external measurement of the computation, e.g. total turnaround time time to a result. A sleep won't do anything to mask a side-channel which involves (sometimes obscure) access to the actual work being done by the processor.

Re: X86 is a high-level language

#15

I'm not sure what the takeaway from this is. Don't implement crypto in software, only hardware? Does that cut out algorithm-writers who won't have FPGAs and fabrication available to them?...

You don't have to have FPGA or ASIC capabilities to develop a great new algorithm, do you? Do your research, prove it in software, get it into a product later... right?

Re: X86 is a high-level language

#16
post #13
post #2

[deleted]

Linking to an earlier post doesn't really do anything except fragment any conversation across two different posts. I'm sure the original poster won't take it personally that his post didn't make the front page and this one did.

This is his MO on this site.

Yes, I too have noticed that things tend to get posted multiple times, or that the same fucking Jargon File entries get posted every time the previous one "expires". I just don't harp on it (much)

Re: X86 is a high-level language

#17
"high level" doesn't refer to how it is implemented.

Even a RISC instruction set can be implemented by, say, either some very slick silicon gates, or by an emulator written in Javascript.

The existence of the Javascript emulator doesn't make the RISC instruction a high level language, on the grounds that an instruction like "ADD R1, R2, R3" triggers a complicated traversal within the Javascript code.

The "level" of a language should refer to the "abstraction level". Years ago, I came to favor the definition of "abstraction level" given in the glossary of the Tunes project:

http://tunes.org/wiki/abstraction_20level.html

Re: X86 is a high-level language

#18
post #6

I wonder if introducing a sleep that is longer than the computation could conceivably take would work to solve (or at least make it a lot harder to defeat) the actual problem. The failure case where the computation actually is slow enough to matter could be detected and thrown away. This of course would require a fully async crypto lib..

That's not an effective technique, unfortunately. You still end up leaking timing information.

Lets say you add a small, random sleep after each operation – this still leaks information, as the delay can be averaged out over multiple runs. A fixed sleep after each operation is no use either, for obvious reasons.

One approach I've seen is to break time into discrete quanta – for example, you could guarantee that every operation will take an integer number of seconds to complete (i.e. an operation takes exactly 1 second, or exactly 2 seconds, or… scaled as required). There are still statistical techniques to extract timing information regardless, however!

The takeaway is the cryptography is really, really hard; system integrity is even harder.

Re: X86 is a high-level language

#19
post #3

Every major server ISA is, in this sense, "high level": the ISA is documented, but the microarchitecture isn't, and there are timing-relevant details known only to the manufacturers. Aciicmez famously demonstrated this with a timing attack on the branch prediction cache.

Any idea why the manufacturers haven't shown more interest in helping out crypto implementers? Surely timing attacks are a pretty prominent problem in microprocessor design circles by now.

Re: X86 is a high-level language

#20

"high level" doesn't refer to how it is implemented. Even a RISC instruction set can be implemented by, say, either some very slick silicon gates, or by an emulator written in Javascript. The existence of the Javascript emulator doesn't make the RISC instruction a high level language, on the grounds that an instruction like "ADD R1, R2, R3" triggers a complicated traversal within the Javascript code. The "level" of a…

I think that's the author's point: x86 is now a significant abstraction from the actual details of execution.
Post reply on HN