What I would like to achieve is the following:
Alice sends to Bob the encryption of a datagram that has the following format:
| 256-bit number | SomeLongArrayOfZeroes |
Bob knows the decryption key.
But before the datagram reaches Bob, there are some intermediaries which I would like to be able to add some additional 256-bit numbers. These third parties should not be able to read the first 256-bit number which was included by Alice. Let's also assume that these third parties know which portions of the ciphertext they have to modify in order to not modify data inserted by other parties.
I was researching homomorphic encryption but it looks like an overkill for this purpose. There's no need for two ciphertexts to interact with each other. I just need to be able to add additional data to already encrypted ciphertext which already contains some information without imposing damage to it. Assuming the other parties will follow some rules so as not to damage the prefix. A third party should not be able to decrypt information added by the other third party.
In the end, Bob should be able to decrypt the message using the key provided by Alice.
Any suggestions? I was thinking about some kind of a stream cipher. What are the possible solutions?