diff --git a/cw/cw.tex b/cw/cw.tex index 503d52a..b59abf4 100644 --- a/cw/cw.tex +++ b/cw/cw.tex @@ -78,13 +78,13 @@ T=2nd block - U=6th byte from the 2nd block + U=6th byte from the 2nd block (38th bit overall) V=0x33 W=0x3c - X=8th byte from the 2nd block + X=8th byte from the 2nd block (40th bit overall) Y=0x6c diff --git a/cw2/src/main.zig b/cw2/src/main.zig index 652709f..3f8d23b 100644 --- a/cw2/src/main.zig +++ b/cw2/src/main.zig @@ -77,7 +77,7 @@ pub fn main() !void { } for (changes.items) |a| { - println("Change on pos: {} '{c}'(0x{x:0>2}) -> '{c}'(0x{x:0>2})", .{ a, plain[a], plain[a], plair[a], plair[a] }); + println("Change on pos: {} '{c}'(0x{x:0>2}) -> '{c}'(0x{x:0>2})", .{ a + 1, plain[a], plain[a], plair[a], plair[a] }); println("This will update on block {} at pos {}", .{ 1 + (a - 16) / 16, 1 + (a - 16) % 16 }); println("Current cypher 0x{x:0>2}", .{cipher[a - 16]}); var after_aes = cipher[a - 16] ^ plain[a];