[Bug 36765] New: AES 128 works different on "Win7" and on "Wine win7"
http://bugs.winehq.org/show_bug.cgi?id=36765 Bug ID: 36765 Summary: AES 128 works different on "Win7" and on "Wine win7" Product: Wine Version: unspecified Hardware: x86-64 OS: Windows Status: UNCONFIRMED Severity: normal Priority: P2 Component: crypt32 Assignee: wine-bugs(a)winehq.org Reporter: sergpeganov(a)gmail.com Created attachment 48823 --> http://bugs.winehq.org/attachment.cgi?id=48823 src and compiled exe for test Hello, I have a windows application that uses CryptoAPI. I've found that encrypted text differs when application runs on real Win7 machine and on Wine. When I encrypt/decrypt the same data on Windows everything works fine. When I encrypt/decrypt the same data on Wine everything works fine too. The problem happens when I encrypt on Windows and decrypt on Wine. I made a simple application to show that encrypted results differ. Please run cryptoapi_test.exe from the attachement on Windows and on Wine and you will get different results. Src also attached. I also attached the same crypt test on JavaScript and Python for reference (they give the same result as on Windows). I found the similar bug #28673 but it has a very messy description. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=36765 Serg <sergpeganov(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |sergpeganov(a)gmail.com -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=36765 --- Comment #1 from Bruno Jesus <00cpxxx(a)gmail.com> --- Looks like a CBC issue, the second block of data is not being initialized correctly before encryption. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=36765 --- Comment #2 from Bruno Jesus <00cpxxx(a)gmail.com> --- It looks like when you don't specify the chaining mode wine defaults to ECB while the default should to CBC. Javascript and python are using CBC mode. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=36765 Austin English <austinenglish(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download, source, testcase -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=36765 --- Comment #3 from Serg <sergpeganov(a)gmail.com> --- That's it! Added: DWORD mode = CRYPT_MODE_CBC; key.SetParam(KP_MODE, (BYTE*)&mode); And it works. Thanks. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=36765 Bruno Jesus <00cpxxx(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Assignee|wine-bugs(a)winehq.org |00cpxxx(a)gmail.com Ever confirmed|0 |1 --- Comment #4 from Bruno Jesus <00cpxxx(a)gmail.com> --- Confirming the bug and taking to myself, it will take more time to fix because there is another problem that needs to be fixed first. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=36765 Bruno Jesus <00cpxxx(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |den.aria(a)gmail.com --- Comment #5 from Bruno Jesus <00cpxxx(a)gmail.com> --- *** Bug 28673 has been marked as a duplicate of this bug. *** -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=36765 --- Comment #6 from den123 <den.aria(a)gmail.com> ---
From Bug 28673
Problem has resolved. Very Thanks! -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=36765 Bruno Jesus <00cpxxx(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |e55dc350209e15ff9d8c05a12be | |01c93dbd3e318 Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #7 from Bruno Jesus <00cpxxx(a)gmail.com> --- Patch commited: http://source.winehq.org/git/wine.git/commitdiff/e55dc350209e15ff9d8c05a12be... -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=36765 Alexandre Julliard <julliard(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #8 from Alexandre Julliard <julliard(a)winehq.org> --- Closing bugs fixed in 1.7.23. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
participants (1)
-
wine-bugs@winehq.org