tlslite-ng
tlslite-ng copied to clipboard
Adding ECPoints TLS 1.2 formats
Hello,
I have some client that does the handshake with the following extenstion
Type: ec_point_formats (11)
Length: 4
EC point formats Length: 3
Elliptic curves point formats (3)
EC point format: uncompressed (0)
EC point format: ansiX962_compressed_prime (1)
EC point format: ansiX962_compressed_char2 (2)
I know this is obsolete, but is there a chance to actually add those ?
Thanks!
I'm sorry, I don't understand the request, we do have those codepoints: https://github.com/tlsfuzzer/tlslite-ng/blob/master/tlslite/constants.py#L442
are you using a recent 0.8.0 release?
Oh, I'm extremely sorry hmm,
I'm using this great client https://github.com/charxhit/httpx-tls
and it tells me raise ValueError("only the uncompressed point format (0) is supported for ECPointFormat extension") ValueError: only the uncompressed point format (0) is supported for ECPointFormat extension
So i thought it's tl-lite issue, thanks for confirming they are there.
What about extension 13172 It's not IANA assigned, but some clients use that, are there any plans to add that ?
well, it is using a custom version of tlslite-ng: https://github.com/charxhit/httpx-tls/blob/c214f1aee0c64a1e25e4cbb4340135ef1391a7c8/setup.py#L26
that being said, the code in tlslite-ng has sending of uncompressed
hardcoded. If you want it to offer and accept compressed points, you will need to write a bit of glue code. I know it works, as I use it in tlsfuzzer, just didn't extend tlslite-ng as I have no need for that (and uncompressed is mandatory anyway).
See also #103
It would be nice if you would extend tlslite-ng for the future, I'm doubting my abilities to actually be able to implement this(write the glue code you speaking of), but I will have a look at it anyway, thank you
basically you need to change tlslite-ng to use the https://github.com/tlsfuzzer/python-ecdsa/blob/eed49e25683d656ba211a8cd97bf93da34450cf5/src/ecdsa/keys.py#L219 function with the valid_encodings
matching what was sent in the ec_point_formats
extension
basically you need to change tlslite-ng to use the https://github.com/tlsfuzzer/python-ecdsa/blob/eed49e25683d656ba211a8cd97bf93da34450cf5/src/ecdsa/keys.py#L219 function with the
valid_encodings
matching what was sent in theec_point_formats
extension
Thanks a bunch :)
Duplicate of #103