Is it possible to add a line to a file which is encrypted symmetrically or asymmetrically (private key refers to readkey below, public key refers to append key then) without decrypting it?
I was thinking about s.th. like:
msg1="hello"
msg2="world"
appendkey=...
readkey=...
file=touch(...)
addLine(msg1, file, appendkey)
addLine(msg2, file, appendkey)
ERROR=decrypt(file, appendkey)
WORKS=decrypt(file, privkey)
Then the WORKS equals to:
hello
world
The idea is, that various number of people can add s.th. to a file without seeing its content. Only the owner of the file can decrypt it once to see all lines (he/she should not decrypt all the lines individually for performance reasons). For me this scenario typically sounds asymmetrically, thats the reason why I thought that there could be a mechanism to use the public key to append s.th...
owner
(owner in a sense of owning a key, not file owner in filesystem) can read it. $\endgroup$