Comments (6)
好几个月都没一点动静了 你猜呢
lenovo-me [email protected]于2015年1月13日星期二写道:
谢谢!
—
Reply to this email directly or view it on GitHub
#55.
from shadowsocks-go.
golang下如果官方不出面很难有支持的,即使有性能也没AES好。
因为AES有硬件加速支持的,而chacha20没有,靠的是用汇编指令才获得评测中的好成绩。
salse20貌似是有官方库。虽然现在有人在golang实现chacha20,不过也是调用了cgo,这样就没有移植性了,如果用纯go语言写,又因为go runtime,性能还不如aes,所以没有必要在golang上实现chacha20。
再说加密计算速度又不是限制你网速的瓶颈,瓶颈大多数还是你的网络带宽,没有必要去玩chacha20,除非你有信仰
from shadowsocks-go.
其他加密方法如果有纯的 Go 实现的话会考虑加入。如 @lixin9311 所说,引入 cgo 之后跨体系结构和系统的支持就难做了。
from shadowsocks-go.
https://github.com/codahale/chacha20
这里有个pure go的chacha20实现,我回头测试一下性能,估计是不会有aes好的。。
ps:看了下,这个实现用了unsafe.Pointer来做强制类型转换。。个人觉得不是很好,暂时放弃这个包
from shadowsocks-go.
PASS
BenchmarkRC4Init-8 200000 8180 ns/op
BenchmarkAES128Init-8 300000 3930 ns/op
BenchmarkAES192Init-8 300000 4193 ns/op
BenchmarkAES256Init-8 300000 4826 ns/op
BenchmarkBlowFishInit-8 20000 57403 ns/op
BenchmarkCast5Init-8 30000 57369 ns/op
BenchmarkDESInit-8 300000 5053 ns/op
BenchmarkRC4MD5Init-8 200000 8710 ns/op
BenchmarkChaCha20Init-8 1000000 1044 ns/op
ok /D/shadowsocks-go/shadowsocks 14.824s
试了下chacha20,确实快不少。与shadowsocks-libev互通成功。
上述chacha20包封装的很标准,所以改起来也很简单,但是因为引入了unsafe包,具体要不要加入,由cyfdecyf决定吧
from shadowsocks-go.
https://godoc.org/golang.org/x/crypto/salsa20
然后看上去salsa20也在进入准官方库的过程中。不过现在的封装跟标准库不太一样。。
from shadowsocks-go.
Related Issues (20)
- CodeLingo Install
- 求解 HOT 3
- support IPv6 in client-multi-server.json HOT 4
- EOF error HOT 2
- The ss server goes dead frequently
- traffic for port reported too low HOT 2
- 数组切割错误runtime error: slice bounds out of range HOT 2
- panic了一次,udp
- How to get shadowsocks log file on windows server?
- Server copies client IV
- go get 总是报 “ TLS handshake timeout” 错误 HOT 3
- script/build.sh 执行报错 could not determine kind of name for C.AI_MASK
- 通过命令行启动的时候,没有读取config.json里面加密方法,而是使用了默认的加密方法 HOT 1
- 请问go在监听端口的时候,有没有办法在代码里面去设置backlog等待队列的值? HOT 1
- aes-128-cfb 加密算法问题
- 请问是否有debug模式启动,can i start it with debug mode
- 要不要试试flynet?
- "XML syntax error" causing go get to fail. HOT 1
- 找大佬合作开发下定制客户端
- SS_client is not forwarding SIP Traffic to SS_Server
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from shadowsocks-go.