b) (alternative 4) [premo08] Bitwise majority function. (40 ≤ i ≤ 59): f = (b and c) or (d and (b or c)) (alternative 1) (40 ≤ i ≤ 59): f = (b and c) or (d and (b xor c)) (alternative 2) (40 ≤ i ≤ 59): f = (b and c) xor (d and (b xor c)) (alternative 3) (40 ≤ i ≤ 59): f = (b and c) xor (b and d) xor (c and d) (alternative 4) (40 ≤ i ≤ 59): f = vec_sel(c, b, c xor d) (alternative 5) It was also shown that for the rounds 32–79 the computation of: w[i] = (w[i-3] xor w[i-8] xor w[i-14] xor w[i-16]) leftrotate 1 can be replaced with: w[i] = (w[i-6] xor w[i-16] xor w[i-28] xor w[i-32]) leftrotate 2 This transformation keeps all operands 64-bit aligned and, by removing the dependency of w[i] on w[i-3], allows efficient SIMD implementation with a vector length of 4 like x86 SSE instructions. Comparison of SHA functions In the table below, internal state means the "internal hash sum" after each compression of a data block. Implementations Below is a list of cryptography libraries that support SHA-1: Botan Bouncy Castle cryptlib Crypto++ Libgcrypt Mbed TLS Nettle LibreSSL OpenSSL GnuTLS Hardware acceleration is provided by the following processor extensions: Intel SHA extensions: Available on some Intel and AMD x86 processors. VIA PadLock IBM z/Architecture: Available since 2003 as part of the Message-Security-Assist Extension See also Comparison of cryptographic hash functions Hash function security summary International Association for Cryptologic Research Secure Hash Standard Notes References Eli Biham, Rafi Chen, Near-Collisions of SHA-0, Cryptology ePrint Archive, Report 2004/146, 2004 (appeared on CRYPTO 2004), IACR.org Xiaoyun Wang, Hongbo Yu and Yiqun Lisa Yin, Efficient Collision Search Attacks on SHA-0, Crypto 2005 Xiaoyun Wang, Yiqun Lisa Yin and Hongbo Yu, Finding Collisions in the Full SHA-1, Crypto 2005 Henri Gilbert, Helena Handschuh: Security Analysis of SHA-256 and Sisters. Selected Areas in Cryptography 2003: pp175–193 An Illustrated Guide to Cryptographic Hashes A. Cilardo, L. Esposito, A. Veniero, A. Mazzeo, V. Beltran, E. Ayugadé, A CellBE-based HPC application for the analysis of vulnerabilities in cryptographic hash functions, High Performance Computing and Communication international conference, August 2010 External links CSRC Cryptographic Toolkit – Official NIST site for the Secure Hash Standard FIPS 180-4: Secure Hash Standard (SHS) (with sample C implementation) Interview with Yiqun Lisa Yin concerning the attack