def ks_mask_xs

bend-osdev-crypto@0.1.0.0 · PROOF.bend:180

import bend-osdev-crypto@0.1.0.0/PROOF.bend as PROOF
import Base
import bend-osdev-bytes@0.1.0.0/bytes.bend as B
import bend-osdev-crypto@0.1.0.0/stream.bend as St

180def ks_mask_xs(~S: Data, ~next: S -> St.CrKsStep<S>, ys: List<&2, U32>, +s: S) -> {St.cr.ks.xs(~S, ~next, ys, s) == St.cr.ks.xs(~S, ~next, B.mask(ys), s) : List<&2, U32>}:
181  match ys:
182    case Nil{}:
183      {==}
184    case Con{+h, +t}:
185      %byte_xor_byte(h, St.CrKsStep.k(~S, next(s))) : {Con{B.byte(U32.xor(h, St.CrKsStep.k(~S, next(s)))), St.cr.ks.xs(~S, ~next, t, St.CrKsStep.st(~S, next(s)))} == Con{_, St.cr.ks.xs(~S, ~next, B.mask(t), St.CrKsStep.st(~S, next(s)))} : List<&2, U32>}
186      %ks_mask_xs(~S, ~next, t, St.CrKsStep.st(~S, next(s))) : {Con{B.byte(U32.xor(h, St.CrKsStep.k(~S, next(s)))), St.cr.ks.xs(~S, ~next, t, St.CrKsStep.st(~S, next(s)))} == Con{B.byte(U32.xor(h, St.CrKsStep.k(~S, next(s)))), _} : List<&2, U32>}
187      {==}

Uses (10)

Used by (1)