-
Notifications
You must be signed in to change notification settings - Fork 811
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: Chacha20_poly1305 WolfSSL and OpenSSL produce same ciphertext but different tags #7322
Comments
this is also my user_settings.h:
|
Thanks for the report and the additional information. I'm working on reproducing this here. Will keep you updated. |
Hi @Hippeys , I tried reproducing your issue on Linux and I was not able to reproduce it here. I am working on getting everything set up on Windows + Visual Studio to try reproducing it there. |
@kareem-wolfssl yes, on x64 linux, x86 windows all is ok, issue exists when targeting x64 windows. |
@Hippeys I'm also unable to reproduce on Windows x64, using Visual Studio 2022, wolfSSL 5.6.6 + OpenSSL 3.2.0.
Can you confirm if you are using Chacha/Poly assembly in Visual Studio somehow? Are you using Clang in VS? |
@Hippeys I was informed about your previous issue for Chacha/Poly assembly on Windows and I see my colleage Sean's PR for it. I will give it a try here. |
@kareem-wolfssl I dont use masm code for chacha20 yet, so you dont need to try this yet. Yes, i tried now to undef USE_INTEL_SPEEDUP and works correctly. But the strange thing is that even if i remove asm code for chacha and poly1305 manually problem still exists. Steps to reproduce:
So this will keep intel speedup for the rest of library, like for sp_x86_64 etc, but will remove asm code from sha256, poly1305 and chacha20 and will compile ok, but still WolfSSL generate different tag than OpenSSL. |
Thanks, I'm able to reproduce the issue here with your instructions. I'm looking into this with the team. |
Contact Details
No response
Version
5.66
Description
WolfSSL ver: 5.6.6
OpenSSL ver: 3.2.0
Visual Studio x64 app for Windows
Testing WolfSSL's chacha20_poly1305 implementation i discovered that both WolfSSL and OpenSSL produce same ciphertext out of same plaintext, using same key and iv, but poly1305 tags are different...
My sample code:
This code writes "tag_wolfssl != tag_openssl" to console. As you can see ciphertext are both same, only tags are different.
I've also tested on x86 Windows, x64 Linux - both are ok, we can see such behaviour only on x64 Windows target
Reproduction steps
No response
Relevant log output
No response
The text was updated successfully, but these errors were encountered: