def rounds_input_matches

qasim-bend-kit@0.1.0.2 · proof/AES_BlockBridgeProof.bend:4

import qasim-bend-kit@0.1.0.2/proof/AES_BlockBridgeProof.bend as AESBlockBridgeProof
import Base
import qasim-bend-kit@0.1.0.2/libs/AES256GCMCore.bend as Core

4# Keep fuel symbolic while substituting the certified initial state.
5def rounds_input_matches(+fuel: Nat, +words: List<&2, U32>,
6    +block: List<&2, U32>, +initial: List<&2, U32>, +expected: List<&2, U32>,
7    initial_match: {Core.aes_add_key(block, words, 0n) == initial : List<&2, U32>},
8    rounds_match: {Core.aes_rounds.go(fuel, initial, words, 1n) == expected : List<&2, U32>}) ->
9    {Core.aes_rounds.go(fuel, Core.aes_add_key(block, words, 0n), words, 1n) == expected : List<&2, U32>}:
10    Equal.trans(List<&2, U32>,
11        Core.aes_rounds.go(fuel, Core.aes_add_key(block, words, 0n), words, 1n),
12        Core.aes_rounds.go(fuel, initial, words, 1n), expected,
13        Equal.cong(List<&2, U32>, List<&2, U32>,
14            value => Core.aes_rounds.go(fuel, value, words, 1n),
15        Core.aes_add_key(block, words, 0n), initial, initial_match), rounds_match)

Uses (7)

Used by (1)