Repository navigation
Enable brainpool curves for TLS1.3 - #7485
bernd-edlinger wants to merge 1 commit into
Conversation
851edca to
57c4ead
Compare
There was a problem hiding this comment.
Maybe we want to add defines for things like x25519 too, and then update eccurves_default[] to use the defines instead of just the numbers.
There was a problem hiding this comment.
yes. there are two code points for P-256 and P-384
include/openssl/tls1.h:# define TLSEXT_curve_P_256 23
include/openssl/tls1.h:# define TLSEXT_curve_P_384 24
I was unsure why those are in a public API. Those have to stay, but
I would replace them with internal TLSEXT_GROUPID defines as needed.
Should I do that in this PR?
There was a problem hiding this comment.
I really don't like this. I think you really should just add this like you would add a normal curve.
I also suggest that we add a minimum / maximum version for curves, I think that should simplify things.
There was a problem hiding this comment.
The group IDs are a bit special, it worked right away when the signature code points are added.
But the supported groups extensions need to be different for TLS1.3 and TLS1.2,
although there is no difference, from the internal representation.
Of course I do not want to add a different NID for brainpool in TLS1.2 vs. 1.3 in the
set1_curves command.
So I add NID_brainpoolP384r1, and send effectively two code points, if
the client allows all tls versions.
|
tls1_set_groups() will need to be adjusted to support numbers >= 32. |
|
I hope I can avoid that. |
|
Oh, right, you want to avoid adding NIDs. |
|
I just added a few macros to convert the group id in a cleaner way, untested so far. |
|
Also, please note that the Brainpool curves are explicitly not in the recommended list. The registry requirement is just to have a specification. I think that adding support for this goes against the stated OpenSSL policy, but the OMC will have to decide. |
|
They should not be enabled by default, which this PR doesn't do as far as I know. You could argue that since TLS 1.3 says it shouldn't be supported, that they should do more than just enable it, they should enable it for use in TLS 1.3. And if you want that, you would need the new NIDs. |
|
It is definitely not intended to enable those curves by default. |
|
There isn't (yet) an RFC for this. The codepoints are there, but the associated RFC isn't. It seems a bit premature to add this. |
The recent changes to TLS registries (e.g., RFC 8447) explicitly intended to admit the possibility for codepoint assignment for Internet-Drafts that do not become RFCs; I don't think there's a priori a reason to wait for RFC publication. The idea is that if the draft changes enough to not be interoperable then there would need to be new codepoints assigned. |
I wasn't thinking so much about interoperability but more about OpenSSL policy, i.e. it is our policy to require that such things are standardised. |
|
There is one thing that appears to be wrong. I mean |
|
I think the behavior you describe of negotiation 1.3 with a curve that is not defined for use in 1.3, is nonconformant to the spec. |
d1a71d3 to
267ac20
Compare
267ac20 to
cf4dcb9
Compare
|
rebased to master |
cf4dcb9 to
66858cd
Compare
See the recently assigned brainpool code points at: https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml
|
This PR is in a state where it requires action by @openssl/otc but the last update was 30 days ago |
paulidale
left a comment
There was a problem hiding this comment.
LGTM for master, although I'm not too conversant with this part of the code.
I'm not sure this is good for 3.0. @openssl/otc ?
I would consider it a new feature, not eligible for 3.0. |
|
I do not see how this could be a bug fix. Clearly it is a new feature. |
|
+1 @t8m |
|
Dropping 3.0 tag. |
|
24 hours has passed since 'approval: done' was set, but as this PR has been updated in that time the label 'approval: ready to merge' is not being automatically set. Please review the updates and set the label manually. |
|
Merged to master as 0a10825. |
See the recently assigned brainpool code points at: https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml Reviewed-by: Paul Dale <[email protected]> (Merged from #7485)
|
Hi, we were hoping this change would be part of OpenSSL 3.1.x. Thanks a lot! @bernd-edlinger any chance of integrating it into OpenSSL 3.1.x? |
|
This was severally changed in the master branch so it is kind of non-trivial to backport to 3.1. |
|
In case we would provide a backport to 3.1, would it be possible to merge this change into the 3.1 branch? |
|
It would be considered based on the invasiveness of the change. If the patch appears soon though as the beta release which must be feature complete is now planned to be released in two or three weeks. |
|
Thanks a lot, we will have a look how a backport could look like and how invasive it is. |
|
Hi @t8m, I've tried and I think I'm able to apply the original patch in 3.1.x branch without many conflicts. If I insert the patch at the beginning of the 3.1.x branch history and reapply all changes from then, there is only one small conflict. I will try to create a clean pull request beginning of next week. |
|
The problem is the original patch is not acceptable. It was later severally redone by @mattcaswell. |
|
All these have to be backported. |
|
There is also a problem that OpenSSL 3.1 beta1 is currently scheduled for Thursday next week. Which would close the opportunity to add this support - actually it would have to be merged on Monday at the latest. I am afraid that is not doable. Of course the schedule for 3.1 beta is not definite, it might be delayed if OTC (on Tuesday) decides so. |
Hi @t8m, the backport of all the patches was quite straight forward. We were able to apply them without many changes. If anything is missing, please let me know. Thanks a lot! |
See the recently assigned brainpool code points at:
https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml