Disclaimer: I do NOT believe AES-ECB to be at all useful for encryption. That said, due to time and bureaucratic issues that I'm not in control of, I need to use AES-ECB.
I get packets of data that are Reed Solomon encoded. Each reed solomon encoded packet has length 255 bytes. On decoding, I get the message which is 223 bytes. (This is RS(255,223) with 8-bit symbols. Each codeword contains 255 code word bytes, of which 223 bytes are data and 32 bytes are parity).
I must now encrypt this data (223 bytes) and then RS encode it again to get back a packet of 255 bytes. However, when using AES ECB in block cipher mode, a byte of zeroes has to be padded in before encryption.
This padding yields a ciphertext that is 224 bytes long. This can't be RS encoded as the packet is required to be 223 bytes.
I realize that hoping this can be solved with a block cipher might be impossible, but any help or workarounds would be really appreciated!