Skip to content

Commit

Permalink
insomnihack2017: fix description of vshufnet
Browse files Browse the repository at this point in the history
  • Loading branch information
nneonneo committed Jan 24, 2017
1 parent f74c399 commit 14b55fc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion insomnihack-teaser2017/crypto400-encryptor/readme.md
Expand Up @@ -67,7 +67,7 @@ The round function breaks down as
o2 = vpshufb(vpxor(y2, r1), getvec(constants, 0x220))
o3 = vpshufb(vpxor(y2, r3), getvec(constants, 0x240))

where `vshufnet` is a complicated function mapping a single input to a single output involving a bunch of weird shifts and such. The `vpshufb`s are all invertible thanks to the particular constants chosen.
where `vshufnet` is a complicated function mapping a single input to a single output involving a bunch of shuffles and XORs. The `vpshufb`s are all invertible thanks to the particular constants chosen.

By calculating `o0 ^ invshuf(o1)` we can recover `r0^r2 = x0`, which lets us get `y0`. Similarly, `invshuf(o2) ^ invshuf(o3)` gives `r1^r3 = x1`, which yields `y1` and then `y2` (just by running the forward calculations for `y0`, `y1`, and `y2`). With `y1` and `y2`, we can calculate `r0` through `r3` and thereby invert the round function.

Expand Down

0 comments on commit 14b55fc

Please sign in to comment.