Secure and efficient federated learning