def bf_unop_op
bend-osdev-legacy-ciphers@0.1.0.0 · PROOF.bend:1580
import bend-osdev-legacy-ciphers@0.1.0.0/PROOF.bend as PROOF
import Base
import bend-osdev-legacy-ciphers@0.1.0.0/legacy_ciphers.bend as L
import bend-osdev-legacy-ciphers@0.1.0.0/blowfish.bend as BF
1580def bf_unop_op(o: BF.LcBfOp, b: L.LcBlock64) -> {b == BF.bf.unop(o, BF.bf.op(o, b)) : L.LcBlock64}:
1581 match o:
1582 case BF.LcBfRound{+p, +t}:
1583 match b:
1584 case L.LcBlock64{+l, +r}:
1585 %u32_xx(l, p) : {L.LcBlock64{l, r} == L.LcBlock64{_, U32.xor(U32.xor(r, BF.bf.f(t, U32.xor(l, p))), BF.bf.f(t, U32.xor(l, p)))} : L.LcBlock64}
1586 %u32_xx(r, BF.bf.f(t, U32.xor(l, p))) : {L.LcBlock64{l, r} == L.LcBlock64{l, _} : L.LcBlock64}
1587 {==}
1588 case BF.LcBfFinal{+p17, +p18}:
1589 match b:
1590 case L.LcBlock64{+l, +r}:
1591 %u32_xx(l, p17) : {L.LcBlock64{l, r} == L.LcBlock64{_, U32.xor(U32.xor(r, p18), p18)} : L.LcBlock64}
1592 %u32_xx(r, p18) : {L.LcBlock64{l, r} == L.LcBlock64{l, _} : L.LcBlock64}
1593 {==}