# how can we write the code for order preserving encryption? How can we prove that OPE is cryptograhically secure? [closed]

I am working with order preserving encryption for secure query processing. Can anyone please help me to get the basic algorithm or code for order preserving encryption?

## closed as unclear what you're asking by fkraiem, kelalaka, Ilmari Karonen, Maarten Bodewes♦Feb 11 at 15:17

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

• There are codes around just Google order preserving encryption source code and get the results. – kelalaka Feb 11 at 10:03
• I would suggest that you only ask for a proof if "OPE is cryptographically secure". Otherwise this question might be closed as we don't offer source to algorithms/code. – AleksanderRas Feb 11 at 10:04
• For OPE to be cryptographically secure, we need to adapt the definition of cryptographically secure, and that's non trivial. Serious work on OPE starts with that. See e.g. Alexandra Boldyreva, Nathan Chenette, Younho Lee and Adam O’Neill's Order-Preserving Symmetric Encryption, in proceedings of Eurocrypt 2009. – fgrieu Feb 11 at 10:12
• Also, at best we can prove that a specific OPE method doesn't leak any information beyond what's implied by the ordering; however that's known to leak quite a lot of information - even with such a provable method, it might not be practically secure in your scenario – poncho Feb 11 at 14:13