Skip to content
This repository has been archived by the owner on Jul 21, 2023. It is now read-only.

Cross-Browser compatibility #18

Closed
dignifiedquire opened this issue Oct 24, 2016 · 5 comments
Closed

Cross-Browser compatibility #18

dignifiedquire opened this issue Oct 24, 2016 · 5 comments
Assignees
Labels
status/ready Ready to be worked

Comments

@dignifiedquire
Copy link
Member

dignifiedquire commented Oct 24, 2016

Due to the changes in #12 (the move to mainly webcrypto) browser support drops to only Firefox and Chrome. Even though Safari, IE11 and Edge implement crypto.subtle they don't support all algorithms that we require. Namely

  • AES-CTR: Safari, Mobile Safari, Edge, IE11
  • ECDH: Safari, Mobile Safari, Mobile Chrome, Edge
  • RSASSA-PKCS1-v1_5: Safari, Mobile Safari, IE11
  • HMAC: Mobile Safari

Given that currently only Firefox and Chrome support webrtc the impact of this might not be that large, but we should investigate in polyfills which can be included by projects that want to support other browsers.
We don't want to ship polyfills by default though, as that would increase the size of this and all dependent modules drastically.

Please give feedback if this is okay for now, or if this is an issue for you and of course solutions and suggestions.

@daviddias
Copy link
Member

Oh, didn't realise from the convo in IRC that Mobile Chrome was also in jeopardy with the async crypto PR.

The performance we get from moving to async crypto is quite significant plus the bundle size reduce. It would be interesting to know how easy it is to shim the missing algorithms in a way that they can be added to the global scope of the Browser, so that js-ipfs implementation wise doesn't have to change.

Found https://www.npmjs.com/package/webcrypto-shim but seems that is far from being complete.

@dignifiedquire
Copy link
Member Author

Turns out, mobile chrome is fine, the version on Sauce Labs is just super old.

@daviddias
Copy link
Member

What about Internet Explorer and Mobile Firefox?

@dignifiedquire
Copy link
Member Author

  • Mobile Firefox, no idea can't test it
  • added IE11

@daviddias daviddias added status/in-progress In progress and removed libp2p-ready labels Nov 7, 2016
@daviddias daviddias added libp2p-backlog and removed status/in-progress In progress labels Nov 23, 2016
@daviddias daviddias added status/ready Ready to be worked status/deferred Conscious decision to pause or backlog and removed libp2p-backlog status/ready Ready to be worked labels Dec 2, 2016
@daviddias daviddias changed the title Browser compatability Cross-Browser compatibility Jul 8, 2017
@daviddias daviddias added status/ready Ready to be worked and removed status/deferred Conscious decision to pause or backlog labels Feb 5, 2018
wemeetagain pushed a commit to ChainSafe/js-libp2p-crypto that referenced this issue Apr 6, 2020
BREAKING CHANGE: Callback support has been dropped in favor of async/await.

* feat: use async/await

This PR changes this module to remove callbacks and use async/await. The API is unchanged aside from the obvious removal of the `callback` parameter.

refs ipfs/js-ipfs#1670

* fix: use latest multihashing-async as it is all promises now
@achingbrain
Copy link
Member

Closing because everything is Chrome now.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status/ready Ready to be worked
Projects
None yet
Development

No branches or pull requests

3 participants