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

[iOS] RSAKeychain.decrypt in v2.x.x is incompatible with encrypted data from v1.x.x #121

Open
coopermaruyama opened this issue Oct 20, 2021 · 2 comments

Comments

@coopermaruyama
Copy link

After attempting to upgrade from v1.x of this library to v2.x, there is a fatal exception thrown in the encrypt() method when calling the following method:

// In react native JS Code:
await RSAKeychain.decrypt(encryptedBase64Data, KEY_TAG)

Which throws the following exception in the encrypt() method in RSAECNative.swift:

Unexpectedly found nil while unwrapping an Optional value

This only occurs if the key pair was initially created using v1.x of the library before it was re-written using Swift.

@coopermaruyama
Copy link
Author

@saeedkargosha maybe you can chime in since you did the swift rewrite -- is your rewrite for this method equivalent to the Objective C version?

If not -- maybe you can point me to some docs where I can find the equivalent methods and I'll be happy to add a PR to add methods in the swift version that are backwards-compatible for people trying to upgrade/

@madsnk-sekoia
Copy link

Is there any updates on this issue? We are experiencing an issue that looks like it could be related to this.

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

2 participants