[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <92771fa9-e5a8-2721-519b-f91da21deb3e@gmail.com>
Date: Wed, 11 May 2016 17:17:10 -0700
From: Tadeusz Struk <tstruk@...il.com>
To: Mat Martineau <mathew.j.martineau@...ux.intel.com>,
David Howells <dhowells@...hat.com>
Cc: tadeusz.struk@...el.com, linux-kernel@...r.kernel.org,
linux-security-module@...r.kernel.org, keyrings@...r.kernel.org,
linux-crypto@...r.kernel.org, dwmw2@...radead.org
Subject: Re: [RFC PATCH 5/8] KEYS: Provide software public key query function
[ver 3]
On 05/11/2016 04:50 PM, Mat Martineau wrote:
>
>> + len = crypto_akcipher_maxsize(tfm);
>> + info->key_size = len * 8;
>> + info->max_data_size = len;
>> + info->max_sig_size = len;
>> + info->max_enc_size = len;
>> + info->max_dec_size = len;
>
> If len > UINT16_MAX, should UINT16_MAX be reported as the max size? Similar question for len*8 and key_size.
Hi Mat,
Since all the operations performed are mod key->n the output will never be bigger
than size of pkey->n, which is the return value from crypto_akcipher_maxsize(tfm)
for a given key.
Thanks,
--
TS
Powered by blists - more mailing lists