-
Notifications
You must be signed in to change notification settings - Fork 344
-
Notifications
You must be signed in to change notification settings - Fork 344
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
Swift 5.2 ClearMessage Has Bad Encryption #183
Comments
@TakeScoop any updates on this? |
We're facing the same problem... |
In our case we had about 10% of encryption failures. |
AFAIK this isn't specifically an issue in SwiftyRSA as it's just a wrapper around the Security APIs. It seems to fail during I haven't found a way to reproduce this in SwiftyRSA unit tests, though it does happen fairly often in production/our app. |
We are trying to encode credit card data and get an error every time for month, year and cvc. Looks like this problem can be reproduced more often if you trying to encrypt small strings. Like 2–4 symbols. |
I am experiencing the same issue after migrating my project from Xcode 10.1 to Xcode 11.4. I am asking for Apple for this. Will keep update in this post. |
We encountered the same problem when trying to decrypt message.
Not always, but sometimes we got "Bad decryption" Xcode 11.4.1 |
Can any of you test with the fork I made recently? I didn't have time to do extensive testing, but the update fixed the warnings (by using proper
|
Problem Solution : just copy "ClearMessage" class from swiftyRSA source in to your project with a new name and use from this class instead of "ClearMessage" at swiftyRSA. |
@jannemecek I just did a test run (1000 api calls using RSA encryption) With your fix they all succeeded. With the original SwiftyRSA about the ½ failed. Could you make a PR for this? |
Great to hear that, just opened #184 |
jannemecek's solution solves my issue. Thanks! |
It works. Thank you! Can you please explain, what was wrong and what your fix do? Thanks |
I had the same problem, but in version 1.6.0 this has been resolved. |
After update swift version to 5.2 and update build latest "SwiftyRSA", encryption method at "ClearMessage" class sometime has wrong data.
Test :
I saved a clear message when encryption was OK, and for next time used from that object again
BUT!
for second time encrypted data was not ok. in fact correct encrypted data completely is random after update to swift 5.2.
The text was updated successfully, but these errors were encountered: