Thanks for the comments.
This piece will be a part of a bigger design and the problems
mentioned are very real. In the future, our goal is to design a database
system where the processing is done in a "secure coprocessor"(i.e no one
will be able to see what is inside) and
the small code inside the co-processor is verified using formal methods.
Therefore, all the problems you have mentioned will not be a issue for
our general case. We are even considering what could be revealed just
watching the disk access. Initial technical report can be found at
( http://www.cs.purdue.edu/homes/kanmurat/technical.ps).
Can you suggest me a solution to how to do
this on Postgresql backend?
I am asssuming that somewhere in the code, you are calling a function like getPage(Page_id)
to retrieve the page(I am trying to change backend)
All I need to do is (I am not sure yet) change such code with (ofcourse, I need to change writePage part)
getPage(Page_id) { ctr=Hash_Table(Page_id) //return somevalue needed for deccryption
Thread_Read(Page_id)// will call the original read code Thread_Encryption.start(ctr, length); when both
threadsare done finish the encryption }