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

Update A14-channelz.md to use RFC ciphersuite names #71

Merged
merged 2 commits into from
Mar 16, 2018

Conversation

zpencer
Copy link
Contributor

@zpencer zpencer commented Mar 14, 2018

The standard ciphersuite name already includes both the key exchange and the cipher. The naming convention is: TLS_<key_exchange>_WITH_<cipher>_<hash>:
https://tools.ietf.org/html/rfc4346#appendix-C

Just exposing the RFC name lets us avoid string parsing in every channelz implementation. It also exposes the hash algorithm for free.

I confirmed the Java SSL API provides an easy way to get this standard name.

For C, there is https://www.openssl.org/docs/manmaster/man3/SSL_CIPHER_get_name.html:

SSL_CIPHER_standard_name() returns a pointer to the standard RFC name of cipher. If the cipher is NULL, it returns "(NONE)". If the cipher has no standard name, it returns NULL. If cipher was defined in both SSLv3 and TLS, it returns the TLS name.

For Go:
https://golang.org/pkg/crypto/tls/#pkg-constants

The standard ciphersuite name already includes both the key exchange and the cipher. The naming convention is: `TLS_<key_exchange>_WITH_<cipher>_<hash>`:
https://tools.ietf.org/html/rfc4346#appendix-C

I confirmed the Java SSL API provides an easy way to get this standard name. 

For C, there is https://www.openssl.org/docs/manmaster/man3/SSL_CIPHER_get_name.html:
>> SSL_CIPHER_standard_name() returns a pointer to the standard RFC name of cipher. If the cipher is NULL, it returns "(NONE)". If the cipher has no standard name, it returns NULL. If cipher was defined in both SSLv3 and TLS, it returns the TLS name.

For Go:
https://golang.org/pkg/crypto/tls/#pkg-constants
A14-channelz.md Outdated
string cipher_suite_standard_name = 1;
// Some other way to describe the cipher suite if
// the RFC 4346 name is not available.
string cipher_suite_other_name = 2;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe this should be:

oneof cipher_suite {
  string standard_name = 1; 
  string other_name = 2;
} 

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done @carl-mastrangelo PTAL

Copy link
Contributor

@carl-mastrangelo carl-mastrangelo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lyuxuan FYI

LGTM

@zpencer zpencer merged commit f59e5da into master Mar 16, 2018
zpencer added a commit to zpencer/grpc-java that referenced this pull request Mar 16, 2018
zpencer added a commit to grpc/grpc-java that referenced this pull request Mar 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants