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

Not working on native device #16

Closed
adkandari opened this issue Dec 23, 2018 · 10 comments
Closed

Not working on native device #16

adkandari opened this issue Dec 23, 2018 · 10 comments

Comments

@adkandari
Copy link

Hi, the decryption works perfectly on a simulator but when testing in real iPhone 6s, its not working.

@geoff-ellison
Copy link

geoff-ellison commented Mar 10, 2019

We have this issue also. In terms of generating keys.
Interestingly, it seems to work fine (on a device) for generating 1024 bit keys, but does not work for higher strengths. We've tested 2048 and 4096 with various rsaStandard values (none, 'RSA-OAEP' and 'RSAES-PKCS1-V1_5').

@geoff-ellison
Copy link

FYI this was using React Native 57.1, and testing on several iPhones (including 6 and 7).

We have this issue also. In terms of generating keys.
Interestingly, it seems to work fine (on a device) for generating 1024 bit keys, but does not work for higher strengths. We've tested 2048 and 4096 with various rsaStandard values (none, 'RSA-OAEP' and 'RSAES-PKCS1-V1_5').

@juhoen
Copy link
Owner

juhoen commented Mar 21, 2019

Hello,
Based on my testing with native Android device key generation works, but takes some time. Over 1 minute when generating 4096 bit key. Is that the case on iPhone also?

@geoff-ellison
Copy link

geoff-ellison commented Mar 25, 2019

Based on my testing with native Android device key generation works, but takes some time. Over 1 minute when generating 4096 bit key. Is that the case on iPhone also?

Both 2048 and 4096 do not complete key generation within 1 minute. Only 1024 works, which completes very quickly.
Generating 4096-bit keys in a web browser takes about 5-10 seconds on average, with the longest being about 25 seconds.

@geoff-ellison
Copy link

Hey @juhoen do you have any update on this?
We are very keen to get it working.

Alternatively, if there is no fix, can you suggest another way that we can generate the keypairs, to produce keys that will still be compatible with hybrid-crypto-js?

Thanks

@abdullahoday710
Copy link

Alternatively, if there is no fix, can you suggest another way that we can generate the keypairs, to produce keys that will still be compatible with hybrid-crypto-js?

I had the same issue , and fixed it using react native "multi threading "

@geoff-ellison
Copy link

I had the same issue , and fixed it using react native "multi threading "

Thanks @3bodyZZ we'd like to give that a try. Any chance you could paste a relevant code snippet? (for activating multi-threading, and/or generating the keys)

Many thanks

@abdullahoday710
Copy link

Any chance you could paste a relevant code snippet? (for activating multi-threading, and/or generating the keys)

Many thanks

@geoff-ellison it is pretty simple just follow the examples from https://github.com/joltup/react-native-threads to suit your needs

@geoff-ellison
Copy link

@geoff-ellison it is pretty simple just follow the examples from https://github.com/joltup/react-native-threads to suit your needs

Thanks @3bodyZZ - will give that a go!

@juhoen
Copy link
Owner

juhoen commented Aug 21, 2019

This seems to be solved.

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

4 participants