let key_offset (a: algorithm { a = AES_128 \/ a = AES_256 }) =
  match a with
  | AES_128 -> 176
  | AES_256 -> 240
let key_offset (a: algorithm{a = AES_128 \/ a = AES_256}) =
match a with
| AES_128 -> 176
| AES_256 -> 240
Vale.Wrapper.X64.AES.fsti.checked
Vale.X64.CPU_Features_s.fst.checked Vale.Interop.Base.fst.checked Vale.Def.Words_s.fsti.checked Vale.Def.Words.Seq_s.fsti.checked Vale.Def.Types_s.fst.checked Vale.AES.AES_s.fst.checked prims.fst.checked LowStar.BufferView.Up.fsti.checked LowStar.BufferView.Down.fsti.checked LowStar.Buffer.fst.checked FStar.UInt8.fsti.checked FStar.Seq.fst.checked FStar.Pervasives.fsti.checked FStar.Mul.fst.checked FStar.HyperStack.ST.fsti.checked FStar.HyperStack.fst.checked
Vale.Wrapper.X64.AES.fsti
Vale.AES.AES_common_s.algorithm Prims.l_or Prims.b2t Prims.op_Equality Vale.AES.AES_common_s.AES_128 Vale.AES.AES_common_s.AES_256 Prims.int
module Vale.Wrapper.X64.AES

open Vale.X64.CPU_Features_s
open FStar.HyperStack.ST
module B = LowStar.Buffer
module HS = FStar.HyperStack
module DV = LowStar.BufferView.Down
module UV = LowStar.BufferView.Up
open FStar.Mul
open Vale.Def.Words_s
open Vale.Def.Words.Seq_s
open Vale.AES.AES_s
open Vale.Interop.Base
open Vale.Def.Types_s

unfold
let uint8_p = B.buffer UInt8.t

let length_aux (b:uint8_p) : Lemma
  (requires B.length b = 176)
  (ensures DV.length (get_downview b) % 16 = 0) =
    let db = get_downview b in
    DV.length_eq db

let length_aux2 (b:uint8_p) : Lemma
  (requires B.length b = 240)
  (ensures DV.length (get_downview b) % 16 = 0) =
    let db = get_downview b in
    DV.length_eq db

inline_for_extraction unfold
val key_offset : a:
      Vale.AES.AES_common_s.algorithm
        {a = Vale.AES.AES_common_s.AES_128 \/ a = Vale.AES.AES_common_s.AES_256}
  -> Prims.int

    a:
      Vale.AES.AES_common_s.algorithm
        {a = Vale.AES.AES_common_s.AES_128 \/ a = Vale.AES.AES_common_s.AES_256}
  -> Prims.int