Git Product home page Git Product logo

Comments (39)

riobard avatar riobard commented on August 22, 2024 1

Just use the following alias:

  1. chacha20-ietf-poly1305 to AEAD_CHACHA20_POLY1305
  2. 'aes-128-gcmtoAEAD_AES_128_GCM`
  3. 'aes-192-gcmtoAEAD_AES_192_GCM`
  4. 'aes-256-gcmtoAEAD_AES_256_GCM`

from shadowsocks-org.

hellofwy avatar hellofwy commented on August 22, 2024

Simplify is the beginning of confusion.

I think adding the detail you listed is useful.

from shadowsocks-org.

shinku721 avatar shinku721 commented on August 22, 2024

No. Don't do this. This may be even more confusing.
Deprecating unused ciphers is effective enough.

from shadowsocks-org.

riobard avatar riobard commented on August 22, 2024

AFAIK xchacha20-poly1305 was never implemented, and chacha20-poly1305 was removed anyway. There's only chacha20-ietf-poly1305 variant available, and it's silly for users to remember the extra ietf thing if that's the only one we support.

OpenSSH didn't call their implementation [email protected] and TLS didn't call their cipher suite TLS_CHACHA20_IETF_POLY1305_SHA256.

If we want the AEAD cipher to be widely adopted, we should prefer one to make it easier for clients to pick.

from shadowsocks-org.

Mygod avatar Mygod commented on August 22, 2024

I'm afraid renaming cipher is not an option. It solves fewer problems than it causes.

from shadowsocks-org.

riobard avatar riobard commented on August 22, 2024

Why not? AEAD ciphers are only supported in three implementations so far. It's much better to stick with one name before more implementations make the same mistake.

from shadowsocks-org.

Mygod avatar Mygod commented on August 22, 2024

Because I'm afraid it's already too late. 😅

from shadowsocks-org.

riobard avatar riobard commented on August 22, 2024

It's less than one month old. There's still plenty of time to fix it ^_^

from shadowsocks-org.

Mygod avatar Mygod commented on August 22, 2024

Nah. Methinks the current approach is better even if you proposed this before ss-libev implements it. We need consistency between non-AEAD variants chacha20-ietf and chacha20.

from shadowsocks-org.

riobard avatar riobard commented on August 22, 2024

The consistency only makes sense if we have both chacha20-ietf-poly1305 and chacha20-poly1305. We have just one, and it's the default one. It should have shorter, consistent name with every other use case e.g. OpenSSH and TLS.

from shadowsocks-org.

Mygod avatar Mygod commented on August 22, 2024

Having internal consistency is more important than being consistent with some other libraries.

from shadowsocks-org.

riobard avatar riobard commented on August 22, 2024

BTW chacha20 stream cipher is deprecated due to its 64-bit IV.

from shadowsocks-org.

Mygod avatar Mygod commented on August 22, 2024

Deprecated isn't the same as removed. And even if it's removed it's still more confusing to rename it. It's generally a bad idea.

from shadowsocks-org.

riobard avatar riobard commented on August 22, 2024

So past mistakes stick forever? I bet not.

from shadowsocks-org.

riobard avatar riobard commented on August 22, 2024

This is the chance to fix legacy issues.

from shadowsocks-org.

Mygod avatar Mygod commented on August 22, 2024

So past mistakes stick forever? I bet not.

Unfortunately this is very true, at least in this field.

from shadowsocks-org.

riobard avatar riobard commented on August 22, 2024

I beg to differ. TLS 1.3 draft used to use 64-bit nonce variant AEAD_CHACHA20_POLY1305. They changed it to 96-bit nonce (effectively the IETF-variant) while keeping the name. In fact, AEAD_CHACHA20_POLY1305 is now formally defined in RFC 7539. We should follow the standard.

from shadowsocks-org.

Mygod avatar Mygod commented on August 22, 2024

TLS 1.3 draft

from shadowsocks-org.

riobard avatar riobard commented on August 22, 2024

AEAD_CHACHA20_POLY1305 is now formally defined in RFC 7539. We should follow the standard.

