Сipher and deciphering files in kernel
I want to make a transparent ciphering of files in kernel space. Some file on disk may by ciphered but with help of my kernel module when some one is reading it from user space (cat, less etc.) it receives deciphered data.
My idea was to write module that intercepts disk's sectors when they are read from disk and encrypt them and to cipher when OS saves sector to disk.
Is it possible to do this? If it is possible how should I do it?
Is there any easier solutions?
Sorry for my terrible English