From: David Howells <dhowells@redhat.com>
To: Tadeusz Struk <tadeusz.struk@intel.com>
Cc: dhowells@redhat.com, "Zaborowski,
Andrew" <andrew.zaborowski@intel.com>,
"keyrings@vger.kernel.org" <keyrings@vger.kernel.org>,
Linux Crypto Mailing List <linux-crypto@vger.kernel.org>
Subject: Re: RSA/MPI handling issues and keyctl access to public key keyrings
Date: Wed, 11 May 2016 14:55:56 +0100 [thread overview]
Message-ID: <2114.1462974956@warthog.procyon.org.uk> (raw)
In-Reply-To: <268bb9cd-08ca-aae9-5b12-91d8c0195bc1@intel.com>
Tadeusz Struk <tadeusz.struk@intel.com> wrote:
> > (2) rsa-pkcs1pad needs to indicate what the maximum content size is, given
> > the minimum possible padding for the specified hash type (ie. a
> > particular OID).
>
> The user needs to use crypto_akcipher_maxsize(tfm) to get the required buffer
> size for a given key.
> We do check if the buffer if big enough to accommodate padding and hash info.
> This is needed in sign and encrypt operations, and in both cases we check it,
> sign:
> https://git.kernel.org/cgit/linux/kernel/git/herbert/cryptodev-2.6.git/tree/crypto/rsa-pkcs1pad.c#n434
> and encrypt:
> https://git.kernel.org/cgit/linux/kernel/git/herbert/cryptodev-2.6.git/tree/crypto/rsa-pkcs1pad.c#n252
Can you supply a way to find out the reduced size from the padding?
David
next prev parent reply other threads:[~2016-05-11 13:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <7781.1462785198@warthog.procyon.org.uk>
2016-05-09 22:56 ` RSA/MPI handling issues and keyctl access to public key keyrings Tadeusz Struk
2016-05-11 13:55 ` David Howells [this message]
2016-05-11 21:11 ` Tadeusz Struk
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=2114.1462974956@warthog.procyon.org.uk \
--to=dhowells@redhat.com \
--cc=andrew.zaborowski@intel.com \
--cc=keyrings@vger.kernel.org \
--cc=linux-crypto@vger.kernel.org \
--cc=tadeusz.struk@intel.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.