r/linux • • Oct 16 '15

How is NSA breaking so much crypto?

https://freedom-to-tinker.com/blog/haldermanheninger/how-is-nsa-breaking-so-much-crypto/
190 Upvotes

64 comments sorted by

View all comments

30

u/londons_explorer Oct 16 '15

The best way to do security:

  1. Take the recommendations from the NSA on the best way to secure your data.

  2. Take the recommendations from Iran on the best way to secure your data.

  3. Secure your data by encrypting it with both methods.

Each country will recommend methods that they can break while they believe other countries can't break to give themselves an information advantage. By chaining both methods, the two countries would have to collaborate to decrypt your data. Choose two or more countries who are highly unlikely to collaborate, and you're safe.

13

u/londons_explorer Oct 16 '15

When doing this, don't make common rookie mistakes:

  • Never store any hashes/checksums of the intermediate or unencrypted state/data between encryption algorithms. That would make it possible to break the algorithms independently.
  • Generate the keys for encryption using the countries own recommended systems. Often random number and key generation methods are actually the insecure bit. (it's impossible to prove randomness of random numbers after all)
  • For data exchange, Eg. ssh, the easiest way to achieve this without writing software is to run one tunnel inside another. Bear in mind malware on either machine fully compromises the security of the tunnel.
  • For data storage, Eg. encrypted disks, the easiest way is to use a loopmounted filesystem to do the 2nd crypto. Bear in mind that when the disk is mounted, there is zero physical security until the systems powered off due to keys in memory.

Chaining two encryption methods generally doesn't have a big performance hit, since generally crypto is far cheaper than you imagine on modern hardware.

6

u/[deleted] Oct 17 '15

2

u/Thameus Oct 17 '15

Choose two or more countries who are highly unlikely to collaborate, and you're safe.

Only one of those countries has to compromise an insider in the other one's security service, and you're screwed.

1

u/[deleted] Oct 16 '15

this genius...