Now, it may sound silly, but here is the idea:
I want to make so that to write on a file the user (even if is the root user) will need a key. The first thing that may have popped onto your mind may be:
"Why not just encrypt the file?"
My idea is to do this on certain configuration files. They can't be encrypted, or the system would crash. Also, with this approach, I would still be able to read the files and see how they are set up.
I know this fundamentally sounds very against the linux system's logic: why would the root user prevent itself from having power over his own system? The answer is: I am the root user and I want to protect me from myself. But for real: chmod -w file is, of course, easily reversed.
This may be fundamentally impossible, but I figured there was no harm in asking.