I am currently analysing a client-server application which apparently uses RC4. I've got the secret key and nonce and I was very surprised about the approach they encrypted the packets.
Since I am no cryptography expert I will explain what I did so that it works.
- I created a string with the full key (nonce + secret) and I append all the unencrypted bytes without clearing it at any time
- I RC4 the whole string (which obviously grows over time)
- I slice the resulting string so that all old bytes will be cut and only my "new bytes" are left
I can't imagine the server side maintains the whole byte history for every connected client, hence I wonder if it's some sort of RC4 algorithm / modification or if this is a custom implementation