Efficient and Secure Message Passing for Machine Learning