Week 8: Fault Injection Flashcards
What do Fault Models consist of?
Location, Effects and Timing.
What are the possible Locations in a Fault Model?
Random position/width.
Specific bit/byte/instruction.
What are the possible Effects in a Fault Model?
Bit flip.
Bit stuck at zero or one.
Statistical (75% chance -> 0, etc.).
Skip instructions.
What are the possible Timings in Fault Model?
Number of affected cycles/instructions.
Timing jitter.
Describe a Generic Attack for keyed crypto algorithms?
- Get fault-free ciphertext c_ref.
- Inject fault (stuck-at-zero) for bit 0 in c_0.
2a. If c_0 = c_ref, key bit 0 = 0.
2b. Else = 1. - Repeat for all key bits.
Describe the Bellcore attack?
q = gcd(s - faulty_s, n), p=n/q
Describe the Lenstra attack?
q = gcd((faulty_sig^e) - x, n), p=n/q
Only one fault signature needed.
What are some detection-based countermeasures for fault injections?
Monitor environment - detect injection.
Detect faulty result - parallel or sequential.
Detect unusual usage patterns.
What are some algorithmic countermeasures for fault injections?
RSA/ECC - verify signature after signing.
AES - backwards rounds (check intermediate values).
Randomization in time - added delays = harder to inject.
Infective computation - fault randomizes result.
What are the prerequisites for Rowhammer?
Uncached memory access - write to RAM.
Fast memory access.
Specific row targeting - reverse engineer mapping functions.
Describe a DFA attack on AES?
Injected fault - diff(z, z’) (before SubBytes in final round)
Observe outputs y, y’
Find k that satisfy:
S^-1(k XOR y) XOR S^-1(k XOR y’) = diff(z, z’)
Repeat new inputs until found.
What is the fault model for a generic attack on keyed algorithms?
Location: specific key bit
Timing: specific bit
Effect: bit stuck at zero
What is the fault model for Bellcore/Lenstra?
Location: random
Timing: only one sub exp.
Effect: any
What is the fault model for an attack on AES?
Location: specific bit
Timing: before SubBytes in final round
Effect: flip bit
Explain Rowhammer?
1.) Find target location and release back to OS.
2.) Make page table appear at target location.
3.) Fill physical memory with page tables.
4.) Flip in target PTE likely gives access to page table -> now has kernel privilages.