Secure Schemes for Semi-Trusted Environment