<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html lang="en" style='--code-editor-font: var(--default-mono-font, "GitLab Mono"), JetBrains Mono, Menlo, DejaVu Sans Mono, Liberation Mono, Consolas, Ubuntu Mono, Courier New, andale mono, lucida console, monospace;'>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<title>
GitLab
</title>
<style data-premailer="ignore" type="text/css">
a { color: #1068bf; }
</style>
<style>img {
max-width: 100%; height: auto;
}
body {
font-size: .875rem;
}
body {
-webkit-text-shadow: rgba(255,255,255,.01) 0 0 1px;
}
body {
font-family: "GitLab Sans",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Noto Sans",Ubuntu,Cantarell,"Helvetica Neue",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"; font-size: inherit;
}
</style>
</head>
<body style='font-size: inherit; -webkit-text-shadow: rgba(255,255,255,.01) 0 0 1px; font-family: "GitLab Sans",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Noto Sans",Ubuntu,Cantarell,"Helvetica Neue",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";'>
<div class="content">
<p class="details" style="font-style: italic; color: #626168;">
<a href="https://gitlab.com/tomato42">Alicja Kario (@mention me if you need reply)</a> created an issue: <a href="https://gitlab.com/gnutls/gnutls/-/issues/1713">#1713</a>
</p>
<div class="md" style="position: relative; z-index: 1; color: #3a383f; word-wrap: break-word;">
<p dir="auto" style="color: #3a383f; margin: 0 0 1rem;" align="initial">When GnuTLS server receives a connection from a client that advertises modified lists of groups and key shares, the behaviour of the server is not consistent:</p>
<p dir="auto" style="color: #3a383f; margin: 0 0 1rem;" align="initial">(* - means that the group was also sent in the key_share)</p>
<p dir="auto" style="color: #3a383f; margin: 0 0 1rem;" align="initial">*X25519MLKEM768:SECP256R1MLKEM768 = X25519MLKEM768 (GOOD)
X25519MLKEM768:*SECP256R1MLKEM768 = X25519MLKEM768 (not good: not
using a sent key_share)
X25519MLKEM768:*SECP256R1MLKEM768:X25519:P-256:P-384 = X25519 (BAD:
not hybrid)
*X25519MLKEM768:*SECP256R1MLKEM768:X25519:*P-256:P-384 = X25519
(BAD: not hybrid)
*X25519MLKEM768:SECP256R1MLKEM768:*P-256:P-384 = P-256 (BAD: not hybrid)
*SECP256R1MLKEM768:*P-256:P-384 = P-256 (BAD: not hybrid)
*SECP256R1MLKEM768:P-256:P-384 = P-256 (BAD: not hybrid and not key_share)
*X25519MLKEM768:SecP256r1MLKEM768:SecP384r1MLKEM1024:X25519:secp256r1:X448:secp521r1:secp384r1:ffdhe2048:ffdhe3072:ffdhe4096:ffdhe6144:ffdhe8192 = X25519MLKEM768 (GOOD: why?)
*X25519MLKEM768:SecP256r1MLKEM768:SecP384r1MLKEM1024:X25519:secp256r1:X448:secp521r1:secp384r1 = X25519 (BAD: not hybrid, but the difference was just omitting FFDHE)</p>
<p dir="auto" style="color: #3a383f; margin: 0 0 1rem;" align="initial">OpenSSL fixed this issue by introducing the <code style='font-size: 90%; color: #18171d; word-wrap: break-word; border-radius: .25rem; background-color: #ececef; margin-top: 0; font-weight: inherit; white-space: break-spaces; word-break: break-all; font-family: "GitLab Mono", "JetBrains Mono", "Menlo", "DejaVu Sans Mono", "Liberation Mono", "Consolas", "Ubuntu Mono", "Courier New", "andale mono", "lucida console", monospace; font-variant-ligatures: none; overflow-wrap: break-word; padding: 0.125rem 0.25rem;'>/</code> syntax in groups, allowing the user to specify "try to negotiate those groups first, even at a cost of HRR", so for example:
<code style='font-size: 90%; color: #18171d; word-wrap: break-word; border-radius: .25rem; background-color: #ececef; font-weight: inherit; white-space: break-spaces; word-break: break-all; font-family: "GitLab Mono", "JetBrains Mono", "Menlo", "DejaVu Sans Mono", "Liberation Mono", "Consolas", "Ubuntu Mono", "Courier New", "andale mono", "lucida console", monospace; font-variant-ligatures: none; overflow-wrap: break-word; padding: 0.125rem 0.25rem;'>X25519MLKEM768:SECP256R1MLKEM768:SECP384r1MLKEM1024/X25519:P-256:P-384</code> would cause the server to negotiate hybrid post-quantum groups, if at all supported by the client, even if the client did advertise just X25519 key share. The same syntax without <code style='font-size: 90%; color: #18171d; word-wrap: break-word; border-radius: .25rem; background-color: #ececef; font-weight: inherit; white-space: break-spaces; word-break: break-all; font-family: "GitLab Mono", "JetBrains Mono", "Menlo", "DejaVu Sans Mono", "Liberation Mono", "Consolas", "Ubuntu Mono", "Courier New", "andale mono", "lucida console", monospace; font-variant-ligatures: none; overflow-wrap: break-word; padding: 0.125rem 0.25rem;'>/</code> would negotiate the first group that is in key_shares of ClientHello and is supported by server.</p>
<p dir="auto" style="color: #3a383f; margin: 0 0 1rem;" align="initial">The nice thing about this syntax is that allows the user the flexibility to decide if they want to prefer hybrid or pure post-quantum algorithms over classical ones, or if they want to prioritise latency by prioritising key_shares that are already there.</p>
<p dir="auto" style="color: #3a383f; margin: 0;" align="initial">If we don't want this level of flexibility, I think the group selection still should at least prefer hybrid post-quantum groups over anything else (at the very least, when they are advertised in key_share)</p>
</div>
</div>
<div class="footer" style="margin-top: 10px;">
<p style="font-size: small; color: #626168;">
—
<br>
Reply to this email directly or <a href="https://gitlab.com/gnutls/gnutls/-/issues/1713">view it on GitLab</a>.
<br>
You're receiving this email because of your account on <a target="_blank" rel="noopener noreferrer" href="https://gitlab.com">gitlab.com</a>. <a href="https://gitlab.com/-/sent_notifications/53f12e73aa2e921c2e408e6f1fcd126e/unsubscribe" target="_blank" rel="noopener noreferrer">Unsubscribe</a> from this thread · <a href="https://gitlab.com/-/profile/notifications" target="_blank" rel="noopener noreferrer" class="mng-notif-link">Manage all notifications</a> · <a href="https://gitlab.com/help" target="_blank" rel="noopener noreferrer" class="help-link">Help</a>
<span style="color: transparent; font-size: 0; display: none; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0;">
Notification message regarding https://gitlab.com/gnutls/gnutls/-/issues/1713 at 1749042835
</span>
<script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","action":{"@type":"ViewAction","name":"View Issue","url":"https://gitlab.com/gnutls/gnutls/-/issues/1713"}}</script>
</p>
</div>
</body>
</html>