Enforcing privacy in distributed learning with performance guarantees