PROOF.pk.diff_fill: def of bend-osdev-pkcs7@0.1.0.0 Import: import bend-osdev-pkcs7@0.1.0.0/PROOF.bend as PROOF Lines 234-242 of bend-osdev-pkcs7@0.1.0.0/PROOF.bend: https://jend.leeeet.dev/read.txt?path=bend-osdev-pkcs7@0.1.0.0/PROOF.bend&start_line=234&end_line=242 import Base import bend-osdev-bytes@0.1.1.0/bytes.bend as B import bend-osdev-pkcs7@0.1.0.0/pkcs7.bend as P # the padding's difference from its own byte is 0 def pk.diff_fill(+n: Nat, +u: U32) -> {P.pkcs7.diff(P.pkcs7.fill(n, B.byte(u)), B.byte(u), 0) == 0 : U32}: match n: case 0n: {==} case 1n+p: %Equal.sym(U32, B.byte(B.byte(u)), B.byte(u), pk.bb(u)) : {P.pkcs7.diff(P.pkcs7.fill(p, B.byte(u)), B.byte(u), U32.or(0, U32.xor(_, B.byte(u)))) == 0 : U32} %Equal.sym(U32, U32.xor(B.byte(u), B.byte(u)), 0, pk.xor_self(B.byte(u))) : {P.pkcs7.diff(P.pkcs7.fill(p, B.byte(u)), B.byte(u), U32.or(0, _)) == 0 : U32} pk.diff_fill(p, u) Uses (10): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Equal.sym https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.or https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.xor https://jend.leeeet.dev/definition.txt?path=bend-osdev-bytes@0.1.1.0/bytes.bend&name=byte https://jend.leeeet.dev/definition.txt?path=bend-osdev-pkcs7@0.1.0.0/PROOF.bend&name=pk.bb https://jend.leeeet.dev/definition.txt?path=bend-osdev-pkcs7@0.1.0.0/PROOF.bend&name=pk.xor_self https://jend.leeeet.dev/definition.txt?path=bend-osdev-pkcs7@0.1.0.0/pkcs7.bend&name=pkcs7.diff https://jend.leeeet.dev/definition.txt?path=bend-osdev-pkcs7@0.1.0.0/pkcs7.bend&name=pkcs7.fill