Definition swap (i: int) : int :=
 Int.or (Int.shl (Int.and i (Int.repr 255)) (Int.repr 24))
   (Int.or (Int.shl (Int.and (Shr 8 i) (Int.repr 255)) (Int.repr 16))
      (Int.or (Int.shl (Int.and (Shr 16 i) (Int.repr 255)) (Int.repr 8))
         (Shr 24 i))).

Lemma Zlength_intlist_to_bytelist_app: forall al bl, Zlength (intlist_to_bytelist (al++bl)) = (Zlength (intlist_to_bytelist al) + Zlength (intlist_to_bytelist bl))%Z.