PROOF.pk.hm: def of bend-osdev-pkcs7@0.1.0.0 Import: import bend-osdev-pkcs7@0.1.0.0/PROOF.bend as PROOF Lines 1368-1373 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=1368&end_line=1373 import Base import bend-osdev-bytes@0.1.1.0/bytes.bend as B import bend-osdev-u32@0.1.0.0/LAWS.bend as UL # 1 + L + (q - L mod (1 + q)) is a multiple of 1 + q def pk.hm(+q: Nat, +m: B.Octets) -> {Nat.mod(1n+Nat.add(B.Octets.len(m), Nat.sub(q, Nat.mod(B.Octets.len(m), 1n+q))), 1n+q) == 0n : Nat}: +hs = pk.sub_succ(Nat.mod(B.Octets.len(m), 1n+q), q)(pk.mod_le(B.Octets.len(m), q, 0n, 0n, q)(UL.nat_add_zero(q))) %UL.nat_add_succ(B.Octets.len(m), Nat.sub(q, Nat.mod(B.Octets.len(m), 1n+q))) : {Nat.mod(_, 1n+q) == 0n : Nat} %hs : {Nat.mod(Nat.add(B.Octets.len(m), _), 1n+q) == 0n : Nat} pk.mod_pad(B.Octets.len(m), q, 0n, 0n, q)(UL.nat_add_zero(q)) Uses (11): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.add https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.mod https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.sub https://jend.leeeet.dev/definition.txt?path=bend-osdev-bytes@0.1.1.0/bytes.bend&name=Octets https://jend.leeeet.dev/definition.txt?path=bend-osdev-bytes@0.1.1.0/bytes.bend&name=Octets.len https://jend.leeeet.dev/definition.txt?path=bend-osdev-pkcs7@0.1.0.0/PROOF.bend&name=pk.mod_le https://jend.leeeet.dev/definition.txt?path=bend-osdev-pkcs7@0.1.0.0/PROOF.bend&name=pk.mod_pad https://jend.leeeet.dev/definition.txt?path=bend-osdev-pkcs7@0.1.0.0/PROOF.bend&name=pk.sub_succ https://jend.leeeet.dev/definition.txt?path=bend-osdev-u32@0.1.0.0/LAWS.bend&name=nat_add_succ https://jend.leeeet.dev/definition.txt?path=bend-osdev-u32@0.1.0.0/LAWS.bend&name=nat_add_zero