<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html lang="en">
<head>
<meta content="text/html; charset=US-ASCII" http-equiv="Content-Type">
<title>
GitLab
</title>


<style>img {
max-width: 100%; height: auto;
}
</style>
</head>
<body>
<div class="content">

<p class="details" style="font-style: italic; color: #666;">
<a href="https://gitlab.com/dwmw2">David Woodhouse</a> created an issue: <a href="https://gitlab.com/gnutls/gnutls/-/issues/1258">#1258</a>
</p>
<div></div>
<p dir="auto">RFC8446 §4.2.3 says for the RSASSA-PSS algorithms:</p>
<pre class="code highlight js-syntax-highlight language-plaintext" lang="plaintext" v-pre="true"><code><span id="LC1" class="line" lang="plaintext">      The length of the Salt MUST be equal to the length of the output</span>
<span id="LC2" class="line" lang="plaintext">      of the digest algorithm. </span></code></pre>
<p dir="auto">However, in the case of a 1024-bit RSA key using RSA-PSS+SHA512, the maximum possible salt length is only 62 bytes.</p>
<p dir="auto">I originally filed an OpenSSL issue for this <em>not</em> working in OpenSSL: <a href="https://github.com/openssl/openssl/issues/16167" rel="nofollow noreferrer noopener" target="_blank">https://github.com/openssl/openssl/issues/16167</a></p>
<p dir="auto">But now after referring to RFC8446 I think the bug is that it <em>does</em> work in GnuTLS, and it shouldn't.</p>
<p dir="auto">And I should fix my PSS padding code in OpenConnect too, to fail when there isn't enough room for <code>salt_len == hash_len</code> instead of truncating the salt.</p>

</div>
<div class="footer" style="margin-top: 10px;">
<p style="font-size: small; color: #666;">

<br>
Reply to this email directly or <a href="https://gitlab.com/gnutls/gnutls/-/issues/1258">view it on GitLab</a>.
<br>
You're receiving this email because of your account on gitlab.com.
If you'd like to receive fewer emails, you can
<a href="https://gitlab.com/-/sent_notifications/1183159f220b8147c1a65f4ec7a52da2/unsubscribe">unsubscribe</a>
from this thread or
adjust your notification settings.
<script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","action":{"@type":"ViewAction","name":"View Issue","url":"https://gitlab.com/gnutls/gnutls/-/issues/1258"}}</script>


</p>
</div>
</body>
</html>