Which secure hash algorithm should I use for my SSL?
A secure hash algorithm (SHA) encrypts variable-length data by converting it into fixed-length values called hashes. In other words, a SHA secures your site visitors’ information by changing it into a unique mix of letters and numbers so it can safely travel across the Internet.
These algorithms are secure because their hash functions never produce collisions, or the same value for two different sets of data. Hackers attempt to break hash functions by creating computational methods for producing collisions. At this time, there are no known methods for producing collisions in SHA-1 or SHA-2.
Selecting a Secure Hash Algorithm
When you request or re-key an SSL certificate, you must select one of these signature algorithms:
- SHA-1 — Developed in 1995 by the U.S. National Security Agency (NSA), SHA-1 uses a single hash function to produce a 160-bit hash value. Since 2005, several attackers have determined that a mathematical weakness might exist, meaning that collisions are possible.
- SHA-2 — Developed in 2001 by the NSA, SHA-2 uses a set of four hash functions to produce hash values that are 224, 256, 384 or 512 bits. SHA-2 is considered resistant to computational attacks and, therefore, stronger than SHA-1. Note that some older Web browsers, such as Internet Explorer® on Windows XP SP2, do not support SHA-2.
In short, SHA-2 encryption is more secure than SHA-1 encryption. Unless your site visitors are using older Web browsers that are only compatible with SHA-1, we recommend using SHA-2.