law xor_streaming_data

bend-osdev-crypto@0.1.0.0 · LAWS.bend:89

import bend-osdev-crypto@0.1.0.0/LAWS.bend as LAWS
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

89# data in pieces: the output of a ++ b is the output of a, then the output of
90# b from the state after a
91law xor_streaming_data:
92  for ~S: Data
93  for ~next: S -> St.CrKsStep<S>
94  for +s: S
95  for +a: B.Octets
96  for +b: B.Octets
97  {St.CrXor.out_data(~S, St.CrXor.update(~S, ~next, s, B.Octets.append(a, b))) == B.Octets.append(St.CrXor.out_data(~S, St.CrXor.update(~S, ~next, s, a)), St.CrXor.out_data(~S, St.CrXor.update(~S, ~next, St.CrXor.out_state(~S, St.CrXor.update(~S, ~next, s, a)), b))) : B.Octets}

Uses (18)

Used by (1)