James Martin/CNET

Following in the footsteps of other tech companies, Twitter is beefing up its security to make it harder for outsiders -- including the government -- to uncover data, the company announced Friday.

Twitter has added forward secrecy, a security measure that uses temporary, individual keys to encrypt each Web session, instead of relying on a single master key.

Championed by Google, forward secrecy means an outside organization can't use the same key to decrypt previous messages.

The additional security will add some lag time when connecting to Twitter -- about 150 milliseconds in the US and up to a second in countries that are farther away from Twitter's servers, two Twitter engineers told The New York Times. But the company thinks the delay is worth it.

Earlier this year, Edward Snowden leaked information that the National Security Agency was spying on tech companies. Spurred by the leaks, several technology firms, including Google and Facebook, said they were adopting extra security measures to protect user data.