def ap.out0
bend-osdev-aes@0.1.0.0 · PROOF.bend:1867
import bend-osdev-aes@0.1.0.0/PROOF.bend as PROOF
import Base
import bend-osdev-gf@0.1.1.0/gf.bend as G
import bend-collections@1.0.0.0/src/crypto/aes/sbox.bend as SB
1867def ap.out0(+a: U32, +b: U32, +c: U32, +d: U32) -> {G.Gf8.add(G.Gf8.add(G.Gf8.mul(G.Gf8.aes(), 14, U32.xor(U32.xor(U32.xor(SB.xtime(U32.and(255, a)), SB.mul3(U32.and(255, b))), U32.and(255, c)), U32.and(255, d))), G.Gf8.mul(G.Gf8.aes(), 11, U32.xor(U32.xor(U32.xor(U32.and(255, a), SB.xtime(U32.and(255, b))), SB.mul3(U32.and(255, c))), U32.and(255, d)))), G.Gf8.add(G.Gf8.mul(G.Gf8.aes(), 13, U32.xor(U32.xor(U32.xor(U32.and(255, a), U32.and(255, b)), SB.xtime(U32.and(255, c))), SB.mul3(U32.and(255, d)))), G.Gf8.mul(G.Gf8.aes(), 9, U32.xor(U32.xor(U32.xor(SB.mul3(U32.and(255, a)), U32.and(255, b)), U32.and(255, c)), SB.xtime(U32.and(255, d)))))) == U32.and(255, a) : U32}:
1868 %Equal.sym(U32, G.Gf8.mul(G.Gf8.aes(), 14, U32.xor(U32.xor(U32.xor(SB.xtime(U32.and(255, a)), SB.mul3(U32.and(255, b))), U32.and(255, c)), U32.and(255, d))), G.Gf8.add(G.Gf8.add(G.Gf8.mul(G.Gf8.aes(), 14, SB.xtime(U32.and(255, a))), G.Gf8.mul(G.Gf8.aes(), 14, SB.mul3(U32.and(255, b)))), G.Gf8.add(G.Gf8.mul(G.Gf8.aes(), 14, U32.and(255, c)), G.Gf8.mul(G.Gf8.aes(), 14, U32.and(255, d)))), ap.row(14, SB.xtime(U32.and(255, a)), SB.mul3(U32.and(255, b)), U32.and(255, c), U32.and(255, d))) : {G.Gf8.add(G.Gf8.add(_, G.Gf8.mul(G.Gf8.aes(), 11, U32.xor(U32.xor(U32.xor(U32.and(255, a), SB.xtime(U32.and(255, b))), SB.mul3(U32.and(255, c))), U32.and(255, d)))), G.Gf8.add(G.Gf8.mul(G.Gf8.aes(), 13, U32.xor(U32.xor(U32.xor(U32.and(255, a), U32.and(255, b)), SB.xtime(U32.and(255, c))), SB.mul3(U32.and(255, d)))), G.Gf8.mul(G.Gf8.aes(), 9, U32.xor(U32.xor(U32.xor(SB.mul3(U32.and(255, a)), U32.and(255, b)), U32.and(255, c)), SB.xtime(U32.and(255, d)))))) == U32.and(255, a) : U32}
1869 %Equal.sym(U32, G.Gf8.mul(G.Gf8.aes(), 11, U32.xor(U32.xor(U32.xor(U32.and(255, a), SB.xtime(U32.and(255, b))), SB.mul3(U32.and(255, c))), U32.and(255, d))), G.Gf8.add(G.Gf8.add(G.Gf8.mul(G.Gf8.aes(), 11, U32.and(255, a)), G.Gf8.mul(G.Gf8.aes(), 11, SB.xtime(U32.and(255, b)))), G.Gf8.add(G.Gf8.mul(G.Gf8.aes(), 11, SB.mul3(U32.and(255, c))), G.Gf8.mul(G.Gf8.aes(), 11, U32.and(255, d)))), ap.row(11, U32.and(255, a), SB.xtime(U32.and(255, b)), SB.mul3(U32.and(255, c)), U32.and(255, d))) : {G.Gf8.add(G.Gf8.add(G.Gf8.add(G.Gf8.add(G.Gf8.mul(G.Gf8.aes(), 14, SB.xtime(U32.and(255, a))), G.Gf8.mul(G.Gf8.aes(), 14, SB.mul3(U32.and(255, b)))), G.Gf8.add(G.Gf8.mul(G.Gf8.aes(), 14, U32.and(255, c)), G.Gf8.mul(G.Gf8.aes(), 14, U32.and(255, d)))), _), G.Gf8.add(G.Gf8.mul(G.Gf8.aes(), 13, U32.xor(U32.xor(U32.xor(U32.and(255, a), U32.and(255, b)), SB.xtime(U32.and(255, c))), SB.mul3(U32.and(255, d)))), G.Gf8.mul(G.Gf8.aes(), 9, U32.xor(U32.xor(U32.xor(SB.mul3(U32.and(255, a)), U32.and(255, b)), U32.and(255, c)), SB.xtime(U32.and(255, d)))))) == U32.and(255, a) : U32}
1870 %Equal.sym(U32, G.Gf8.mul(G.Gf8.aes(), 13, U32.xor(U32.xor(U32.xor(U32.and(255, a), U32.and(255, b)), SB.xtime(U32.and(255, c))), SB.mul3(U32.and(255, d)))), G.Gf8.add(G.Gf8.add(G.Gf8.mul(G.Gf8.aes(), 13, U32.and(255, a)), G.Gf8.mul(G.Gf8.aes(), 13, U32.and(255, b))), G.Gf8.add(G.Gf8.mul(G.Gf8.aes(), 13, SB.xtime(U32.and(255, c))), G.Gf8.mul(G.Gf8.aes(), 13, SB.mul3(U32.and(255, d))))), ap.row(13, U32.and(255, a), U32.and(255, b), SB.xtime(U32.and(255, c)), SB.mul3(U32.and(255, d)))) : {G.Gf8.add(G.Gf8.add(G.Gf8.add(G.Gf8.add(G.Gf8.mul(G.Gf8.aes(), 14, SB.xtime(U32.and(255, a))), G.Gf8.mul(G.Gf8.aes(), 14, SB.mul3(U32.and(255, b)))), G.Gf8.add(G.Gf8.mul(G.Gf8.aes(), 14, U32.and(255, c)), G.Gf8.mul(G.Gf8.aes(), 14, U32.and(255, d)))), G.Gf8.add(G.Gf8.add(G.Gf8.mul(G.Gf8.aes(), 11, U32.and(255, a)), G.Gf8.mul(G.Gf8.aes(), 11, SB.xtime(U32.and(255, b)))), G.Gf8.add(G.Gf8.mul(G.Gf8.aes(), 11, SB.mul3(U32.and(255, c))), G.Gf8.mul(G.Gf8.aes(), 11, U32.and(255, d))))), G.Gf8.add(_, G.Gf8.mul(G.Gf8.aes(), 9, U32.xor(U32.xor(U32.xor(SB.mul3(U32.and(255, a)), U32.and(255, b)), U32.and(255, c)), SB.xtime(U32.and(255, d)))))) == U32.and(255, a) : U32}
1871 %Equal.sym(U32, G.Gf8.mul(G.Gf8.aes(), 9, U32.xor(U32.xor(U32.xor(SB.mul3(U32.and(255, a)), U32.and(255, b)), U32.and(255, c)), SB.xtime(U32.and(255, d)))), G.Gf8.add(G.Gf8.add(G.Gf8.mul(G.Gf8.aes(), 9, SB.mul3(U32.and(255, a))), G.Gf8.mul(G.Gf8.aes(), 9, U32.and(255, b))), G.Gf8.add(G.Gf8.mul(G.Gf8.aes(), 9, U32.and(255, c)), G.Gf8.mul(G.Gf8.aes(), 9, SB.xtime(U32.and(255, d))))), ap.row(9, SB.mul3(U32.and(255, a)), U32.and(255, b), U32.and(255, c), SB.xtime(U32.and(255, d)))) : {G.Gf8.add(G.Gf8.add(G.Gf8.add(G.Gf8.add(G.Gf8.mul(G.Gf8.aes(), 14, SB.xtime(U32.and(255, a))), G.Gf8.mul(G.Gf8.aes(), 14, SB.mul3(U32.and(255, b)))), G.Gf8.add(G.Gf8.mul(G.Gf8.aes(), 14, U32.and(255, c)), G.Gf8.mul(G.Gf8.aes(), 14, U32.and(255, d)))), G.Gf8.add(G.Gf8.add(G.Gf8.mul(G.Gf8.aes(), 11, U32.and(255, a)), G.Gf8.mul(G.Gf8.aes(), 11, SB.xtime(U32.and(255, b)))), G.Gf8.add(G.Gf8.mul(G.Gf8.aes(), 11, SB.mul3(U32.and(255, c))), G.Gf8.mul(G.Gf8.aes(), 11, U32.and(255, d))))), G.Gf8.add(G.Gf8.add(G.Gf8.add(G.Gf8.mul(G.Gf8.aes(), 13, U32.and(255, a)), G.Gf8.mul(G.Gf8.aes(), 13, U32.and(255, b))), G.Gf8.add(G.Gf8.mul(G.Gf8.aes(), 13, SB.xtime(U32.and(255, c))), G.Gf8.mul(G.Gf8.aes(), 13, SB.mul3(U32.and(255, d))))), _)) == U32.and(255, a) : U32}
1872 %Equal.sym(U32, G.Gf8.add(G.Gf8.add(G.Gf8.add(G.Gf8.add(G.Gf8.mul(G.Gf8.aes(), 14, SB.xtime(U32.and(255, a))), G.Gf8.mul(G.Gf8.aes(), 14, SB.mul3(U32.and(255, b)))), G.Gf8.add(G.Gf8.mul(G.Gf8.aes(), 14, U32.and(255, c)), G.Gf8.mul(G.Gf8.aes(), 14, U32.and(255, d)))), G.Gf8.add(G.Gf8.add(G.Gf8.mul(G.Gf8.aes(), 11, U32.and(255, a)), G.Gf8.mul(G.Gf8.aes(), 11, SB.xtime(U32.and(255, b)))), G.Gf8.add(G.Gf8.mul(G.Gf8.aes(), 11, SB.mul3(U32.and(255, c))), G.Gf8.mul(G.Gf8.aes(), 11, U32.and(255, d))))), G.Gf8.add(G.Gf8.add(G.Gf8.add(G.Gf8.mul(G.Gf8.aes(), 13, U32.and(255, a)), G.Gf8.mul(G.Gf8.aes(), 13, U32.and(255, b))), G.Gf8.add(G.Gf8.mul(G.Gf8.aes(), 13, SB.xtime(U32.and(255, c))), G.Gf8.mul(G.Gf8.aes(), 13, SB.mul3(U32.and(255, d))))), G.Gf8.add(G.Gf8.add(G.Gf8.mul(G.Gf8.aes(), 9, SB.mul3(U32.and(255, a))), G.Gf8.mul(G.Gf8.aes(), 9, U32.and(255, b))), G.Gf8.add(G.Gf8.mul(G.Gf8.aes(), 9, U32.and(255, c)), G.Gf8.mul(G.Gf8.aes(), 9, SB.xtime(U32.and(255, d))))))), G.Gf8.add(G.Gf8.add(G.Gf8.add(G.Gf8.add(G.Gf8.mul(G.Gf8.aes(), 14, SB.xtime(U32.and(255, a))), G.Gf8.mul(G.Gf8.aes(), 11, U32.and(255, a))), G.Gf8.add(G.Gf8.mul(G.Gf8.aes(), 13, U32.and(255, a)), G.Gf8.mul(G.Gf8.aes(), 9, SB.mul3(U32.and(255, a))))), G.Gf8.add(G.Gf8.add(G.Gf8.mul(G.Gf8.aes(), 14, SB.mul3(U32.and(255, b))), G.Gf8.mul(G.Gf8.aes(), 11, SB.xtime(U32.and(255, b)))), G.Gf8.add(G.Gf8.mul(G.Gf8.aes(), 13, U32.and(255, b)), G.Gf8.mul(G.Gf8.aes(), 9, U32.and(255, b))))), G.Gf8.add(G.Gf8.add(G.Gf8.add(G.Gf8.mul(G.Gf8.aes(), 14, U32.and(255, c)), G.Gf8.mul(G.Gf8.aes(), 11, SB.mul3(U32.and(255, c)))), G.Gf8.add(G.Gf8.mul(G.Gf8.aes(), 13, SB.xtime(U32.and(255, c))), G.Gf8.mul(G.Gf8.aes(), 9, U32.and(255, c)))), G.Gf8.add(G.Gf8.add(G.Gf8.mul(G.Gf8.aes(), 14, U32.and(255, d)), G.Gf8.mul(G.Gf8.aes(), 11, U32.and(255, d))), G.Gf8.add(G.Gf8.mul(G.Gf8.aes(), 13, SB.mul3(U32.and(255, d))), G.Gf8.mul(G.Gf8.aes(), 9, SB.xtime(U32.and(255, d))))))), ap.trans(G.Gf8.mul(G.Gf8.aes(), 14, SB.xtime(U32.and(255, a))), G.Gf8.mul(G.Gf8.aes(), 14, SB.mul3(U32.and(255, b))), G.Gf8.mul(G.Gf8.aes(), 14, U32.and(255, c)), G.Gf8.mul(G.Gf8.aes(), 14, U32.and(255, d)), G.Gf8.mul(G.Gf8.aes(), 11, U32.and(255, a)), G.Gf8.mul(G.Gf8.aes(), 11, SB.xtime(U32.and(255, b))), G.Gf8.mul(G.Gf8.aes(), 11, SB.mul3(U32.and(255, c))), G.Gf8.mul(G.Gf8.aes(), 11, U32.and(255, d)), G.Gf8.mul(G.Gf8.aes(), 13, U32.and(255, a)), G.Gf8.mul(G.Gf8.aes(), 13, U32.and(255, b)), G.Gf8.mul(G.Gf8.aes(), 13, SB.xtime(U32.and(255, c))), G.Gf8.mul(G.Gf8.aes(), 13, SB.mul3(U32.and(255, d))), G.Gf8.mul(G.Gf8.aes(), 9, SB.mul3(U32.and(255, a))), G.Gf8.mul(G.Gf8.aes(), 9, U32.and(255, b)), G.Gf8.mul(G.Gf8.aes(), 9, U32.and(255, c)), G.Gf8.mul(G.Gf8.aes(), 9, SB.xtime(U32.and(255, d))))) : {_ == U32.and(255, a) : U32}
1873 %Equal.sym(U32, G.Gf8.add(G.Gf8.add(G.Gf8.mul(G.Gf8.aes(), 14, SB.xtime(U32.and(255, a))), G.Gf8.mul(G.Gf8.aes(), 11, U32.and(255, a))), G.Gf8.add(G.Gf8.mul(G.Gf8.aes(), 13, U32.and(255, a)), G.Gf8.mul(G.Gf8.aes(), 9, SB.mul3(U32.and(255, a))))), U32.and(255, a), ap.col00(a)) : {G.Gf8.add(G.Gf8.add(_, G.Gf8.add(G.Gf8.add(G.Gf8.mul(G.Gf8.aes(), 14, SB.mul3(U32.and(255, b))), G.Gf8.mul(G.Gf8.aes(), 11, SB.xtime(U32.and(255, b)))), G.Gf8.add(G.Gf8.mul(G.Gf8.aes(), 13, U32.and(255, b)), G.Gf8.mul(G.Gf8.aes(), 9, U32.and(255, b))))), G.Gf8.add(G.Gf8.add(G.Gf8.add(G.Gf8.mul(G.Gf8.aes(), 14, U32.and(255, c)), G.Gf8.mul(G.Gf8.aes(), 11, SB.mul3(U32.and(255, c)))), G.Gf8.add(G.Gf8.mul(G.Gf8.aes(), 13, SB.xtime(U32.and(255, c))), G.Gf8.mul(G.Gf8.aes(), 9, U32.and(255, c)))), G.Gf8.add(G.Gf8.add(G.Gf8.mul(G.Gf8.aes(), 14, U32.and(255, d)), G.Gf8.mul(G.Gf8.aes(), 11, U32.and(255, d))), G.Gf8.add(G.Gf8.mul(G.Gf8.aes(), 13, SB.mul3(U32.and(255, d))), G.Gf8.mul(G.Gf8.aes(), 9, SB.xtime(U32.and(255, d))))))) == U32.and(255, a) : U32}
1874 %Equal.sym(U32, G.Gf8.add(G.Gf8.add(G.Gf8.mul(G.Gf8.aes(), 14, SB.mul3(U32.and(255, b))), G.Gf8.mul(G.Gf8.aes(), 11, SB.xtime(U32.and(255, b)))), G.Gf8.add(G.Gf8.mul(G.Gf8.aes(), 13, U32.and(255, b)), G.Gf8.mul(G.Gf8.aes(), 9, U32.and(255, b)))), 0, ap.col01(b)) : {G.Gf8.add(G.Gf8.add(U32.and(255, a), _), G.Gf8.add(G.Gf8.add(G.Gf8.add(G.Gf8.mul(G.Gf8.aes(), 14, U32.and(255, c)), G.Gf8.mul(G.Gf8.aes(), 11, SB.mul3(U32.and(255, c)))), G.Gf8.add(G.Gf8.mul(G.Gf8.aes(), 13, SB.xtime(U32.and(255, c))), G.Gf8.mul(G.Gf8.aes(), 9, U32.and(255, c)))), G.Gf8.add(G.Gf8.add(G.Gf8.mul(G.Gf8.aes(), 14, U32.and(255, d)), G.Gf8.mul(G.Gf8.aes(), 11, U32.and(255, d))), G.Gf8.add(G.Gf8.mul(G.Gf8.aes(), 13, SB.mul3(U32.and(255, d))), G.Gf8.mul(G.Gf8.aes(), 9, SB.xtime(U32.and(255, d))))))) == U32.and(255, a) : U32}
1875 %Equal.sym(U32, G.Gf8.add(G.Gf8.add(G.Gf8.mul(G.Gf8.aes(), 14, U32.and(255, c)), G.Gf8.mul(G.Gf8.aes(), 11, SB.mul3(U32.and(255, c)))), G.Gf8.add(G.Gf8.mul(G.Gf8.aes(), 13, SB.xtime(U32.and(255, c))), G.Gf8.mul(G.Gf8.aes(), 9, U32.and(255, c)))), 0, ap.col02(c)) : {G.Gf8.add(G.Gf8.add(U32.and(255, a), 0), G.Gf8.add(_, G.Gf8.add(G.Gf8.add(G.Gf8.mul(G.Gf8.aes(), 14, U32.and(255, d)), G.Gf8.mul(G.Gf8.aes(), 11, U32.and(255, d))), G.Gf8.add(G.Gf8.mul(G.Gf8.aes(), 13, SB.mul3(U32.and(255, d))), G.Gf8.mul(G.Gf8.aes(), 9, SB.xtime(U32.and(255, d))))))) == U32.and(255, a) : U32}
1876 %Equal.sym(U32, G.Gf8.add(G.Gf8.add(G.Gf8.mul(G.Gf8.aes(), 14, U32.and(255, d)), G.Gf8.mul(G.Gf8.aes(), 11, U32.and(255, d))), G.Gf8.add(G.Gf8.mul(G.Gf8.aes(), 13, SB.mul3(U32.and(255, d))), G.Gf8.mul(G.Gf8.aes(), 9, SB.xtime(U32.and(255, d))))), 0, ap.col03(d)) : {G.Gf8.add(G.Gf8.add(U32.and(255, a), 0), G.Gf8.add(0, _)) == U32.and(255, a) : U32}
1877 ap.fin0(a)