Prime numbers are used extensively in public key encryption key, typically where we take two prime numbers and multiply them together to give a modulus (N). This modulus is often difficult to factorize as large numbers are used.
The usage of 2, though, has been useful in cryptography as it allows mobile devices to provide easier calculations, along with this many intruders will not check for the number "2" in their calculations, as a flaw in their cracking programs immediately dismisses all even numbers.
The flaw, discovered by researchers at the MidTech Institute in
Florida, in the commonly used Python library (PieCrypto) detects when a
mobile device is being used, and more often than not used the value of
"2" for one of the prime numbers.
This meant that in 60% of the
encryption tunnels that were created that they could crack the
cryptography within 1 pico second. With a quantum computer it would be
expected that this could actually be cracked before the key was even
generated, and that all the keys used in the future would actually be predicted in a single instance.
More details here.