lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