* Re: RSA decryption output length [not found] <VI1PR04MB1311DE5E1DE2E2B818797450B8D20@VI1PR04MB1311.eurprd04.prod.outlook.com> @ 2016-02-05 17:45 ` Tadeusz Struk 2016-02-09 16:48 ` Tudor-Dan Ambarus 0 siblings, 1 reply; 2+ messages in thread From: Tadeusz Struk @ 2016-02-05 17:45 UTC (permalink / raw) To: Tudor-Dan Ambarus, linux-crypto@vger.kernel.org Hi Tudor-Dan, On 02/05/2016 07:25 AM, Tudor-Dan Ambarus wrote: > I see that in qat, if the RSA decryption output data has the first octets of value zero, you skip them, actualize the dst_len and memmove the decrypted data to the initial pointer (see [1]). Why do you do this? Why can't you keep the decryption output data of key length? This is because the SW RSA implementation works the same way. MPI lib also discards the leading zeros. The two implementations have to produce the same output for a given input. Thanks, -- TS ^ permalink raw reply [flat|nested] 2+ messages in thread
* RE: RSA decryption output length 2016-02-05 17:45 ` RSA decryption output length Tadeusz Struk @ 2016-02-09 16:48 ` Tudor-Dan Ambarus 0 siblings, 0 replies; 2+ messages in thread From: Tudor-Dan Ambarus @ 2016-02-09 16:48 UTC (permalink / raw) To: Tadeusz Struk, linux-crypto@vger.kernel.org Thanks Tadeusz, The leading zeros are discarded in the process of conversion the byte array data to a big integer. When talking about numbers, the leading zeros are not meaningful. ta -----Original Message----- From: Tadeusz Struk [mailto:tadeusz.struk@intel.com] Sent: Friday, February 05, 2016 7:46 PM To: Tudor-Dan Ambarus; linux-crypto@vger.kernel.org Subject: Re: RSA decryption output length Hi Tudor-Dan, On 02/05/2016 07:25 AM, Tudor-Dan Ambarus wrote: > I see that in qat, if the RSA decryption output data has the first octets of value zero, you skip them, actualize the dst_len and memmove the decrypted data to the initial pointer (see [1]). Why do you do this? Why can't you keep the decryption output data of key length? This is because the SW RSA implementation works the same way. MPI lib also discards the leading zeros. The two implementations have to produce the same output for a given input. Thanks, -- TS ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-02-09 16:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <VI1PR04MB1311DE5E1DE2E2B818797450B8D20@VI1PR04MB1311.eurprd04.prod.outlook.com>
2016-02-05 17:45 ` RSA decryption output length Tadeusz Struk
2016-02-09 16:48 ` Tudor-Dan Ambarus
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.