def next_word
import bend-collections@1.0.0.0/proofs/crypto/sha/packed/core_model.bend as CoreModelimport Base
import bend-collections@1.0.0.0/src/crypto/sha/packed/core.bend as Runtime
23# Schedule histories always contain at least 16 words. Destructuring that prefix
24# avoids four independent linked-list walks for every expanded word; the fallback
25# preserves the total behavior used by the universal refinement theorem.
26def next_word(+history: List<&2, U32>) -> U32:
27 match history:
28 case a <> b <> c <> d <> e <> f <> g <> h <> i <> j <> k <> l <> m <> n <> o <> (p <> rest):
29 (Runtime.small1(b) + g + Runtime.small0(o) + p : U32)
30 case _:
31 next_word_slow(history)
Uses (6)
Used by (5)
- bend-collections@1.0.0.0/proofs/crypto/sha/packed/core_model:expand
- bend-collections@1.0.0.0/proofs/crypto/sha/packed/core_model:expanded_rounds
- bend-collections@1.0.0.0/proofs/crypto/sha/packed/conformance:expanded_rounds_correct
- bend-collections@1.0.0.0/proofs/crypto/sha/packed/conformance:extension_correct
- bend-collections@1.0.0.0/proofs/crypto/sha/packed/conformance:next_correct