I need to implement RSA algorithm using ECB (Electronic Code Book) as a school assignment. I know that ECB is bad and I should never use such thing in real life, but I have no other option here (we will eventually turn it to CBC and then move forward to AES, but at the moment I need to use ECB).
I've stumbled upon an issue with chaining the encrypted blocks: let's say I have a key of size 256 bits, and as a result I set each block size to be have 256 bits (block size = key size). I also make sure to pad the last block in case its size is smaller. The problem is that the encrypted block result size varies, so I don't know how to chain the result, so that when I decrypt the data I would know exactly when a block starts and when a block ends. What is the common thing to do in such event? I thought about putting some kind of delimiter between each block, but I think it's a lousy solution.