The invention discloses a transparent
encryption method and
system based on
virtual file system interception, and the method comprises the steps: dynamically intercepting the function call of a
virtual file system layer through a kernel probe mechanism, so as to obtain a file operation context; creating a strategy decision engine, performing multi-level matching based on process features, file attributes and environment states, and generating a dynamic
encryption strategy; when the strategy is hit, dynamic function replacement is implemented, and a read-write
function pointer in an original file operation structure body is replaced by a self-defined
encryption and decryption
function pointer through atomization operation, so that the file I / O is redirected to an encryption and decryption execution engine; an encryption and decryption execution engine is utilized to construct a zero-copy
assembly line, and a
hardware acceleration unit is integrated, so that efficient encryption and decryption
processing is performed on data; according to the transparent encryption method,
policy decision and non-
perception encryption and decryption are realized in the kernel layer, the problems of coarse encryption
granularity, high performance loss and difficulty in localization
adaptation in the prior art are solved, and the transparent encryption method which is fine in
granularity and compatible with a domestic platform is realized.