Generalized Universal Circuits for Secure Evaluation of Private Functions with Application to Data Classification