Your employer cannot legally stop you from discussing your salary: Here is the law
If your employer has a policy (written or unwritten) prohibiting salary discussion, that policy is illegal. Full stop. The law: National Labor Relations Act (NLRA), Section 7 (29 U.S.C.