Congruence maps and derivations