From: Jarkko Sakkinen <jarkko@kernel.org>
To: Stefan Berger <stefanb@linux.ibm.com>
Cc: Vitaly Chikunov <vt@altlinux.org>,
keyrings@vger.kernel.org, David Howells <dhowells@redhat.com>,
linux-crypto@vger.kernel.org, linux-integrity@vger.kernel.org,
Eric Biggers <ebiggers@kernel.org>
Subject: Re: [RFC PATCH] KEYS: Double max_size to make keyctl pkey_verify work
Date: Mon, 21 Feb 2022 00:31:30 +0100 [thread overview]
Message-ID: <YhLPUkmSIOQNcTd4@iki.fi> (raw)
In-Reply-To: <5bb23626-afe1-9e05-566b-8830882904f6@linux.ibm.com>
On Wed, Feb 02, 2022 at 07:55:43AM -0500, Stefan Berger wrote:
>
> On 2/2/22 01:59, Vitaly Chikunov wrote:
> > Rarely used `keyctl pkey_verify' can verify raw signatures, but was
> > failing, because ECDSA/EC-RDSA signature sizes are twice key sizes which
> > does not pass in/out sizes check in keyctl_pkey_params_get_2.
> > This in turn because these values cannot be distinguished by a single
> > `max_size' callback return value.
> > Also, `keyctl pkey_query` displays incorrect `max_sig_size' about these
> > algorithms.
> >
> > Signed-off-by: Vitaly Chikunov <vt@altlinux.org>
>
> How do you use pkey_query?
>
> $ keyctl padd asymmetric testkey %keyring:test < cert.der
> 385037223
> $ keyctl pkey_query 385037223 ''
> Password passing is not yet supported
> $ keyctl pkey_query 385037223
> Format:
> keyctl --version
> keyctl add <type> <desc> <data> <keyring>
> [...]
>
> $ keyctl unlink 385037223
> 1 links removed
A keyctl transcript of the failing case would be really educating addition
to the commit message (low-barrier to test this patch).
BR, Jarkko
next prev parent reply other threads:[~2022-02-20 23:30 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-02 6:59 [RFC PATCH] KEYS: Double max_size to make keyctl pkey_verify work Vitaly Chikunov
2022-02-02 12:55 ` Stefan Berger
2022-02-02 21:24 ` Vitaly Chikunov
2022-02-02 22:38 ` Vitaly Chikunov
2022-02-03 3:42 ` Stefan Berger
2022-02-03 0:07 ` Vitaly Chikunov
2022-02-20 23:31 ` Jarkko Sakkinen [this message]
2022-02-03 3:15 ` Stefan Berger
2022-02-03 3:34 ` Vitaly Chikunov
2022-02-20 23:29 ` Jarkko Sakkinen
2022-02-21 2:43 ` Vitaly Chikunov
2022-02-25 19:47 ` Stefan Berger
2022-02-20 23:25 ` Jarkko Sakkinen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YhLPUkmSIOQNcTd4@iki.fi \
--to=jarkko@kernel.org \
--cc=dhowells@redhat.com \
--cc=ebiggers@kernel.org \
--cc=keyrings@vger.kernel.org \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-integrity@vger.kernel.org \
--cc=stefanb@linux.ibm.com \
--cc=vt@altlinux.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).