Learning Over And For Networks With Efficiency And Security Guarantees