lcorbasson / iphone-dataprotection

Automatically exported from code.google.com/p/iphone-dataprotection
1 stars 0 forks source link

ramdisk_tools/bsd_crypto/pbkdf2.c returns only 31 bytes of 32 byte key; last key byte always 0 #137

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.Compile code
2.test code; print entire 32 byte key
3.last byte of 32 byte key is always zero

What is the expected output? What do you see instead?

Expected output is 32 bytes of random bits to be used as symmetric crypto key. 
What is seen is 31 bytes of random bits with the last byte always zero.

What version of the product are you using? On what operating system?
OS X version :
XCode version :
Tools revision : run the "hg id" command in the iphone-dataprotection
folder

Please provide any additional information below.

Tested source code with bug fixed is attached.

Original issue reported on code.google.com by imag...@gmail.com on 9 Apr 2014 at 12:03

Attachments:

GoogleCodeExporter commented 8 years ago
can you post the code that you use to  call the function ? not sure what you 
are trying to do but the code is from openbsd and gives the correct results in 
the tools.

Original comment by jean.sig...@gmail.com on 13 Apr 2014 at 10:54