The Tap Code decoder removes invalid numbers before grouping coordinates into pairs. That can turn malformed ciphertext into plausible but wrong plaintext instead of reporting an error.
This showed up with decode("2 3 0 1 5"): the invalid 0 is filtered out, the remaining values are regrouped as 2 3 and 1 5, and the decoder returns HE. The decoder should validate the original token stream and reject invalid coordinates or an odd number of values through the existing CipherError hierarchy. A regression case for this input would catch the dangerous part, which is the silent pair realignment.
The Tap Code decoder removes invalid numbers before grouping coordinates into pairs. That can turn malformed ciphertext into plausible but wrong plaintext instead of reporting an error.
This showed up with
decode("2 3 0 1 5"): the invalid0is filtered out, the remaining values are regrouped as2 3and1 5, and the decoder returnsHE. The decoder should validate the original token stream and reject invalid coordinates or an odd number of values through the existingCipherErrorhierarchy. A regression case for this input would catch the dangerous part, which is the silent pair realignment.