-
Notifications
You must be signed in to change notification settings - Fork 55
AesEcb: BlockLength not supported on iOS #62
Comments
I think AES in ECB block mode isn't supported on iOS at all. Either that, or PCLCrypto simply hasn't written the special code on iOS that it requires to use it. If you're aware of which it is, please share. And if we can fix it, please consider sending a PR to fix it. I'm on a long'ish effort improving crypto support on WinRT/desktop for the next major release of this project so I won't be able to circle back around to iOS for this for a while unless it's just to review a PR. |
According to the Wiki page "Algorithms X platforms support", the ECB blockmode should actually be supported on iOS: https://github.com/AArnott/PCLCrypto/wiki/Algorithms-X-platforms-support Can you check up on this, please? |
Yes. I'll look more into it. |
Have you found out why the docs say it's supported on iOS? I see two possibilities: First, the docs are wrong. Second, the code is wrong. I think you can find out what it is much faster than anyone else. Please note that this issue is not very urgent for me. Please take your time. Issue #61 is more important to me. Best regards, |
I have the same issue. If you look into PCLCrypto.iOS there a no files at all. Is there any implementation yet? Best regards, |
I know figured out, AesCbcPkcs7 is working. All others threw NotImplementedException. I had nuget .86 version. |
@Matt-17 That might be because on iOS we're still using mono APIs for symmetric encryption and it may not support any other encryption types or variants. Or it might simply be because we haven't exposed those variables yet. I'm slowly working through all the platforms, switching from .NET/mono APIs to native crypto for each platform in order to get improved perf and more feature completeness. |
No problem. I was just confused earlier, because on documentation it looked like it should work as easy and the same as on Android. Good work anyway :) |
Well I appreciate the reports on documentation. It's not done and fully vetted yet. And it's based on the master branch, besides, which hasn't shipped in quite a while. |
Sorry @AArnott, we have decided to drop PCLCrypto and create our own encryption code for iOS and Android. I will not be able to contribute to a fix for this issue. Sorry. |
Best of luck to you, @rsnitsch. Sorry we couldn't get it working for you in time. |
Our customer requested that we drop PCLCrypto instead of trying to fix it. We only need simple AES encryption, which was easy to implement on Android and iOS using .NET's AesManaged class. On Android, the AesManaged class was even faster than Android's native Cipher class (about 10-40%). (On iOS we did not even try the native methods.) |
Ah, that makes sense. Thanks. |
On iOS I get the following exception:
This is my code:
Details:
SymmetricAlgorithm.AesCbcPkcs7
without problemsThe text was updated successfully, but these errors were encountered: