In the USA there is a strong and widespread taboo against sharing details of your salary with co-workers. Many company handbooks explicitly prohibit it. But to my knowledge, it's only cultural; I don't know of any laws against it.
Suppose I break taboo and tell a co-worker my salary (especially outside the workplace) and my boss finds out. Does my boss/company have any legal recourse against me? Can they legally punish me, such as with a pay cut, or fire me?
Is it any different if I ask a co-worker their salary package, and they do or don't answer?
To be clear, I'm not asking about the social ramifications. I understand those quite well. I'm asking about the legal ramifications.