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

[BUG / possible BUG] Cipher hex code incomplete #2570

Open
michael-o opened this issue Sep 23, 2024 · 4 comments
Open

[BUG / possible BUG] Cipher hex code incomplete #2570

michael-o opened this issue Sep 23, 2024 · 4 comments
Labels

Comments

@michael-o
Copy link

michael-o commented Sep 23, 2024

Running testssl.sh version 3.0.9. The hexcode is weird:

 Testing 370 ciphers via OpenSSL plus sockets against the server, ordered by encryption strength

Hexcode  Cipher Suite Name (OpenSSL)       KeyExch.   Encryption  Bits     Cipher Suite Name (IANA/RFC)
-----------------------------------------------------------------------------------------------------------------------------
 x1302   TLS_AES_256_GCM_SHA384            ECDH 253   AESGCM      256      TLS_AES_256_GCM_SHA384                             available
 x1303   TLS_CHACHA20_POLY1305_SHA256      ECDH 253   ChaCha20    256      TLS_CHACHA20_POLY1305_SHA256                       available
 xcc14   ECDHE-ECDSA-CHACHA20-POLY1305-OLD ECDH       ChaCha20    256      TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256_OLD  not a/v
 xcc13   ECDHE-RSA-CHACHA20-POLY1305-OLD   ECDH       ChaCha20    256      TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256_OLD    not a/v

Isn't a hex number expected to be 0x1302, so a zero prepended? At least that is the convention...

Running on:

$ bash --version
GNU bash, Version 5.2.26(1)-release (amd64-portbld-freebsd13.2)
$ freebsd-version
13.4-STABLE
@drwetter
Copy link
Owner

@michael-o
Copy link
Author

michael-o commented Sep 23, 2024

?

https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml#tls-parameters-4

No, this is not what I have reported. It is only about the hex code output. The prepended zero is missing.

This is what I would expect:

 Testing 370 ciphers via OpenSSL plus sockets against the server, ordered by encryption strength

Hexcode   Cipher Suite Name (OpenSSL)       KeyExch.   Encryption  Bits     Cipher Suite Name (IANA/RFC)
-----------------------------------------------------------------------------------------------------------------------------
 0x1302   TLS_AES_256_GCM_SHA384            ECDH 253   AESGCM      256      TLS_AES_256_GCM_SHA384                             available
 0x1303   TLS_CHACHA20_POLY1305_SHA256      ECDH 253   ChaCha20    256      TLS_CHACHA20_POLY1305_SHA256                       available
 0xcc14   ECDHE-ECDSA-CHACHA20-POLY1305-OLD ECDH       ChaCha20    256      TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256_OLD  not a/v
 0xcc13   ECDHE-RSA-CHACHA20-POLY1305-OLD   ECDH       ChaCha20    256      TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256_OLD    not a/v

Kindly reopen, I can provide a PR if we agree on the issue.

@drwetter
Copy link
Owner

drwetter commented Sep 23, 2024

Ah, that zero. I read over that. Sorry. Maybe you should have sticked to the template provided. ;-)

To answer your q: You are referring to the C-standard (K&R ) but to my knowledge there is not a single standard . We might as well remove the x, as ḧexcode is the table headline. See https://en.wikipedia.org/wiki/Hexadecimal#Distinguishing_from_decimal . That reference is not complete, e.g. Javascript wasn't mentioned there and I guess others too.

Also I believe a) the tables need to be adjusted not only the numbers. b) More importantly: that'll be a breaking change for the 3.2 branch and as long as we're in the RC phase I wouldn't be willing to merge that now. For 3.0.x: That branch is old and this wouldn't be a change which will be backported. This is in maintenance mode only and support will be dropped when 3.2 is released.

@drwetter
Copy link
Owner

Considering this for later

@drwetter drwetter reopened this Sep 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants