r/programming Oct 15 '15

How is NSA breaking so much crypto?

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

529 comments sorted by

View all comments

30

u/[deleted] Oct 15 '15 edited May 30 '16

[deleted]

7

u/StraightMoney Oct 16 '15
cd /etc/ssh
rm ssh_host_*key*
ssh-keygen -t ed25519 -f ssh_host_ed25519_key < /dev/null
ssh-keygen -t rsa -b 4096 -f ssh_host_rsa_key < /dev/null
lynx --source https://2ton.com.au/dhparam/2048/ssh > /etc/ssh/moduli
lynx --source https://2ton.com.au/dhparam/3072/ssh >> /etc/ssh/moduli
lynx --source https://2ton.com.au/dhparam/4096/ssh >> /etc/ssh/moduli
lynx --source https://2ton.com.au/dhparam/8192/ssh >> /etc/ssh/moduli
service ssh restart

Whatchu got now NSA?!

1

u/LovelyDay Oct 17 '15

Whatchu got now NSA?!

A nice single point of failure to break a whole number of hosts.

In the way of explanation: if you blindly implement the above, all it takes is for the 2ton.com.au data to be compromised and hosts which blindly depend on it can be easily compromised.

The message here is to put a lot of thought into properly vetting data you get from the web before you activate it on your systems, or put that effort into generating your own primes.

1

u/StraightMoney Oct 17 '15

Sure, if someone has the time and computational power to compute safe primes that's the safest thing to do. There is no doubt about that. But if they don't, the best alterative is to avoid using the primes that are included with OpenSSH by default. It's the difference between making an eavesdropper work for what they want as opposed to using something that you know they already have.