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

Proposal for adding aes-ctr method in spec. #21

Closed
itsuki-hayashi opened this issue Aug 11, 2016 · 8 comments
Closed

Proposal for adding aes-ctr method in spec. #21

itsuki-hayashi opened this issue Aug 11, 2016 · 8 comments

Comments

@itsuki-hayashi
Copy link

AES in CFB mode is not supported by WebCrypto in major browsers, so to implement a Chrome OS version of Shadowsocks, developers have to do encryption in JavaScript, which is slow even with asm.js(about 40MiB/s+ vs 300MiB/s+ with modern x86 processor, could be 1GiB+ with AES-NI intrinsics).
AES in CTR mode is supported by most WebCrypto implementations, and it is trivial to implement in most server side implementations of shadowsocks.
Some implementations(e.g shadowsocks-chromeapp) already have CTR mode support. I think it is best to add CTR mode to spec.

@Mygod
Copy link
Contributor

Mygod commented Aug 11, 2016

LGTM. Related information.

@madeye
Copy link
Contributor

madeye commented Aug 11, 2016

LGTM. Added via shadowsocks/shadowsocks-libev@9e407a9

@nekolab
Copy link

nekolab commented Aug 11, 2016

Thanks for your proposal.

Actually the bottleneck of chrome app is not only at the crypto performance, the design of JavaScript socket API and the V8 GC are also terrible for the heavy data traffic. That's the reason why I put the emphasis on the native client version. You can see further discussion here: shadowsocks/shadowsocks-chromeapp#21, shadowsocks/shadowsocks-chromeapp#15 and
shadowsocks/shadowsocks-chromeapp#1.

But even there are many weak points in chrome app, I still think use WebCrypto API instead of JS library like forge is necessary, so, LGTM.

@itsuki-hayashi
Copy link
Author

@meowlab FYI https://bugs.chromium.org/p/chromium/issues/detail?id=585566 dskaram is working on a PPAPI for AES-NI. This might be useful for your NaCl version.

@nekolab
Copy link

nekolab commented Aug 11, 2016

@edsgerlin Wow, that's great. Thanks for letting me know that.

Mygod added a commit to shadowsocks/shadowsocks-android that referenced this issue Aug 11, 2016
@wongsyrone
Copy link

kaneawk pushed a commit to kaneawk/shadowsocks-android that referenced this issue Aug 13, 2016
@librehat
Copy link
Contributor

Added for Qt implementation shadowsocks/libQtShadowsocks@2959fff

@wongsyrone
Copy link

@madeye I think it is time to add this to the website.

@madeye madeye closed this as completed Sep 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants