I try to encrypt columns with pgcrypto using pgp_sym_encrypt/pgp_sym_decrypt in PostgreSQL. While creating indexes for certain columns, I use reverse encryption for speeding up the search of selection by exact match or using (i)like.
I have a problem with the key. Index doesn't have an encryption or hiding key in source.
I tried to hash the key via function but its code can be seen so that it is clear how the table has been encrypted.
Can you tell me how to hide the key in the process of making the index with the help of method of reverse encrypting?
Thanks in advance.