Skip to content
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

AES encrypt options #20

Open
hustwcw opened this issue May 27, 2013 · 2 comments
Open

AES encrypt options #20

hustwcw opened this issue May 27, 2013 · 2 comments

Comments

@hustwcw
Copy link

hustwcw commented May 27, 2013

In the AES256EncryptedDataUsingKey method, I can't decryt the data using java when the options is set to kCCOptionPKCS7Padding. But when I modify the options to "kCCOptionPKCS7Padding | kCCOptionECBMode", I can decrypt correctly.
I haven't used the decryptedAES256DataUsingKey method in the iOS client, but I think the options in this method should alos be modified to "kCCOptionPKCS7Padding | kCCOptionECBMode".

@mschleeweiss
Copy link

ECB is pretty unsecure.

@AlanQuatermain
Copy link
Owner

Even CBC is heading that way. The recommendation is going towards Galois/Counter Mode instead, although there aren't yet many implementations of that. Hopefully Apple will add it to CommonCrypto in the next revision.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants