WRONG. Federal workers and congressmen/women do pay into social security and are eligible for SS benefits. Federal employees also pay into the FERS pension system and are eligible for a defined benefit based on years of service, salary, and age at retirement. Lastly, Federal employees are eligible to contribute to the Thrift Savings Plan (TSP) which is a variation on a 401(k). State employees on the other hand typically do not pay into SS and are not eligible for any SS benefits. This is the same for public school teachers since they are technically under the purview of the state education board. State employees pay into their state employees' retirement fund. This is a defined benefit plan based on years of service, salary, and age at retirement in the State of Texas.
PS, I'm a Federal employee and my wife is a public school teacher so I know the in's and out's pretty well.