The invention relates to a general
database transparent
encryption system and belongs to the fields of
information security and
database encryption technologies. According to the
system, first, an existing data table is subjected to
encryption transformation, the table where an encrypted field P1 exists is recorded as T1, and a
ciphertext index field I1 is established based on the encrypted field P1; and then, the content of a to-be-encrypted field is mapped to a Hash value based on an order-preserving
Hash function, and the Hash value is used as an index value to be interposed into the field I1. The
system comprises an
SQL gateway module and an encryption plug-in module, wherein the
SQL gateway module is used for receiving and
rewriting an
SQL statement sent by a
client, sending the SQL statement to a
database server and forwarding a result returned by the
database server to the
client; and the encryption plug-in module is located in a database, mainly comprises a series of user-defined functions (UDFs) and achieves encryption, decryption and
ciphertext indexing functions according to the SQL statement obtained after
rewriting. Compared with the prior art, the truly-general
database encryption system is realized.