andrewkrug / skeinfish

Automatically exported from code.google.com/p/skeinfish
0 stars 0 forks source link

Threefish decoder function does not cut padded bytes #3

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Create random file (ie: 134013 bytes)
2. Encrypt with ThreeFish (encrypted file is 134016 bytes)
3. Decrypt with ThreeFish (decrypted file is 134016 bytes instead of 134013 
bytes)

What is the expected output? What do you see instead?
The decoded file is always in size a multiple of the BLOCK size, instead of the 
original size of the file. I.e. PKCS7 padding info is not read by the decoding 
TransformFinalBlock to perform the adjustment to the original size (for 
instance, if the file ends with 10, the remaining 10 bytes must be removed from 
the output).

What version of the product are you using? On what operating system?
0.5.0

Please provide any additional information below.

Original issue reported on code.google.com by alessios...@gmail.com on 7 Nov 2011 at 1:58

GoogleCodeExporter commented 8 years ago
Standard library usually perform padding adjustments, ie: RijndaelManaged.

Original comment by alessios...@gmail.com on 7 Nov 2011 at 1:59

GoogleCodeExporter commented 8 years ago
Could replicate the issue. Version 0.5.0
Still waiting for a fix

Original comment by phamilto...@gmail.com on 17 Feb 2014 at 12:24

GoogleCodeExporter commented 8 years ago
Could someone provide some code to reproduce this issue?

I can't reproduce it with version 0.5.0, so I am worried about my code!

Attached my decrypt method - I am using the return value of cryptoStream.Read() 
to set the length of the decrypted array.

Original comment by PeterFre...@googlemail.com on 10 May 2015 at 2:44

Attachments: