Re: SHA1 Message Digest Getting Generated less than 160 Bits i.e. 152 bits.

2010-09-27 Thread Jean-Marc Desperrier

Kedar Sabnis wrote:

in some specific case SHA1 digest is coming as 152 bits long instead of
160 bits long.


All possible 160 bits values have the same chance of being the output of 
a SHA1 digest, *including* those that comprise long strings of all zeros 
or all ones.


This mean that, statistically, for 256 SHA1 hash values you generate you 
get one for which the initial byte is all zero. Depending on your code, 
this may make that value look like it's only 152 bits long instead of 160.

__
OpenSSL Project http://www.openssl.org
User Support Mailing Listopenssl-users@openssl.org
Automated List Manager   majord...@openssl.org


Re: SHA1 Message Digest Getting Generated less than 160 Bits i.e. 152 bits.

2010-09-27 Thread Dongsheng Song
On Sat, Sep 25, 2010 at 21:09, Kedar Sabnis  wrote:

>
> HI,
>
> I am an openSSL User. We implemented SHA1 algorithm.
>
> Here in some specific case SHA1 digest is coming as 152 bits long instead
> of 160 bits long.
>
> Please suggest if any bug fix is there for this issue.
>
> Thanking you in anticipation.
>
>
According to *FIPS 180-1*, SHA1 is fixed 160 bit long:
http://www.itl.nist.gov/fipspubs/fip180-1.htm

But you can truncate the 160 bit result to 152 bit as your like.


SHA1 Message Digest Getting Generated less than 160 Bits i.e. 152 bits.

2010-09-27 Thread Kedar Sabnis
HI,

I am an openSSL User. We implemented SHA1 algorithm.

Here in some specific case SHA1 digest is coming as 152 bits long instead 
of 160 bits long.

Please suggest if any bug fix is there for this issue.

Thanking you in anticipation.

Thanks & Regards,
Kedar Anilrao Sabnis
Tata Consultancy Services
SDF-V  GROUND  Unit No.130/131,SDF-V
Seepz,Andheri(East)
Mumbai - 400096,Maharshtra
India
Mailto: kedar.sab...@tcs.com
Website: http://www.tcs.com

Experience certainty.   IT Services
Business Solutions
Outsourcing

=-=-=
Notice: The information contained in this e-mail
message and/or attachments to it may contain 
confidential or privileged information. If you are 
not the intended recipient, any dissemination, use, 
review, distribution, printing or copying of the 
information contained in this e-mail message 
and/or attachments to it are strictly prohibited. If 
you have received this communication in error, 
please notify us by reply e-mail or telephone and 
immediately and permanently delete the message 
and any attachments. Thank you




Re: SHA1 Message Digest Getting Generated less than 160 Bits i.e. 152 bits.

2010-09-26 Thread Kyle Hamilton
Would you perhaps like to explain how you implemented it (i.e., did
you include OpenSSL in your own application, or are you trying to use
it via a script?)?  152 bits is 8 bits -- one byte -- less than 160
bits.  Are you using a library or framework that overwrites the last
byte of the buffer with a \0 to prevent C-string buffer-read overruns?

-Kyle H

On Sat, Sep 25, 2010 at 6:17 AM, Kedar Sabnis  wrote:
>
> HI,
>
> I am an openSSL User. We implemented SHA1 algorithm.
>
> Here in some specific case SHA1 digest is coming as 152 bits long instead of
> 160 bits long.
>
> Please suggest if any bug fix is there for this issue.
>
> Thanking you in anticipation.
>
> Thanks & Regards,
> Kedar Anilrao Sabnis
> Tata Consultancy Services
> SDF-V  GROUND  Unit No.130/131,SDF-V
> Seepz,Andheri(East)
> Mumbai - 400096,Maharshtra
> India
> Mailto: kedar.sab...@tcs.com
> Website: http://www.tcs.com
> 
> Experience certainty.        IT Services
>                         Business Solutions
>                         Outsourcing
> 
>
> =-=-=
> Notice: The information contained in this e-mail
> message and/or attachments to it may contain
> confidential or privileged information. If you are
> not the intended recipient, any dissemination, use,
> review, distribution, printing or copying of the
> information contained in this e-mail message
> and/or attachments to it are strictly prohibited. If
> you have received this communication in error,
> please notify us by reply e-mail or telephone and
> immediately and permanently delete the message
> and any attachments. Thank you
>
>
>
__
OpenSSL Project http://www.openssl.org
User Support Mailing Listopenssl-users@openssl.org
Automated List Manager   majord...@openssl.org


SHA1 Message Digest Getting Generated less than 160 Bits i.e. 152 bits.

2010-09-25 Thread Kedar Sabnis
HI,

I am an openSSL User. We implemented SHA1 algorithm.

Here in some specific case SHA1 digest is coming as 152 bits long instead 
of 160 bits long.

Please suggest if any bug fix is there for this issue.

Thanking you in anticipation.

Thanks & Regards,
Kedar Anilrao Sabnis
Tata Consultancy Services
SDF-V  GROUND  Unit No.130/131,SDF-V
Seepz,Andheri(East)
Mumbai - 400096,Maharshtra
India
Mailto: kedar.sab...@tcs.com
Website: http://www.tcs.com

Experience certainty.   IT Services
Business Solutions
Outsourcing

=-=-=
Notice: The information contained in this e-mail
message and/or attachments to it may contain 
confidential or privileged information. If you are 
not the intended recipient, any dissemination, use, 
review, distribution, printing or copying of the 
information contained in this e-mail message 
and/or attachments to it are strictly prohibited. If 
you have received this communication in error, 
please notify us by reply e-mail or telephone and 
immediately and permanently delete the message 
and any attachments. Thank you




SHA1 Message Digest Getting Generated less than 160 Bits i.e. 152 bits.

2010-09-25 Thread Kedar Sabnis
HI,

I am an openSSL User. We implemented SHA1 algorithm.

Here in some specific case SHA1 digest is coming as 152 bits long instead 
of 160 bits long.

Please suggest if any bug fix is there for this issue.

Thanking you in anticipation.

Thanks & Regards,
Kedar Anilrao Sabnis
Tata Consultancy Services
SDF-V  GROUND  Unit No.130/131,SDF-V
Seepz,Andheri(East)
Mumbai - 400096,Maharshtra
India
Mailto: kedar.sab...@tcs.com
Website: http://www.tcs.com

Experience certainty.   IT Services
Business Solutions
Outsourcing

=-=-=
Notice: The information contained in this e-mail
message and/or attachments to it may contain 
confidential or privileged information. If you are 
not the intended recipient, any dissemination, use, 
review, distribution, printing or copying of the 
information contained in this e-mail message 
and/or attachments to it are strictly prohibited. If 
you have received this communication in error, 
please notify us by reply e-mail or telephone and 
immediately and permanently delete the message 
and any attachments. Thank you