Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upUse native browser sha1 implementation when possible #234
Labels
Comments
astro
added a commit
to astro/webtorrent
that referenced
this issue
Jan 4, 2015
contributes to GH issue webtorrent#234
This comment has been minimized.
This comment has been minimized.
|
It looks like simple-sha1 has the right aims: to provide the fastest implementation available. crypto.subtle support should be implemented there. |
This comment has been minimized.
This comment has been minimized.
|
This is done now. Released as 0.22.0.
|
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Most of the the browser's time is spent in
git-sha1when creating a torrent. This is unsurprising, since the file must be split into pieces and hashed. But, this currently locks the entire browser for seconds.Is the browser's native sha1 implementation faster? It's already shipped in Chrome and Firefox. See: http://caniuse.com/#feat=cryptography
crypto.subtleis actually fasterRushaand currentgit-shaas fallback for insecure origins and older browserscrypto.subtleis only available onhttps:sites (https://instant.io is https, but other sites that use webtorrent might not be). Comment on this issue: https://code.google.com/p/chromium/issues/detail?id=373032Related issue: webtorrent/create-torrent#4