Bhat, Jayalakshmi Manjunath | 22 Jun 2012 10:45
Picon
Favicon

FIPS 180-2 bugs in SHA-256 and SHA-512

Hi All,

I have couple of questions like 

1.	What is FIPS standard OpenSSL 1.0.1 library following.  CHANGES claims the support for FIPS180-2?

2.  	In Sha256.c, these are not as per the FIPS 180-2 standard or FTP 180-3. 
	#define Sigma0(x)	(ROTATE((x),30) ^ ROTATE((x),19) ^ ROTATE((x),10))
	#define Sigma1(x)	(ROTATE((x),26) ^ ROTATE((x),21) ^ ROTATE((x),7))
	#define sigma0(x)	(ROTATE((x),25) ^ ROTATE((x),14) ^ ((x)>>3))
	#define sigma1(x)	(ROTATE((x),15) ^ ROTATE((x),13) ^ ((x)>>10))
	Not only that Sigma0 and Sigma1 are defined twice? Old value will be overwritten isn't it?

3.	In SHA-512 

	#define Sigma0(x)	(ROTR((x),28) ^ ROTR((x),34) ^ ROTR((x),39))
	#define Sigma1(x)	(ROTR((x),14) ^ ROTR((x),18) ^ ROTR((x),41))
	#define sigma0(x)	(ROTR((x),1)  ^ ROTR((x),8)  ^ ((x)>>7))
	#define sigma1(x)	(ROTR((x),19) ^ ROTR((x),61) ^ ((x)>>6))
	Sigma0 and Sigma1 are defined twice? Old value will be overwritten isn't it?


Regards
Jaya

Gmane