SE547: Timing channels [13/23] |
Adding a clock to the language can break noninterference:
finishL = System.getTimeMillis () + 1000; while (secretH && System.getTimeMillis () < finishL) { } if (System.getTimeMillis () < finishL) { resultL = 0; } else { resultL = 1; }
What happens in initial memory { secretH
= 0, everything else = 0 }?
What happens in initial memory { secretH
= 1, everything else = 0 }?