I believe that SIKE is an extrem case which allows to perform this attack with more ease.
However I suspect that by refining the attack then it could be extended to other algorithms less sensitive to power side-channel.
280 karma · joined November 23, 2018
I believe that SIKE is an extrem case which allows to perform this attack with more ease.
However I suspect that by refining the attack then it could be extended to other algorithms less sensitive to power side-channel.
> In our attack, we show that, when provided with a specially-crafted input, SIKE’s decapsulation algorithm produces anomalous 0 values that depend on single bits of the key.
It was clearly selected for this property. The attack allows to determines the number of 0s and 1s in words processed by an algorithm, so they chose an algorithm that has specific data outcomes which will produce a measurable power effect.
Modern high-end Out-of-Order processors feature over 160 physical integer registers. This number is high because OoO processors use a very large instruction window, and every instruction in this window have to be free from register name false-dependency (Write-after-Read and Write-after-Write dependency). That's the register-renaming job to introduce extra physical register to hide false-dependency. If they really emulate the behavior of an OoO processor we should expect more registers.
The large instruction window form OoO high-end processor provides latency tolerance, with VLIW processors, to increase latency tolerance, we usually increase the register count and employ more aggressive static scheduling techniques.
It is known that register-renaming technique allocates on average more registers than necessary, due to early allocation and late release, so with static scheduling it should be possible to make more efficient allocate/release. But here the register count difference is too large, low register allocation/release efficiency of register-renaming is not enough to explain the difference.
As a comparison, Transmeta VLIW core has 64 integer register and 48 integer shadow-register which is equivalent to the physical register count of OoO processors of its time.
So either they don't really emulate an out of order processor, or they do some magic, or they don't really perform that well.. (or documents that mention 32 integer registers are incorrect)
The most likely hypothesis to me is that their benchmarks numbers are based on a selection of benchmarks that can exploit their vector unit, and other uncompetitive bench results have been left out. Meaning that performance on typical x86 general purpose applications would be extremely low with this processor.
[1] https://www.tachyum.com/media/pdf/tachyum-tries-for-hypersca...
Speculative execution today (within modern high-end processor) does not execute both sides of a conditional branch.
It would indeed be a waste of power and it would be a much more complex micro-architecture.
Modern speculative OoO processors execute a single path and simply relies on the branch predictor accuracy. And they are pretty accurate, on the order of 3 misspredictions every 1000 instructions. The power consumption in unnecessary work due to a missprediction is quite low.
Modern processors consume much of their power in Out-of-Order instruction scheduling.
"speculative load" can be seen as data prefetch to a register, but with a extra instruction to put before reading/using the register. This instruction check that the memory content has been received, otherwise the instruction stall the pipeline. It allows to reorder a load before a conditional branch.
To determine whether the load has been received, there is an additional structure in the microarchitecture that tracks speculative loads in-flight. When a context switch occurs, this data-structure is overwritten, so there are additional mechanisms to replay the load in such cases.
The root of the problem is the small hash size and the fact that you can "suppress" failed hash check effects to bruteforce the hash. (it's expected that a failed hash check will cause a crash, which was intended to prevent bruteforcing)
It seems pretty standard to me, not a custom GIC as Apple.
And yes, in u-boot there are plenty of device-trees for each target. What's wrong with that?
The device tree is usually provided by the manufacturer, the compiled device tree is usually very small and allows genericity.
Most manufacturers take standardized IP and IP-providers provide an appropriate linux drivers. Few manufacturers are willing to develop and maintain their own GIC hardware and GIC driver, most of the time they just take the ARM standard GIC.
The fact that Apple does not provide drivers is a consequence of the Apple business model. And the fact that the ARM ISA does not stipulate a unique GIC is actually a strength. It makes the architecture more versatile and suitable for evolution (maybe Apple found out that the ARM standard GIC is not complete enough for them).
Anyway, both amd64 and Aarch64 are already being used outside of Macs/Apple products.
- Variable instruction sizes make the front-end more complex and limits the decoding width;
- Delayslot makes superscalar front-end more complex;
- Page size limits VIPT L1 cache size;
- Dedicated SIMD/FP architectural registers allow dedicated SIMD/FP physical register files;
...
The choice and design of the ISA is extremely important, it's hard to argue that the ARM ISA has no impact on M1&M2 performance.
But the ISA choice is obviously not enough to explain the whole performance of the M1&M2. Likewise, the manufacturing process cannot fully explain the performance of the M1&M2.
The Apple microarchitecture is by far the most performant and efficient of all high-end superscalar CPU.
But be careful with simplistic explanations, the microarchitecture is always constrained by the ISA/architecture, and the x86 ISA has some flaws that can affect the microarchitecture (least on the power consumption).
- What kind of attack do we need to prevent?
- What do we need to be protected from?
- What do we not need to be protected from?
All of this (and more) must be defined in your threat model. A threat model precisely defines what "security" means for you in your context. Without that the concept of "security" remains extremely vague and therefore it can always be called imperfect against an incredibly intrusive attack
Yes, fault attacks are well known, but this paper is about software-based fault attacks.
And as discussed in section I.A), the various integrity check mechanisms of SGX were believed to be able to protect against this.
1) Producing several uops for each cut in the vector register;
2) Producing a single uop with a size field, the vector unit know how to split the operation;
2) Producing a single uop size-agnostic, the vector unit know the size from the vector register metadata.
The worst is probably 1), it will stress the ROB, uop queue and the scheduler, and make the decoding way more complex. But solutions 2) and 3) keep the decoding simple and are much more resource efficient.
An implementation aspect that may be complicated is the vector register allocation depending on the vector-unit microarchitecture (more specifically, depending on the vector register file microarchitecture)
Macro-op fusion (alone) does not only reduce the number of uop, it could also reduces physical register usage as intermediate results are not stored into physical registers.
For instance, the indexed load pattern (ADD+LOAD) without macro-op fusion needs:
- 2 physical registers in read;
- 2 physical registers in write (one per macro-op), meaning that 2 physical registers will be allocated.
While the macro-op fused version needs:
- 2 physical registers in read;
- 1 physical register in write, meaning that a single physical register will be allocated.
Yes but a high-end core does not necessarily splits instruction the same way as RISC-V does.
For instance an indexed store:
RISC-V ISA splits it into an ADD+STORE pattern which may be recognized by macro-op fusion, while a high-end core splits it into a store_address uop (that compute the effective address and update the address field into the store-buffer entry) and a store_data uop (that update the data field into the store-buffer entry, and this uop is "address agnostic")
I don't think so, there are indeed unrealistic macro-op fusion patterns that can reasonably be described as "unfeasible" or "unrealistic".
But macro-op fusion patterns suggested in the RISC-V spec, papers about macro-op fusion on RISC-V, and the SiFive patent on macro-op fusion are realistic and feasible.
> Bruce Hoult's comment from a few months ago suggests that it wasn't really being tried at SiFive
Commits from SiFive people's in GCC [1] suggest that short-forward-branch macro-op fusion patterns are recognized by SiFive hardware.
I don't know if they recognize other macro-op fusion patterns.
But SiFive has a bunch of stuff to improve before diving into macro-op fusion.
[1]: https://patchwork.ozlabs.org/project/gcc/patch/2019043023474...
I can't say if the macro-op fusion will be enough to beat ARM & x86, but I can tell it's feasible.
There are more macro-op fusion suggestions for RISC-V precisely because RV instructions are simple. This gives more opportunity for macro-op fusion.
> so it's not clear if this is even feasible
What macro-op-fusion are you talking about exactly? Most of the macro-op-fusion suggested are quite trivial and have already been implemented
If Intel wants to put a backdoor ME would probably be a bad choice because it's a too obvious and monitored location
For instance, the int multiplier design is overengineered, very naive and far from state of the art (no pipeline, no adder compressor). I would suggest the author to check wallace tree multiplier.
But at this stage it would be preferable to use the native verilog multiply or a DSP macro to target FPGA for prototyping, and to focus the SIMT architecture and the pipelining. Arithmetic unit design is a science in its own.
However it's a beautiful project!
You can check out this thread [1] from bellingcat which shows pictures and videos of this place. And you can clearly see that there is more than one corpse.
[1]: https://twitter.com/bellingcat/status/1511284174921076736
You can check with google map for example at "50.54124726729443, 30.228596257255703" (and looking towards south-west). You will see both the satellite view and street-view matches with the pictures.
The match is not perfect because the street-view is from 2015, but it's clearly recognizable
It just forces the compiler to generate all memory accesses on this variable. And if this variable is in a cached memory region, then it opens the door to very usual cache coherency problems
Thank you for your opinion and thought process, it's very valuable !
This looks like a renaming scheme used in some old micro-architecture (Intel Core 2 maybe) where ROB receives transient results and acts as a physical regfile, at commit reg value are copied to a arch regfile. But in your uarch the physical regfile is decoupled from ROB, which must correspond to your commitQ.
I wonder if this solution is viable for a very large uarch (8 way) because read ports to copy reg value from pysical regfile to arch regfile are additional read ports that can be avoided with other (more complex) renaming scheme. These additional read ports can be expensive on a regfile that already has a bunch of ports.
Any thoughts about this?
But I haven't read much of your code yet, that's just a raw observation
Be aware though, the micro-architecture used here is very interesting but differs in many ways from state of the art industrial high-end micro-architectures for superscalar out-of-order speculative processor.
I am quite curious about how the author came up with these choices
One simple example: when you do loop unrolling, you must access elements n+4, n+8 and n+12 etc.
This does not really justify isolating that snippet if you admit yourself it's a bad one.
> The sins of the original RISC-V was spending too much time looking at RV32 and not realizing how big a problem this is in practice.
But indeed, my previous message shows that even without Zba the problem is erased by a good register allocation and macro-op fusion.
I think you are trying too hard to find special cases that "trick" RISC-V, you didn't even pay attention to the use of unsigned which is non-optimal (unsigned has an undesirable overflow semantic here).
Even with fixed (32 bit) instruction lengths aligned on 32 bit, when we have to decode a group of 8 instructions you are facing this kind of issue.
So you either have to cut the instruction group (and thus not take full advantage of the 8 way decoder) or you have to implement a more complex prefetch with a longer pipeline. And these special cases can be handled in these pipeline stages.
> It also means you cannot tell instruction boundaries until you directly fetch instructions
I mean, AMD does that on x86, with 14 instruction lengths.
It can be done for RISC-V, it's much cheaper than x86, and it takes significantly less surface area than a bigger cache to compensate.