Implementation of order-preserving encryption in Python