from shadowsocks-org.

madeye avatar madeye commented on August 22, 2024

Maybe add chacha20-poly1305 as alias to chacha20-ietf-poly1305 in shadowsocks? Then, everyone would be happy...

from shadowsocks-org.

riobard avatar riobard commented on August 22, 2024

@madeye I was thinking exactly the same! 👍

from shadowsocks-org.

Mygod avatar Mygod commented on August 22, 2024

@riobard That doesn't prove anything. A draft is by definition subject to change. And this is different.

@madeye Probably not. Now you have a compatibility problem which is much worse.

from shadowsocks-org.

Mygod avatar Mygod commented on August 22, 2024

You can't just finalize a draft and change your mind. Absolutely no.

from shadowsocks-org.

riobard avatar riobard commented on August 22, 2024

I don't see a tag anywhere saying this is "finalized".

from shadowsocks-org.

Mygod avatar Mygod commented on August 22, 2024

Even if nobody has said the word "finalized" there are also quite a few synonyms:

  • #30 is closed.
  • shadowsocks-libev released v3.0.3 as a stable version without any signs like 🚧 or AEAD subject to change. (see this warning for example)
  • Neither can anyone find stuff like that in spec.
  • Having a spec page also implies it's finalized.

from shadowsocks-org.

madeye avatar madeye commented on August 22, 2024

Hmm, confusion is the biggest concern, especially for our normal users. I suggest at least keeping the name chacha20-ieft-poly1305 in shadowsocks, which won't break anyone's config files.

from shadowsocks-org.

Mygod avatar Mygod commented on August 22, 2024

If you really want to make this change, start putting construction signs everywhere mentioning AEAD and I won't object this any more.

from shadowsocks-org.

riobard avatar riobard commented on August 22, 2024

I'd like to know which implementation has both chacha20-poly1305 and chacha20-ietf-poly1305, and who actually deploys the former in practice?

from shadowsocks-org.

Mygod avatar Mygod commented on August 22, 2024

Fine whatever. I'm done wasting my time discussing naming issues.

from shadowsocks-org.

hellofwy avatar hellofwy commented on August 22, 2024

Just follow the name used in crypto libraries, as Shadowsocks doesn't provide this.

from shadowsocks-org.

riobard avatar riobard commented on August 22, 2024

@hellofwy Not all implementations use the the same crypto libs. It's better to stick to RFC.

from shadowsocks-org.

hellofwy avatar hellofwy commented on August 22, 2024

is RFC 7539 a well implemented RFC?

If standardize this cipher name, maybe should standardize all the cipher names as well, and provide a table which lists corresponding names in crypto libraries.

And provide infos about from which version begin supporting all the new names.

from shadowsocks-org.

riobard avatar riobard commented on August 22, 2024

There are two relevant RFCs:

  • RFC 5116 specifies general AEAD interfaces and AES-128/192/256-GCM in particular
  • RFC 7539 specifies Chacha20-Poly1305

Other ciphers are not well defined.

from shadowsocks-org.

riobard avatar riobard commented on August 22, 2024

Ok. If renaming old cipher is unacceptable, may I propose that we adopt the IANA AEAD registry? http://www.iana.org/assignments/aead-parameters/aead-parameters.xhtml

from shadowsocks-org.

riobard avatar riobard commented on August 22, 2024

At least each one in that list has a well-defined specification.

from shadowsocks-org.

riobard avatar riobard commented on August 22, 2024

@Mygod This does not rename old ciphers. I guess you might be OK with it?

from shadowsocks-org.

riobard avatar riobard commented on August 22, 2024

Best thing with the IANA registry is that they assigned a unique numeric ID for each cipher suite. Should be easier to deal with in code.

from shadowsocks-org.

Mygod avatar Mygod commented on August 22, 2024

It's kinda better. But I honestly don't care any more.

from shadowsocks-org.

riobard avatar riobard commented on August 22, 2024

Closing now. New proposal at #61.

from shadowsocks-org.

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.