From: Tadeusz Struk <tadeusz.struk@intel.com>
To: David Howells <dhowells@redhat.com>
Cc: "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:11:13 -0700 [thread overview]
Message-ID: <a3d967dd-697c-e20d-3a57-c53fc161bd05@intel.com> (raw)
In-Reply-To: <2114.1462974956@warthog.procyon.org.uk>
On 05/11/2016 06:55 AM, David Howells wrote:
> 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?
>
Hi David,
What exactly do you want to do? For the verify operation we don't know the
reduced size before the operation. We only figure it out after we decrypt
the message and then the req->dst_len gets the actual size of the message
without padding.
Thanks,
--
TS
prev parent reply other threads:[~2016-05-11 21:12 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
2016-05-11 21:11 ` Tadeusz Struk [this message]
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=a3d967dd-697c-e20d-3a57-c53fc161bd05@intel.com \
--to=tadeusz.struk@intel.com \
--cc=andrew.zaborowski@intel.com \
--cc=dhowells@redhat.com \
--cc=keyrings@vger.kernel.org \
--cc=linux-crypto@vger.kernel.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 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.