CoreModel.window_rounds: def of bend-collections@1.0.0.0 Import: import bend-collections@1.0.0.0/proofs/crypto/sha/packed/core_model.bend as CoreModel Lines 81-92 of bend-collections@1.0.0.0/proofs/crypto/sha/packed/core_model.bend: https://jend.leeeet.dev/read.txt?path=bend-collections@1.0.0.0/proofs/crypto/sha/packed/core_model.bend&start_line=81&end_line=92 import Base import bend-collections@1.0.0.0/src/crypto/sha/packed/core.bend as Runtime import bend-collections@1.0.0.0/src/crypto/sha/state.bend as S # A fixed rolling window drops schedule words as soon as they are older than 16 # rounds. This avoids growing and reference-counting the reverse history list. def window_rounds(n: Nat, win: Runtime.ShaWindow, ks: List<&2, U32>, s: S.State) -> S.State: match n win ks: case 0n _ _: s case 1n+q _ Nil{}: s case 1n+q Runtime.W{a, +b, c, d, e, f, +g, h, i, j, l, m, o, r, +t, +u} k <> kt: +w = (Runtime.small1(b) + g + Runtime.small0(t) + u : U32) window_rounds(q, Runtime.W{w, a, b, c, d, e, f, g, h, i, j, l, m, o, r, t}, kt, Runtime.step(s, k, w)) Uses (9): 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=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.add https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/crypto/sha/packed/core.bend&name=ShaWindow https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/crypto/sha/packed/core.bend&name=small0 https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/crypto/sha/packed/core.bend&name=small1 https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/crypto/sha/packed/core.bend&name=step https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/crypto/sha/state.bend&name=State