purepennons / crypto-js

Automatically exported from code.google.com/p/crypto-js
0 stars 0 forks source link

First 16 Bytes were treated incorrectly. #102

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Decrypting data with AES.

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

Result should be: 
36 32 32 01 01 31 08 02 31 31
09 02 30 30 04 04 30 30 30 31
07 0C 30 30 30 30 30 30 31 31
31 31 31 31 05 0C 31 31 30 30
31 30 30 30 30 37 31 39 0A 08
30 30 30 30 30 30 30 36 0B 0F
30 34 32 36 30 30 30 30 30 30
30 30 30 36 37 0C 04 31 30 33
31 0D 06 31 36 35 36 34 34 0E
10 34 32 30 31 39 31 32 30 31
30 32 31 38 30 36 38 0F 02 30
31 10 02 30 39 11 03 31 34 30
12 06 30 30 30 31 32 30 13 06
30 30 31 32 34 33 14 0C 30 30
30 31 33 31 30 30 30 31 34 30
15 01 31 16 02 30 31 17 04 31
30 30 30 18 02 30 31 19 04 31
31 31 31 00 00 00

Result After decrypting
06 02 02 31 31 01 38 32 01 01
39 32 00 00 34 34 > this is what is being decrypted.
30 30 30 31 
07 0c 30 30 30 30 30 30 31 31 
31 31 31 31 05 0c 31 31 30 30 
31 30 30 30 30 37 31 39 0a 08
30 30 30 30 30 30 30 36 0b 0f 
30 34 32 36 30 30 30 30 30 30
30 30 30 36 37 0c 04 31 30 33
31 0d 06 31 36 35 36 34 34 0e 
10 34 32 30 31 39 31 32 30 31 
30 32 31 38 30 36 38 0f 02 30 
31 10 02 30 39 11 03 31 34 30 
12 06 30 30 30 31 32 30 13 06 
30 30 31 32 34 33 14 0c 30 30
30 31 33 31 30 30 30 31 34 30
15 01 31 16 02 30 31 17 04 31
30 30 30 18 02 30 31 19 04 31
31 31 31 00 00 00

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

Please provide any additional information below.

Original issue reported on code.google.com by MarvsPe...@gmail.com on 6 Nov 2013 at 10:51

GoogleCodeExporter commented 8 years ago
> Decrypting data with AES.

You're going to have to be A LOT more specific than that. What was the input 
data? What was the key? What was the IV? What was the mode? What was the 
padding? It would be even more helpful if you could post the code itself that 
produces the incorrect result.

Original comment by Jeff.Mott.OR on 6 Nov 2013 at 5:54

GoogleCodeExporter commented 8 years ago
Hi Jeff,

I just resolved the issue. I got the parsing of IV incorrectly. Thanks! =)

Original comment by MarvsPe...@gmail.com on 6 Nov 2013 at 9:24

GoogleCodeExporter commented 8 years ago

Original comment by Jeff.Mott.OR on 6 Nov 2013 at 9:43