Open chenshaoju opened 4 years ago
Interesting attack. Now we could finally get rid of stream ciphers (after deprecating them for years)!
To clarify: go-shadowsocks2 (not to be confused with the deprecated shadowsocks-go) supports AEAD ciphers from the very beginning, in addition to shadowsocks-libev, so the author's recommendation at the end is slightly incorrect.
We have had active probing against stream ciphers since forever and that is already enough reason to not use stream ciphers already. (remember OTA?) I think stream ciphers are kept for improving performance if it is used along with plugins (https://github.com/shadowsocks/shadowsocks-libev/pull/2581). Again this is a niche usage of stream cipher and personally I would prefer it gone.
Should we remove all stream ciphers from the officially supported implementations now? Can't wait to delete legacy code! π
Windows implementation will remove all (maybe except few oldest cipher for special case) non-AEAD cipher in next major release. We're rewriting encryption using BouncyCastle, as they are not safe, we needn't implement them now.
@studentmain What's the (rough) time frame for the next major release? And why still keep some old ciphers around? π
@madeye I'm removing all stream ciphers from go-ss2. Do you have any plan to deprecate them in ss-libev as well?
What's the (rough) time frame for the next major release?
When it down (or we give up).
And why still keep some old ciphers around?
plain
/table
/rc4
/rc4-md5
for speed when user is hidden by plugin .If we finally decide keep them, user need edit config file in order to enable them, that make sure user know what they're doing.(Because of we dropped libsscrypto, they'll have a pure .NET implementation.)
@studentmain So maybe just leave plain
(no encryption right?) is enough for plugin use? The most useful plugin is to wrap in TLS so there's no need to encrypt in SS at all.
I'd prefer plain
(no encryption, stream cipher format with 0 bit IV) and rc4-md5
, rc4-md5
is still wide supported, so user is more likely find a server has it. But it needn't be included in standard.
The reason I mentioned table
and rc4
here is just I found their pure and simple C# implemenatation in git history and ported them into current codebase (of course, in personal branch).
The best practice is deprecating stream ciphers, not removing them: https://github.com/shadowsocks/shadowsocks-libev/pull/2581
@studentmain I see, so it's more about removing some dependencies.
@madeye Fair enough. I'm removing them in go-ss2 to force the deprecation.
@madeye @riobard In general, I think it's a good idea to remove stream cipher (except for plain
so user will definitely know what they are doing?) from server-side but keep it on client side (for backwards compatibility) to prevent user outcry. Thoughts?
For go-ss2 I don't need to consider the client-side use case that much as I don't think many people use it as a client???
I'm actually considering using a golang/rust implementation for shadowsocks-android because libev is too cumbersome to work with... π
Is it easy to embed Go on Android? π
Not too hard: https://github.com/shadowsocks/v2ray-plugin-android/blob/e8cd1f3dff69329a0d2d7593ba8cec54e6257cda/app/build.gradle#L53-L69
Although golang has a large stdlib so apk size is going to take a hit.
A few extra MBs shouldn't hurt now that app sizes are usually measured in tens and hundreds of MBs. But I'm not sure about the memory usage on mobile though. Go has a runtime with GC, and it needs some free memory to work well, and on mobile we're actually short on memory. Would the Android OS impose any memory constraint? On iOS that's the major barrier because Network Extensions have some hard limit on memory.
@Mygod Is Android 32-bit or 64-bit?
@riobard Android doesn't really care about GC and I have no interest in doing iOS. Anyway it sounds like you are proposing that we use rust and I agree. :)
List of ABIs we are building for go on android: https://github.com/shadowsocks/v2ray-plugin-android/blob/e8cd1f3dff69329a0d2d7593ba8cec54e6257cda/app/go-build.bash#L5
If running Go binary is not a major issue on Android, I'm perfectly happy to see you embed it π
Please continue the discussion at https://github.com/shadowsocks/shadowsocks-android/issues/2452 if you want as we are getting off-topic.
ss-windows deprecated all stream cipher in v4.1.10
According to my recently survey. In 47 users, only 31(65%) user are using AEAD cipher. 12(25%) user are using aes-cfb, 12(25%) user are using chacha20-ietf, 13(27%) user are using rc4-md5. 5(10%) user are using chacha20 or salsa20.
https://github.com/edwardz246003/shadowsocks