Code Monkey home page Code Monkey logo

Comments (4)

jannson avatar jannson commented on July 30, 2024

chacha20
chacha20-ietf 加密的支持?不知道效果如果,会不会计算得更快?
还有,加密方式能否自己进行选择?

from kcptun.

xtaci avatar xtaci commented on July 30, 2024

@jannson 现在大多数设备的cpu都应该支持aes-ni指令,AES加密有硬件支持的情况下,不一定慢。

  • RC4的加密在数据包层面固定偏移位置能直接xor推导出特征,弃用。
  • DES的加密没有硬件支持,太慢。
  • chacha20如果是rc4这种stream cipher,对于包级别依然无法去特征。

(比如包头部偏移32个字节就可以猜测kcp头部,xor做实验,验证下一个包的kcp)。

总之,在包级别去特征,只能用block cipher
在传输层,可以自己在上面实现一层TLS就能保证数据的安全,这一层才能选择chacha20/rc4/des这些,类似于-tuncrypt选项。

我非常支持你做任意的修改,有任何问题我可以提供详细的解释,一起探讨。

from kcptun.

jannson avatar jannson commented on July 30, 2024

原来如此。明白了~

from kcptun.

riobard avatar riobard commented on July 30, 2024

Salsa20/ChaCha20 用随机 nonce 就可以去特征了。详见 https://nacl.cr.yp.to/secretbox.html

from kcptun.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.