Hi Andy, Thanks a lot for the quick reply. Sorry to interrupt you with one more question. Is http://csrc.nist.gov/publications/fips/fips180-2/fips180-2.pdf this not the right document?
Regards Jaya -----Original Message----- From: owner-openssl-...@openssl.org [mailto:owner-openssl-...@openssl.org] On Behalf Of Andy Polyakov Sent: Tuesday, June 26, 2012 8:24 PM To: openssl-dev@openssl.org Subject: Re: SHA-256 and SHA-512 doubts in OpenSSL > Thanks for the reply. I am trying to understand whether FIPS 180-2 or > FIPS 180-3 is supported in OpenSSL 1.0.1. CHANGES document in OpenSSL > claims the support for FIPS 180-2. However CH is defined in > SHA-256 is #define Ch(x,y,z) (((x) & (y)) ^ ((~(x)) & (z))) in > SHA-256.c . This is as per FIPS 180-3 standard. As per FIPS 180-2 > this should been #define Ch(x,y,z) (((x) & (y)) ^ ((x) & (z)) > . And if I am right this is only difference for SHA-256 > implementation across FIPS 180-3 and FIPS 180-2 standard. My copy of FIPS180-2 says Ch(x,y,z) = (x^y)(+)(~x^z), so does FIPS180-3 and FIPS180-4. SHA256/512 was first defined in FIPS180-2 and has *not* since changed as suggested. Just in case, (x^y)(+)(~x^z) reads (x&y)^(~x&z) in C, which is the actual macro. It should be noted that there are alternative ways to perform Ch (as well as Maj)... ______________________________________________________________________ OpenSSL Project http://www.openssl.org Development Mailing List openssl-dev@openssl.org Automated List Manager majord...@openssl.org