The invention discloses an encrypted reading and writing method at the kernel state 
file system layer. The method is located between the 
virtual file system and the physical 
file system. During the reading operation, the read 
ciphertext data is first decrypted and then transmitted to the upper layer  
virtual file system; when writing, first determine the type of write operation, if it is a write operation, first encrypt the 
plaintext data to be written, and then pass the intercepted 
ciphertext data to the underlying physical 
file system, if it is a modification operation  , the 
ciphertext data read into the memory will be partially decrypted, overwritten, globally encrypted, and partially intercepted.  This method not only has the inherent high efficiency of kernel state operations, but also uses partial decryption and partial interception to improve the efficiency of 
data operations.  From the test process and 
test data, it can be known that using the encrypted reading and writing method of the present invention can simultaneously overcome the inconvenience of the 
application layer encryption program and the low efficiency of the 
user state encrypted file system.