There are a lot of very important data in database, which
need to be protected from attacking. Cryptographic support is an important
mechanism of securing them. People, however, must tradeoff performance to
ensure the security because the operation of encryption and decryption
greatly degrades query performance. To solve such a problem, an approach is
proposed that can implement SQL query on the encrypted character data. When
the character data are stored in the form of cipher, we not only store the
encrypted character data, but also turn the character data into the
characteristic values via a characteristic function, and store them in an
additional field. When querying the encrypted character data, we apply the
principle of two-phase query. Firstly, we implement a coarse query over the
encrypted data in order to filter the records not related to the querying
conditions. Secondly, we decrypt the rest records and implement a refined
query over them again. Results of a set of experiments validate the
functionality and usability of our approach.