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

ExchangeKey react-native cryptography lib #121

Conversation

Projects
None yet
2 participants
@georgiemathews
Copy link

commented May 10, 2019

No description provided.

@pedrouid

This comment has been minimized.

Copy link
Member

commented May 11, 2019

Hi @georgiemathews, just tested your PR with walletconnect-developer-app on debug branch and I'm getting an empty ArrayBuffer from the method decryptWithPrivateKey(). This happens during the _handleKeyUpdate() on the core package.

@pedrouid

This comment has been minimized.

Copy link
Member

commented May 11, 2019

PS - To test it a against the example dapp, check out the deploy preview available at https://debug-exchange-key--walletconnect-example.netlify.com

@georgiemathews

This comment has been minimized.

Copy link
Author

commented May 12, 2019

PS - To test it a against the example dapp, check out the deploy preview available at https://debug-exchange-key--walletconnect-example.netlify.com

@pedrouid, could you give me some direction on how I could test this out, earlier, I just created a new connection with the url from https://debug-exchange-key--walletconnect-example.netlify.com and ran all of the cryptolib functions to encrypt and decrypt a message. That worked fine. Would love to debug this further if you let me know what you did to test.

@pedrouid

This comment has been minimized.

Copy link
Member

commented May 12, 2019

I ran the walletconnect-developer-app repo on debug branch on my iPhone (you could also do it from Android).

Then I started a connection with the url https://debug-exchange-key--walletconnect-example.netlify.com. Once I approved the connection from my phone, it threw an error Failed to execute key update from here.

I debugged the issue and found that the decrypted message was an empty ArrayBuffer (here). I've left the console.log calls on the debug branch of the react-native project, so you will be able to inspect yourself on L1094 the empty arrayBuffer.

@georgiemathews

This comment has been minimized.

Copy link
Author

commented May 13, 2019

@pedrouid tried to reproduce this error, still having trouble getting the handlekeyupdate error, cloned the debug branch, built on my physical device and scanned qr code from the deploy preview, tried to send a transaction, could not replicate this error.

@pedrouid pedrouid changed the title initial ExchangeKey react-native cryptography lib May 21, 2019

@pedrouid

This comment has been minimized.

Copy link
Member

commented May 21, 2019

@pedrouid tried to reproduce this error, still having trouble getting the handlekeyupdate error, cloned the debug branch, built on my physical device and scanned qr code from the deploy preview, tried to send a transaction, could not replicate this error.

Only saw this now, I will give it a try again

@pedrouid

This comment has been minimized.

Copy link
Member

commented May 22, 2019

Hi @georgiemathews, I have tried it again and I'm still getting the same issue, here is the step-by-step to reproduce.

  1. git clone https://github.com/WalletConnect/walletconnect-developer-app.git
  2. cd walletconnect-developer-app
  3. git checkout debug
  4. npm install
  5. npm run start
  6. open walletconnectdeveloperapp.xcodeproj
  7. Press "Run" on XCode with iPhone connected
  8. Open Deploy Preview (https://debug-exchange-key--walletconnect-example.netlify.com/)
  9. Scan QR Code with Developer App on iPhone
  10. Error returned in browser "Failed to execute key update"

The error is thrown always on the same line from the core package where this.cryptoLib.decryptWithPrivateKey returns an empty ArrayBuffer on L1072

Let me know if you are able to reproduce this error

@georgiemathews

This comment has been minimized.

Copy link
Author

commented May 28, 2019

@pedrouid, still debugging, but I tried a handful of times using the exact steps you listed to reproduce and couldn't get the error, checked that cryptolib was correctly generating the keypairs and didn't find anything erroneous. I'll keep you updated!

@pedrouid pedrouid closed this Jun 14, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.