LAWS.kbkdf_counter_stream_length: law of bend-osdev-crypto@0.1.0.0 Import: import bend-osdev-crypto@0.1.0.0/LAWS.bend as LAWS Lines 548-561 of bend-osdev-crypto@0.1.0.0/LAWS.bend: https://jend.leeeet.dev/read.txt?path=bend-osdev-crypto@0.1.0.0/LAWS.bend&start_line=548&end_line=561 import Base import bend-osdev-bytes@0.1.0.0/bytes.bend as B import bend-osdev-crypto@0.1.0.0/kbkdf.bend as Kb # SP 800-108 KDFs over any MAC (kbkdf.bend), for every MAC, key, fixed # input data and length: each stream has the length asked for, a shorter # stream is a prefix of a longer one with the same fixed input (and IV), and # a derivation that succeeds has the length asked for. (The interface's # prefix law holds of the streams: a derivation binds its length L into # the fixed input, so derivations of two lengths differ.) law kbkdf_counter_stream_length: for ~K: Data for ~compute: K -> B.Octets -> B.Octets for ~rlen: Nat for +k: K for +fixed: B.Octets for +n: Nat {B.Octets.len(Kb.CrKbkdf.counter_stream(~K, ~compute, ~rlen, k, fixed, n)) == n : Nat} Uses (11): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Equal.sym https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat 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-bytes@0.1.1.0/bytes.bend&name=Octets.of_list https://jend.leeeet.dev/definition.txt?path=bend-osdev-bytes@0.1.1.0/bytes.bend&name=len https://jend.leeeet.dev/definition.txt?path=bend-osdev-crypto@0.1.0.0/PROOF.bend&name=kb_ctr_len https://jend.leeeet.dev/definition.txt?path=bend-osdev-crypto@0.1.0.0/PROOF.bend&name=octets_len_of https://jend.leeeet.dev/definition.txt?path=bend-osdev-crypto@0.1.0.0/kbkdf.bend&name=CrKbkdf.counter_stream https://jend.leeeet.dev/definition.txt?path=bend-osdev-crypto@0.1.0.0/kbkdf.bend&name=cr.kb.ctr