-- step 4-5-6-7-8
findKey :: B.ByteString -> Int -> B.ByteString
findKey bs sz =
  let
    -- step 5
    transposed =
      Bytes.blocks sz bs
      |> B.transpose

    -- step 6 & 7
    key =
      map (char . attempt) transposed

  in
    -- step 8
    B.pack key
findKey :: B.ByteString -> Int -> B.ByteString
findKey bs sz =
  let
    -- step 5
    transposed =
      Bytes.blocks sz bs
      |> B.transpose

    -- step 6 & 7
    key =
      map (char . attempt) transposed

  in
    -- step 8
    B.pack key
findKey bs sz =
  let
    -- step 5
    transposed =
      Bytes.blocks sz bs
      |> B.transpose

    -- step 6 & 7
    key =
      map (char . attempt) transposed

  in
    -- step 8
    B.pack key